Digital Signatures
TL;DR: A digital signature is a mathematical "wax seal" that proves a document hasn't been tampered with and truly came from the person who sent it.

The Problem of Digital Trust
In Station 12, we explored how Public Key Infrastructure allows two people to exchange secret keys without meeting face-to-face. But secrecy isn't the only concern in the digital world. Imagine you receive an email from your bank claiming your account is locked and asking you to click a link. How do you know that email actually came from the bank and not a scammer? Or, if you download a software update, how can you be sure the file wasn't modified by a hacker to include a virus? This is where we need more than just encryption; we need a way to verify .
The Magic of Hashing
At the heart of a digital signature is a . Think of a hash like a digital fingerprint. If you run a document through a hash function, it spits out a string of numbers and letters. If you change even a single period or comma in that document, the hash changes completely.
This "fingerprint" is incredibly sensitive. Because it is mathematically impossible to change the document and still produce the same hash, the fingerprint acts as a perfect guardian of the original content.
Signing the Document
To create a digital signature, the sender combines their private key from our previous station with the document's hash. This process creates a unique tag that is attached to the file. When you receive the file, your computer does two things:
- It calculates the hash of the file you received.
- It uses the sender's public key to "unlock" the digital signature and see what the original hash was supposed to be.
If the two hashes match, the system confirms two things: the file hasn't been changed (integrity), and the sender is who they claim to be (authentication). If they don't match, you know the file was tampered with or the signature is fake. It is a brilliant, invisible way to ensure that what you see is exactly what was intended.
Why This Matters
Consider the real-world case of major operating system updates. When your phone downloads an update, it doesn't just trust the file. It checks the digital signature against the manufacturer's public key. If a hacker tried to inject malicious code into that update, the file's hash would change, the signature would no longer validate, and your phone would reject the update entirely. This mechanism is the silent hero of the modern internet, keeping your software secure and your communications authentic without you ever having to lift a finger.
A digital signature uses a unique mathematical fingerprint to prove that a document is authentic and has remained completely unchanged since it was signed.
Now that you know how to lock your digital documents with a signature, you might wonder what happens when someone tries to force the lock. In the next station, we move from protecting data to the high-stakes world of breaking the code.