es uses public key cryptography. Either the whole document or a digest (condensed version of the document) can be signed. Public key encryption can be used for signing an entire document where the private key is used by the sender for encryption and the public key of the sender is used by the receiver for decryption. Signing the whole document using public key encryption is inefficient for long messages. To overcome the inefficiency in signing the whole document using the public key encryption, a digest of the document is created using hash function and then signed (see Figure 31.5). Digest is a condensed version of the document. Message Digest 5(MD5) that produces a 120-bit digest and Secure Hash Algorithm 1(SHA-1) that produces a 160-bit digest are the two common hash functions. Hash operation is one-way operation; that is, the digest can only be created from the document while the other way is not possible. Also hashing is a one-to-one function producing little probability that two messages will create the same digest. The digest SO created is encrypted by the sender using the private key and attached to the original message and sent to the receiver who separates the digest from the original message and applies the same hash function to the message to create a second digest. The receiver uses the public key of the sender to decrypt the received digest. If the two digests are the same then message authentication and integrity are preserved. The digest, which is a representation of the message, is not changed indicating that integrity is provided. The message is secure as the message and its digest comes from a true sender. Also the sender cannot deny the message as the sender cannot deny the digest. There is an access to every user's public key in the case of public key cryp- tography. So as to prevent the intruder attack, the receiver can ask a certification authority or CA, which is a federal or state organization that binds a public key to an entity and then issues a certificate. This will help the receiver 