Digital Signatures
& Integrity
Learn how digital signatures prove authorship and how integrity verification ensures data hasn't been tampered with: the mathematical trust layer of the internet.
What Is Data Integrity?
Data integrity means that information has not been altered in transit or storage. When you download a file, send a message, or receive a contract, you need assurance that the content is exactly what the sender intended: not a single bit changed.
What Is a Digital Signature?
A digital signature is a cryptographic mechanism that binds a message to an identity. It provides three guarantees:
Why Does This Matter?
Every time you visit a website over HTTPS, install software, or sign a PDF, digital signatures are at work behind the scenes. Without them:
Hash Functions: The Core Building Block
A cryptographic hash function takes any input and produces a fixed-size output called a digest. The function \( H(m) \) has critical properties:
How Hashing Works
The Signing Process
The Verification Process
Signature vs Encryption
| Digital Signature | Encryption | |
|---|---|---|
| Purpose | Prove who sent it and it's unaltered | Keep the content secret |
| Key used to create | Private key (sender) | Public key (recipient) |
| Key used to verify/decrypt | Public key (anyone) | Private key (recipient) |
| Provides confidentiality? | No | Yes |
| Provides authentication? | Yes | No |
Private vs Public Keys
How to Verify a Signature
Example: Email Signing
Alice wants to send Bob a signed email saying "Transfer $500 to account #1234."
Example: Software Downloads
You download a file update.exe from a vendor's website. They also publish its SHA-256 checksum and a digital signature.
Example: HTTPS Certificates
When you visit https://bank.com, your browser verifies the site's digital certificate:
Common Mistakes
Summary of Key Concepts
| Concept | What It Does | Key Tool |
|---|---|---|
| Hash Function | Creates a unique fingerprint of data | SHA-256, SHA-3 |
| Digital Signature | Proves authorship + integrity | Private key + hash |
| Verification | Confirms signature is valid | Public key + hash comparison |
| Certificate Authority | Vouches for a public key's owner | Signed certificates |
| Non-repudiation | Signer cannot deny having signed | Private key uniqueness |
Question 1 of 5
Which key does the sender use to create a digital signature?
Question 2 of 5
What does a cryptographic hash function guarantee about its output?
Question 3 of 5
During signature verification, the receiver decrypts the signature using the sender's public key and then:
Question 4 of 5
Which of the following is NOT a property provided by digital signatures?
Question 5 of 5
Why are MD5 and SHA-1 considered unsuitable for digital signatures today?