A digital signature certifies that a particular electronic document is sent by a specific sender. It contains information which verifies the actual sender of the document. It’s usage is mainly for the purpose where the sender cannot deny that he has not sent the document in question.
Here’s how the digital signature works. The message which has to be sent to the receiver is passed through a hashing algorithm. It produces a hash result. Then, the sender’s private key is applied to the hash result. This creates a message digest. The message digest is then appended to the message and sent to the receiver. The receiver then passes the message through the hashing algorithm. It produces a hash result. The receiver then applies sender’s public key to the message to get a new message digest. Then the new message digest is checked if it is same as the message digest in the original message which was sent by the sender. If it is same, then it validates that the message was sent the by the original sender.