Hi Peter, thank you very much for helping with paperbackup.py and sending your python code.
> > Ideally it is a tool or combination of tools already deployed widely, like > > sed and sort I used in paperrestore. This would make the checksums still > > usable even when the source to paperbackup.py isn't available anymore. > > It took me some fiddling... but using CRC RevEng[1] I got a checksum in > Python that is compatible to POSIX cksum. [...] > $ printf $(printf '%08x' $(echo -n 123456789 | cksum | cut -d' ' -f1) | > sed 's/../\\x\0/g')|base64|cut -b-6 Yesterday, with your solution in mind, I had an idea how we could even further reduce dependencies and ease the use: echo -n "line content to check" | md5sum | cut -c -6 MD5 may be broken as a secure hash, but it still makes a very good checksum. MD5 is well standardized and available and hashlib.md5() is included in python. Your solution uses base64 to show more bits of the checksum than my hex chars. But I think a collision at the first 3 bytes is less likely with MD5 than one with CRC. The MD5 sum changes drastically if just one bit flips. What do you think? Kind regards, Gerd _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users