Digital signatures explained: a different signature for every page
A digital signature is a pair of numbers made from a message and a private key. Anyone with the matching public key can check it, but nobody can make it without the private key, and it fits only the exact message it was made for. Every Bitcoin payment carries one.
Ben has a new idea. Anna signs every payment she writes in the notebook, so Ben has studied her signature for weeks. He can copy it perfectly. One night he writes "Anna pays Ben 50" and puts her signature underneath.
The next morning every house checks the new line, and every house rejects it. Ben's copy is perfect. That's the problem. Anna's signature under "Anna pays Rosa 10" was made for that line and nothing else. Moved to another line, it simply doesn't fit.
That's the difference between ink and a digital signature. A handwritten signature looks the same on every page. A digital one is different for every page, and only fits the page it was made for.
What it is
A digital signature is a short piece of data made from two things: the message and the signer's private key. Anyone with the matching public key can check it. NIST's Digital Signature Standard says what it's for: "Digital signatures are used to detect unauthorized modifications to data and to authenticate the identity of the signatory" (NIST FIPS 186-5).
Three techniques are approved in that standard: RSA, ECDSA and EdDSA. Bitcoin uses ECDSA "with the secp256k1 curve" (Bitcoin developer guide), and also Schnorr signatures on the same curve, defined in BIP 340 for the Taproot upgrade, which have their own article.
How it works: the signature in block 170
The Bitcoin white paper defines a coin as "a chain of digital signatures", passed on by "digitally signing a hash of the previous transaction" and the next owner's public key. Then: "A payee can verify the signatures to verify the chain of ownership" (Nakamoto, 2008). Here's a real one, from the early days.
- The payment. Block 170 was mined on 12 January 2009. It holds a transaction that spends an earlier output and sends 10 bitcoin to one public key and 40 bitcoin to another (mempool.space).
- The signature. In its input sits a block of 71 bytes. Unpacked, it holds two numbers of 32 bytes each, plus a few bytes of packaging. The first number starts 4e45e169, the second 181522ec. Those two numbers are the signature.
- What got signed. Not the whole notebook and not Anna's name. The developer guide says "the entire transaction is signed except for any signature scripts", including which earlier coins are being spent (Bitcoin developer guide). The amounts are in there. So are the receivers.
- The check. Every full node takes the signed data, the two numbers and the public key of the coins being spent, and runs the checking recipe. It comes out "valid" or "invalid". Nothing in between.
- Ben's edit. Change the 10 bitcoin to 1, or swap in his own public key, and the signed data is different. The same two numbers no longer fit. To make two numbers that do fit, Ben needs the private key.
That's why the signature is different on every page. It is calculated from the page. Copying it is easy and useless.
Why it matters
Signatures replace the person who used to check handwriting. Nobody at the bank compares your scribble to a card on file. Every node checks the maths, and the maths doesn't get tired or bribed.
NIST adds a third property: "the signatory cannot easily repudiate the signature at a later time" (NIST FIPS 186-5). In the village, that cuts both ways. Anna can't later claim she never paid Rosa. And if her key leaks, the thief's signatures are just as undeniable as hers.
Who gains: anyone receiving money, who can check the payment without trusting the sender. Who pays: anyone whose private key, or the randomness behind it, is weak.
Where people get it wrong
- "A signature hides the payment." It hides nothing. The payment is in plain view. The signature only proves who approved it and that it wasn't changed afterwards.
- "Once I've signed something, the signature can be reused." It fits one message. That's what stops Ben moving it to another line.
- "The private key is the only secret." ECDSA also uses a fresh secret number for each signature. NIST says it "shall be protected from unauthorized disclosure", and warns about "insufficient randomness in the per-message secret number that would reveal a private key" (NIST FIPS 186-5). The Schnorr standard for Bitcoin puts it bluntly: "the signatures can leak the secret key through nonce reuse" (BIP 340).
- "That's an old problem." It's why RFC 6979, published in August 2013, defines "a deterministic digital signature generation procedure" that doesn't depend on fresh randomness for each signature (RFC 6979).
- "A valid signature means a legitimate payment." It means the key holder approved it. If the stranger at the gate talked you into signing, the signature is perfectly valid. The maths checks the hand, not the reason.
Read before you sign
Your wallet signs for you, so the only thing you control is what it signs. Before you confirm, read the amount and the receiving address on the wallet's own screen, ideally on a hardware device, not on the website asking you to sign. A signature is forever, and it fits exactly what was on the page.
Ben learned that the hard way: a perfect copy of Anna's signature, rejected by every house. The stranger at the gate learned the easier way. He doesn't copy signatures. He just asks you to sign his page.
Frequently asked questions
What is a digital signature?
A digital signature is data calculated from a message and a private key that proves who approved the message and that it hasn't changed. Anyone with the matching public key can check it, but only the private key holder can create it.
How does Bitcoin use digital signatures?
Every Bitcoin payment includes a signature made with the private key that controls the coins being spent. Bitcoin uses ECDSA on the secp256k1 curve, and Schnorr signatures as defined in BIP 340 for Taproot. Every full node checks each signature before accepting the transaction.
Can a digital signature be copied to another transaction?
No. The signature is calculated from the transaction data, so it only fits that exact transaction. Changing the amount or the receiver changes the data, and the old signature fails the check.
What is the difference between a digital signature and encryption?
Encryption hides a message so only the right key can read it. A digital signature hides nothing: it proves who approved a message and that it is unchanged. Bitcoin transactions are signed but not encrypted.
Why does randomness matter for ECDSA signatures?
ECDSA uses a secret number for each signature in addition to the private key. NIST's standard warns that insufficient randomness in that number can reveal the private key, and reusing it leaks the key. RFC 6979 describes a deterministic way to make that number that avoids depending on fresh randomness.
Sources
- NIST, FIPS 186-5 Digital Signature Standard (3 February 2023)
- Satoshi Nakamoto, Bitcoin: A peer-to-peer electronic cash system (2008)
- Bitcoin developer guide, Transactions
- mempool.space API, transaction f4184fc5... in block 170 (read 19 November 2026)
- T. Pornin, RFC 6979 Deterministic usage of DSA and ECDSA (August 2013)
- BIP 340, Schnorr signatures for secp256k1

