Digital signatures
A digital signature lets you prove three things at once — that YOU authorised a specific message, that the message hasn’t been altered, and that you can’t later deny it — all without ever revealing your private key. Every Bitcoin transaction is one of these signatures.
How it works, in three moves
- Sign. You take the message (say, “pay Alice 1 coin”) and combine it with your PRIVATE key using a signing algorithm. Out comes a signature — a number tied to both that exact message and your key.
- Publish. You broadcast the message, the signature, and your PUBLIC key. Your private key never leaves your possession.
- Verify. Anyone can feed the message, signature and public key into a verification algorithm. It answers yes or no: does this signature really correspond to this message and this public key? Only the matching private key could have produced a signature that passes.
What it guarantees
- Authenticity — only the holder of the private key could have signed, so it really came from them.
- Integrity — the signature is bound to the exact message. Change even one character and verification fails, because the message’s hash no longer matches.
- Non-repudiation — the signer can’t credibly deny it later; nobody else could have made a valid signature.
Signatures are the opposite of encryption. Encryption hides a message from everyone but the intended reader. A signature reveals nothing — the message is public — but proves who stands behind it. Bitcoin is built almost entirely on signatures, and barely uses encryption at all.
This is how you spend Bitcoin
When you send Bitcoin, your wallet writes a transaction (“move these coins to this address”) and signs it with your private key. The network checks the signature against your public key. If it verifies, the transaction is valid and only you could have authorised it — no bank, no approval, no permission. Ownership and authorisation are pure mathematics.
We keep saying deriving a public key from a private one is a “one-way trapdoor”, and that signatures rely on it. Time to see the actual maths that makes it so: elliptic curves, next — with a demo you can play with.
Spotted an error or have feedback on this lesson? Suggest a correction ↗
Comments
Powered by Nostr — reply from any Nostr client, and zap the lesson over Lightning.