Digital Signature

Notes

Study Notes

Digital Signatures and Public Key Infrastructure

Digital Signatures: Ensuring Security and Non-repudiation

A digital signature is a mathematical scheme for verifying the authenticity and integrity of digital documents or messages. It is the digital equivalent of a handwritten signature.

1. Core Principles of Digital Signatures

Digital signatures rely on Asymmetric Cryptography (Public Key Infrastructure or PKI).

Key Benefits (What it Guarantees)

  • Authentication: Proves the identity of the signatory (sender). Since only the sender possesses the private key, the signature must originate from them.
  • Integrity: Guarantees that the signed message or document has not been altered since it was signed.
  • Non-Repudiation: Prevents the sender from successfully denying they sent the message, as their private key was used to create the unique signature.

Cryptographic Components

  • Private Key: Used by the sender (signer) to create the digital signature. It must be kept secret.
  • Public Key: Used by the receiver to verify the digital signature. It is openly shared.
  • Hash Function (e.g., SHA-256): A mathematical algorithm that generates a fixed-length string (the "hash" or "message digest") from any input message. This hash is unique to the content.

2. How a Digital Signature is Created and Verified

A. Creation (Signing the Document)

  1. 1
    Hash Generation: The original document/message is run through a hash function, creating a unique, short Message Digest ($H$).
  2. 2
    Signature Creation: The Message Digest ($H$) is encrypted using the sender's Private Key. The result is the **Digital Signature** ($S$).
  3. 3
    Transmission: The original document, along with the newly created Digital Signature ($S$), is sent to the receiver.

B. Verification (Validating the Signature)

  1. 4
    Signature Decryption: The receiver uses the sender's Public Key to decrypt the received Digital Signature ($S$), which yields the original Message Digest ($H_{sent}$).
  2. 5
    Local Hash Generation: The receiver runs the received original document through the *exact same* hash function to create a new local hash ($H_{local}$).
  3. 6
    Comparison: The receiver compares the decrypted digest ($H_{sent}$) with the locally generated digest ($H_{local}$).
    • If $H_{sent} = H_{local}$: The signature is valid (integrity and authenticity confirmed).
    • If $H_{sent} \neq H_{local}$: The message was either tampered with, or the wrong private key was used to sign it (signature is invalid).

3. Certification Authorities (CAs) and Trust

For digital signatures to be trusted universally, a system must exist to verify that the Public Key truly belongs to the claimed identity. This is the role of the Certification Authority (CA).

  • Issuing Digital Certificates: The CA issues a Digital Certificate, which securely binds a public key to an entity (person, organization, or server).
  • Chain of Trust: The CA signs the digital certificate with its own, highly trusted private key. This signature verifies the certificate's validity and the CA's endorsement of the key-to-identity binding.
  • Public Key Infrastructure (PKI): The CA is the central trusted entity in the PKI, providing the organizational framework for generating, distributing, and revoking digital certificates.
Analogy: The Digital Certificate is like a digital passport, and the CA is the government agency that issues and verifies the authenticity of the passport.