How Do Digital Signatures Work?
Before jumping into the technical side of digital signatures, let’s ease into it with a fun story.
At first, digital signatures might sound complicated—but this quirky example should help make the concept much easier to understand.
The Special Box and the Two Keys
Imagine a box with a very unusual lock—it has three positions:
- A – Locked
- B – Unlocked
- C – Locked
The box can be operated using two unique keys:
- A black key that only turns clockwise (from A → B → C)
- A yellow key that only turns counterclockwise (from C → B → A)
This means:
- If the box is locked at position A, only the black key can unlock it.
- If it’s locked at position C, only the yellow key can unlock it.
- Either key can lock the box, but only the opposite key can unlock it.
Batman Chooses His Key
Batman picks the black key (his favorite color) and keeps it to himself—we’ll call this his private key.
He makes a million copies of the yellow key and tosses them out to everyone in Gotham. This yellow key becomes his public key, and now everyone has access to it.
So now:
- Batman holds the private key
- Everyone else has the public key
Batman’s Farewell Gift
Batman decides to retire and become a monk in Kamar-Taj. Before leaving, he writes a note that says:
“Give $1 trillion to Alfred ASAP.”
He places this note in the box and locks it with his private key, turning the lock to position C.
Then, he writes an identical note and gives that one to Alfred, saying, “Take this with the box to the bank.”
Alfred Visits the Bank
The next day, Batman’s sidekick Robin leaks the news of Batman’s retirement, and it spreads across Gotham.
Meanwhile, Alfred walks into Gotham National Bank, hands over the message to the banker, Daime Jimon, and asks for the money.
Daime is skeptical and refuses.
That’s when Alfred pulls out the locked box and places it on the desk.
Like everyone else, Daime has a copy of Batman’s public key—the yellow one.
He uses it to unlock the box by turning it counterclockwise, from position C to B… and it opens.
Inside, he finds the exact same message Alfred handed him earlier.
The Banker Is Convinced
Daime now realizes something important:
- Only someone with Batman’s private key could have locked the box in position C.
- The message inside matches the one Alfred presented.
- Therefore, the message must have come from Batman, and it couldn’t have been tampered with.
He apologizes and immediately processes the transfer to Alfred.
What This Story Teaches Us About Digital Signatures
This box-and-key analogy is a simplified way to understand how digital signatures work:
- The private key is used to “lock” (sign) the message.
- The public key is used to “unlock” (verify) it.
- If someone can unlock it with the public key, it proves that the message must have come from the holder of the matching private key.
And just like the locked box ensures the message hasn’t been altered, digital signatures guarantee the integrity and authenticity of the message—even without the sender being physically present.
Summary
So, how can you prove Batman wrote a message without him being there and be sure the message wasn’t changed?
With a digital signature.
Now that you understand the concept, let’s dive into how this works technically in the world of cryptocurrency!
