cryptography faq digital signatures archive name cryptography faq part last modified faq for sci crypt part digital signatures and hash functions this is the seventh of ten parts of the sci crypt faq the parts are mostly independent but you should read the first part before the rest we don t have the time to send out missing parts by mail so don t ask notes such as kah refer to the reference list in the last part the sections of this faq are available via anonymous ftp to rtfm mit edu as pub usenet news answers cryptography faq part xx the cryptography faq is posted to the newsgroups sci crypt sci answers and news answers every days contents what is a one way hash function what is the difference between public private secret shared etc what are md and md what is snefru what is a one way hash function a typical one way hash function takes a variable length message and produces a fixed length hash given the hash it is computationally impossible to find a message with that hash in fact one can t determine any usable information about a message with that hash not even a single bit for some one way hash functions it s also computationally impossible to determine two messages which produce the same hash a one way hash function can be private or public just like an encryption function here s one application of a public one way hash function like md or snefru most public key signature systems are relatively slow to sign a long message may take longer than the user is willing to wait solution compute the one way hash of the message and sign the hash which is short now anyone who wants to verify the signature can do the same thing another name for one way hash function is message digest function what is the difference between public private secret shared etc there is a horrendous mishmash of terminology in the literature for a very small set of concepts when an algorithm depends on a key which isn t published we call it a private algorithm otherwise we call it a public algorithm we have encryption functions e and decryption functions d so that d e m m for any message m we also have hashing functions h and verification functions v such that v m x if and only if x h m a public key cryptosystem has public encryption and private decryption checksums such as the application mentioned in the previous question have public hashing and public verification digital signature functions have private hashing and public verification only one person can produce the hash for a message but everyone can verify that the hash is correct obviously when an algorithm depends on a private key it s meant to be unusable by anyone who doesn t have the key there s no real difference between a shared key and a private key a shared key isn t published so it s private if you encrypt data for a friend rather than for your eyes only are you suddenly doing shared key encryption rather than private key encryption no what are md and md md and md are message digest functions developed by ron rivest definitions appear in rfc and rfc see part code is available from ftpmd note that a transcription error was found in the original md draft rfc the corrected algorithm should be called md a though some people refer to it as md what is snefru snefru is a family of message digest functions developed by ralph merkle snefru is an round function the newest in the family definitions appear in merkle s paper me a code is available from ftpsf
