Digital Signature is a process that guarantees that the contents of a message have not been altered in transit.

When you, the server, digitally sign a document, you add a one-way hash (encryption) of the message content using your public and private key pair.

Your client can still read it, but the process creates a “signature” that only the server’s public key can decrypt. The client, using the server’s public key, can then validate the sender as well as the integrity of message contents.

Whether it’s

  • an email
  • an online order
  • or a watermarked photograph on eBay

if the transmission arrives but the digital signature does not match the public key in the digital certificate, then the client knows that the message has been altered.

How does a Digital Signature Work?

The digital signature can be considered as a numerical value that is represented as a sequence of characters. The creation of a digital signature is a complex mathematical process that can only be created by a computer.

Consider a scenario where Alice has to digitally sign a file or an email and send it to Bob.

  • Alice selects the file to be digitally signed or clicks on ‘sign’ in her email application
  • The hash value of the file content or the message is calculated by Alice’s computer
  • This hash value is encrypted with Alice’s Signing Key (which is a Private Key) to create the Digital Signature.
  • Now, the original file or email message along with its Digital Signature are sent to Bob.
  • After Bob receives the signed message, the associated application (such as email application) identifies that the message has been signed. Bob’s computer then proceeds to:
    • Decrypt the Digital Signature using Alice’s Public Key
    • Calculate the hash of the original message
    • Compare the (a) hash it has computed from the received message with the (b) decrypted hash received with Alice’s message.
  • Any difference in the hash values would reveal tampering of the message.