Tuesday, 17 March 2015

Digital Signature

Digital Signature ensures integrity of a message or a document. A digital signature is an encrypted message digest.
Message Digest: 
How a Message Digest is created?
A typical 128-bit hash is computed from the content of a document using a hashing algorithm like MD5.
The computed hash is the Message Digest of the document. A message digest helps in identifying a change that was made in the document either accidentally or intentionally.
Message Digest is then encrypted with the Private Key of the Sender, resulting a Digital Signature.

Authenticity of the content in the document can be verified by the recipient as follows:
1. Receiver decrypts the encrypted hash with the Public Key of the sender.
2. Receiver computes the hash value of the content in the document.
3. The hash is then compared with the decrypted hash.

If they are same, then the obtained content is not altered. Sender is also verified here because decryption with Public Key would be successful only when the Sender uses his Private Key to encrypt. This proves that the message is received from the reliable Sender.