[Download postscript version]
next up previous contents
Next: Methods Of Attack Up: Introduction to Cryptography Previous: DES

Message Digest and Digital Signatures

A typical one-way hash function or message digest 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 MD5 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.

In practice, the public key is placed in a public database known as a key server. Whenever somebody wants to find out what your public key is, they send a request to the key server. So if somebody wanted to find out Mr. X's public key, they would send a request to the key server and get back something like ``Mr. X's public key is 3A197BC2'' (real public keys are actually far longer than this). Now everybody knows two things:

If you want to send me a message that only I can read, all you have to do is encrypt it with 3A197BC2.

If you receive a message that can be decrypted with 3A197BC2, it must have come from me.

This second point is very important. It allows a user to make ``digital signatures.'' Just like physical signatures, digital signatures are a method of guaranteeing somebody's identity. As long as you don't let anybody know what your private key is, it will take impossibly large amounts of computing power to ``forge'' your digital signature. It is an extremely good idea to ``sign'' electronic documents by using your private key to encrypt the ``message digest'' of the document. A message digest is a relatively short block of numbers that prevents anybody from altering your document. Changing even a single letter would cause the message digest to become completely different.


next up previous contents
Next: Methods Of Attack Up: Introduction to Cryptography Previous: DES

Adrian Perrig
Fri May 31 09:07:38 MET DST 1996