Skip to main content

Digital Signature

A digital signature is a cryptographic technique that ensures:

  • Authenticity – verifies the sender’s identity
  • Integrity – confirms that the message has not been altered
  • Non-repudiation – the sender cannot deny sending the message

It is the digital equivalent of a handwritten signature or stamped seal, but much more secure and verifiable through public-key cryptography.

How Digital Signatures Work

Based on Asymmetric (Public Key) Cryptography

Each user has:

  • A private key (kept secret)
  • A public key (shared with everyone)

Signing Process

  1. Sender creates a message.
  2. Computes the hash of the message.
  3. Encrypts the hash using their private key → digital signature
  4. Sends the message + signature to the receiver.

Verification Process:

  1. Receiver receives the message and digital signature.
  2. Computes the hash of the message.
  3. Decrypts the signature using sender’s public key.
  4. If the two hashes match → message is authentic and unchanged.

Uses of Digital Signature

FeatureBenefit
Message IntegrityDetects tampering
AuthenticationConfirms sender identity
Non-repudiationPrevents sender from denying the message
Trust EstablishmentEnables secure communication

Workflow of Digital Signature

+-----------+             +-------------------+             +-------------+
| Client | -- Sign --> | Send Message | --> Verify →| Server |
+-----------+ +-------------------+ +-------------+
| | |
|-- Private Key --(hash & sign)---> -- Public Key -->
| | |
Message + Signature → API Gateway → Validated