How digital signatures provide authentication, integrity, and non-repudiation.
A digital signature is a cryptographic mechanism used to verify the authenticity and integrity of a digital message or document. It serves a similar purpose to a handwritten signature but offers far more inherent security. A digital signature provides three key assurances: 1. Authentication: It confirms who the sender is. Since the signature is generated using the sender's private key, it proves that the message could only have come from them. 2. Integrity: It ensures that the message has not been altered in transit. The signature is based on the hash of the original message, and any change to the message would result in a different hash, causing the signature verification to fail. 3. Non-repudiation: It provides proof that the sender actually sent the message. The sender cannot later deny having sent the message because only they could have created the signature with their private key. The process works as follows: First, the sender creates a hash of the message they want to send. Then, they use their private key to encrypt this hash value. This encrypted hash is the digital signature, which is then attached to the message and sent to the recipient. The recipient, upon receiving the message, performs two steps. First, they use the sender's public key (which is freely available) to decrypt the digital signature, revealing the original hash. Second, they compute a new hash of the message they received. If the decrypted hash from the signature matches the new hash they just computed, the signature is valid. This proves the message came from the correct sender and was not tampered with.