Zero-Knowledge Proofs
Convince someone that a statement is true while revealing nothing at all beyond the fact of its truth — not even a hint of why.
Why This Matters
A zero-knowledge proof can establish a statement without revealing additional information about its secret witness. Unlike encryption, its purpose is not to deliver the secret to the verifier. The exact guarantee depends on the protocol and on the verifier model.
The consequence is a whole category of systems that were previously unbuildable — proving you are over eighteen without revealing your birthday, proving a transaction is valid without revealing who paid whom, proving a computation ran correctly without repeating it.
Goldwasser, Micali and Rackoff introduced the idea in their 1985 paper. Their contribution was not a protocol so much as a definition: a way to say precisely what ‘revealed nothing' means. Claus-Peter Schnorr gave a compact and practical instance in 1989, and its non-interactive form became the template for a great many modern signature schemes. Later succinct argument systems, including zk-SNARKs, developed different efficiency and setup tradeoffs and became building blocks for blockchain applications.
A zero-knowledge proof must satisfy three properties at once, and the third is the hard one:
- Completeness — an honest prover convinces the verifier with the probability required by the protocol. Perfect completeness means this probability is one.
- Soundness — false statements are accepted only with bounded probability. A proof of knowledge additionally formalizes possession of a witness.
- Zero knowledge — the verifier learns nothing they could not have produced alone.
This Schnorr identification example has perfect completeness, a knowledge-soundness argument and honest-verifier zero knowledge. The prover knows x; everyone knows y = gx. The prover commits to a random r by sending t = gr. The verifier replies with a random challenge c. The prover answers s = (r + cx) mod q, where q is the group order, and the verifier checks:
gs = t · yc (mod p)
An honest transcript can be simulated without the witness, which is the honest-verifier zero-knowledge argument. Two accepting responses to distinct challenges for the same commitment allow extraction of the discrete logarithm. Impersonation security additionally relies on that logarithm being hard to compute in the selected group.
Arithmetic runs in a group of prime order 233 modulo 467 — small enough to print every value. Its small group and teaching randomness are not secure parameters. Choose a secret, then play as an honest prover or as a cheat who does not know it.
Press Prove honestly.
Here is the argument that makes ‘zero knowledge' precise, and it is genuinely surprising. Take the protocol's steps out of order: choose the challenge and the response first, then work backwards to the commitment that makes the check succeed. The resulting transcript passes verification perfectly — and it was produced by someone with no secret at all.
For this interactive protocol with an honestly sampled uniform challenge, the simulator produces the same transcript distribution without the secret. This establishes honest-verifier zero knowledge; it is not by itself a proof for every malicious verifier. A recording of this exchange is not transferable evidence of knowledge, because a third party could have simulated it. That differs from a properly constructed non-interactive signature, whose public verification is intended to be transferable.
Forge a transcript and check it against the same verifier.
The displayed attack guesses a uniform response, succeeding with probability 1/233 for each fixed commitment and challenge. This is not an upper bound on all attackers: the tiny group here lets an attacker enumerate the secret and then always answer correctly. In a real protocol, impersonation bounds depend on the discrete-log assumption, challenge space and attack model.
The Fiat–Shamir transform derives a challenge by hashing the commitment together with the public statement and required application context. A signature must bind the message as well. Domain separation and unambiguous encodings matter. The prover can try different commitments, but should not be able to choose a useful challenge cheaply under the proof's hash model. A random-oracle proof is a conditional security argument, not a proof that a concrete hash is an ideal oracle.
Succinct proof systems add their own concerns. Many pairing-based zk-SNARKs require a trusted setup whose discarded randomness would forge arbitrary proofs if retained — the reason for elaborate multi-party ceremonies. Transparent systems such as STARKs avoid that setup entirely, at the cost of larger proofs. Pairing-based constructions also inherit the discrete logarithm's vulnerability to quantum attack, while suitably designed hash-based systems avoid that particular attack; their post-quantum security still depends on parameters and assumptions.
Zcash uses zero-knowledge proofs for shielded transactions. Validity rollups can prove that batches of transactions executed correctly; optimistic rollups use a different mechanism. Anonymous credentials can prove attributes without disclosing the full credential. Schnorr and EdDSA signatures use related commitment-and-challenge ideas, but it is misleading to call every signature a zero-knowledge transcript with the guarantees of this interactive demonstration.
Claim: ‘I know x with gx = y.'
Three messages: commit, challenge, respond.
Completeness: honest provers always pass.
Displayed attack: uniform response guessing succeeds with probability 1/233; the tiny group permits better attacks.
Honest-verifier zero knowledge: a simulator matches the honest transcript distribution without knowing the witness.
The mathematics is in the Hall of Foundations: pairings used by some succinct proof systems, and the oracle Fiat–Shamir leans on.
Primary Sources
RFC 8235 (Schnorr NIZK proof, 2017); RFC 8032 (EdDSA, 2017). These specify related but distinct constructions; this page implements only the small interactive teaching model.
Sources and Reading
Dan Boneh and Victor Shoup, A Graduate Course in Applied Cryptography, version 0.6 (January 2023), §19.1, Theorem 19.1, and §19.1.1: Schnorr identification, extraction and honest-verifier zero knowledge.