The one-sentence version
The Schnorr protocol lets you prove "I know such that " without revealing itself. There are only three steps: commit, challenge, respond. Replace the verifier's challenge with a hash (the Fiat–Shamir transform) and the proof becomes a signature. Bitcoin's Taproot upgrade uses exactly this Schnorr signature, whose linear structure lets multiple signatures merge into one.
This article has three layers:
- The intuition: a three-step conversation that is convincing yet reveals nothing
- Real-world use: Bitcoin Taproot, MuSig2, Ed25519
- The mathematics: the protocol, soundness (the extractor), zero knowledge (the simulator), Fiat–Shamir and a worked example
Layer 1: The Intuition
1.1 Proving you know a password without saying it
You want to prove to a guard that you know the combination to the company safe, without telling him the combination. The Schnorr protocol offers a three-step conversation:
- Why it is convincing: the prover must fix before seeing the challenge. Without knowing , they could only try to guess the challenge, and the challenge space is so huge that a correct guess is almost impossible.
- Why it reveals nothing: in the response , is "covered" by a random number , so looks like a uniformly random number.
1.2 From conversation to signature
The conversation needs a verifier online to set the question. Fiat and Shamir's idea: let a hash function set the question, with . A hash's output can't be predicted, so the effect is the same as an honest verifier. The prover can now generate alone, and anyone can check it afterwards. This is a digital signature.
Layer 2: Real-World Use
- Bitcoin Taproot (BIP 340, activated in 2021): introduced Schnorr signatures on secp256k1.
- MuSig2: the Schnorr signatures of several people can merge into one ordinary signature, which looks on-chain exactly like a single-person transaction, saving space and improving privacy. It works because Schnorr's response is linear in the private key: .
- FROST: a threshold signature protocol for Schnorr, using Shamir's secret sharing to achieve "any 3 of 5 people can sign".
- Ed25519 (EdDSA): used by SSH, Signal, Tor and many blockchains. It is a variant of Schnorr in which the random is instead generated deterministically from the private key and message hash.
Why Bitcoin didn't use Schnorr at first
Schnorr filed for a patent in 1989, which expired only in 2008. In the meantime the industry turned to the patent-avoiding DSA / ECDSA, which are structurally more complex and lack the clean linearity. When Bitcoin was born in 2009, Schnorr still had no mature standardized implementation, so ECDSA stayed.
Layer 3: The Mathematics
3.1 The protocol
Let be a cyclic group of prime order (a subgroup of or an elliptic curve group), with private key and public key .
- Commit: pick a random and send ;
- Challenge: the verifier sends a random ;
- Respond: send ;
- Verify: .
Correctness: .
3.2 Soundness: if you can answer two questions, you must know
Suppose a prover can answer two different challenges for the same , giving . Then
So anyone who "can fool the verifier" can in fact compute . This is called special soundness, and the procedure that computes is called the extractor. It uses the fact that is prime, so is invertible in .
3.3 Zero knowledge: an identical conversation without knowing
The simulator works backwards: first pick random and , then let . These three numbers satisfy the verification equation, and their distribution is exactly the same as a real conversation ( and are uniformly random, and is determined by them).
Since someone who doesn't know can produce transcripts with the same distribution, a real conversation can't reveal anything about . This is how zero knowledge is defined. (Strictly speaking, the Schnorr protocol is "honest-verifier zero knowledge".)
3.4 The Fiat–Shamir transform: becoming a signature
Replace the challenge with :
- Signature: or , where ;
- Verification: recompute and check .
In the random oracle model, forging a signature is equivalent to solving the discrete logarithm.
3.5 A worked example
, ,
, so has order in .
Keys: private key , public key .
Signing (suppose the hash gives ):
- Pick ,
Verification:
- Left side:
- Right side: . , so
- Equal ✓
The disaster of reusing : sign another message with the same ; the hash gives and . An attacker sees that the two signatures have the same and applies the extractor from section 3.2: and (), so , and the private key is recovered.
The "extractor" in the soundness proof is, in the real world, the attacker. (Checked with Python.)
Summary
| Layer | Key points |
|---|---|
| Intuition | Commit, challenge, respond; is fixed before the question is seen, so cheating fails |
| Soundness | Two answers for the same solve for (the extractor) |
| Zero knowledge | Fake conversations built backwards have the same distribution as real ones (the simulator) |
| Engineering | Fiat–Shamir yields signatures; linearity gives MuSig2 and FROST; must never repeat |