- Series
- Blockchain explained
- Lesson
- 05 of 06
- Edition
- November 2026
- References
- 5
Digital signatures: who may spend
Abstract
A private key signs and the matching public key verifies. A signature proves that the holder of the key approved exactly that message, without revealing the key.
Key points
- A key pair is a private key, kept secret, and a public key, which anyone may see.
- Only the private key can produce a signature that the public key accepts.
- The signature covers the exact message: change one character and verification fails.
- In a blockchain a transaction is valid only if it carries a signature from the key that controls the coins.
LimitsWhere this toy model differs from the real system: Limits
Two keys that belong together
Public-key cryptography uses pairs of keys created together. The private key stays with its owner; the public key can be published. Anything signed with the private key can be checked by anyone who has the public key. The public key cannot be used to sign, and the private key cannot be worked out from it.
Figure 1Try it: Sign and verify
Change the received message
Kept inside your browser’s crypto engine. It cannot be exported or sent.
Sign a message first
This widget needs JavaScript. The text of the lesson explains the same idea without it.
Sign the message, then change the received copy by one character: verification fails. Switch to someone else’s public key: it fails too. A valid signature ties this exact message to this exact key.
What signatures do in a blockchain
A blockchain has no accounts protected by passwords. Coins are locked to a public key; in Bitcoin, usually to an address derived from the hash of a public key. To spend them, a transaction must carry a signature made with the matching private key, and every node checks that signature before accepting the transaction. So nobody can spend coins locked to someone else’s key, not even a miner with enormous computing power.
Signatures decide who may spend; proof of work decides the order of the transactions. And whoever holds the private key controls the coins: if the key is lost, nobody can sign for them again, and if it is stolen, the thief can.
Limits
Sources
Primary sources this lesson is based on.
- NIST FIPS 186-5, Digital Signature Standard (DSS) (opens in a new tab)
- RFC 6979, Deterministic Usage of DSA and ECDSA (opens in a new tab)
- SEC 2: Recommended Elliptic Curve Domain Parameters (secp256k1) (opens in a new tab)
- BIP 340: Schnorr Signatures for secp256k1 (opens in a new tab)
- Satoshi Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System (2008), section 2 (opens in a new tab)