Zero-Knowledge Proofs: Interactive Protocols and Proof Systems
Anchor (Master): Arora and Barak 2009 Computational Complexity: A Modern Approach (Cambridge) Ch. 8; Goldreich, Micali and Wigderson 1991 Proofs that Yield Nothing But Their Validity (JACM); Blum, Feldman and Micali 1988 Non-Interactive Zero-Knowledge and Its Applications (FOCS)
Intuition Beginner
You want to prove to a friend that you solved a Sudoku puzzle without revealing the solution. Zero-knowledge proofs make this possible. You convince the verifier that a statement is true while revealing nothing beyond its truth.
The classic example is the cave. Imagine a circular cave with a magic door in the middle that requires a secret password to open. You want to prove you know the password without revealing it. Your friend stands outside the cave and watches you enter from one side. They then shout "come out the left!" or "come out the right!" at random. If you know the password, you can always comply (opening the door if needed). If you do not know it, you can only comply half the time (when they ask for the side you entered from). Repeating this 20 times, the probability of fooling your friend drops to less than one in a million.
A zero-knowledge proof has three properties. Completeness: an honest prover with a valid proof convinces an honest verifier. Soundness: a cheating prover cannot convince the verifier of a false statement. Zero-knowledge: the verifier learns nothing beyond the truth of the statement, because everything they saw could have been simulated without the prover.
The deep result is that every NP statement has a zero-knowledge proof. You can prove you know a 3-colouring of a graph, a satisfying assignment for a formula, or a Hamiltonian cycle, without revealing any information about the witness.
Visual Beginner
Zero-knowledge proof for Graph 3-Colouring:
Prover has: valid 3-colouring (R, G, B) of the graph
Verifier sees: the graph (but not the colouring)
Round i:
1. Prover: randomly permute colours (R->B, G->R, B->G)
2. Prover: commit to each vertex's permuted colour
3. Verifier: pick a random edge (u, v)
4. Prover: open commitments for u and v
5. Verifier: check u and v have different colours
If graph IS 3-colourable: prover always passes (colours differ)
If graph is NOT 3-colourable: >= 1 edge has same colour
Verifier catches this with prob >= 1/|E| per round| Property | Meaning | How it holds |
|---|---|---|
| Completeness | True statement: honest prover convinces verifier | Valid 3-colouring means every edge has different colours |
| Soundness | False statement: cheating prover caught with high prob | Invalid colouring has at least one bad edge, verifier finds it |
| Zero-knowledge | Verifier learns nothing beyond validity | Simulator picks random edge first, colours only that edge correctly |
Worked example Beginner
We do a zero-knowledge proof that the graph (triangle with vertices ) is 3-colourable. The actual colouring is: .
Round 1. Prover picks permutation : swap R and G, keep B. New colours: . Prover commits to each: . Sends commitments to verifier.
Verifier picks edge . Prover opens and . Verifier checks: . Pass.
Round 2. Prover picks new permutation : rotate . New colours: . Commits and sends.
Verifier picks edge . Prover opens: . Verifier checks: . Pass.
After many rounds, the verifier is convinced. But the verifier never sees the original colouring, only random permutations of it. Each opened pair is consistent with many possible colourings, so no information about the original is revealed.
Check your understanding Beginner
Formal definition Intermediate+
Definition (interactive proof system). An interactive proof system for a language is a pair where is computationally unbounded and is PPT, satisfying:
- (Completeness) For every : .
- (Soundness) For every and every : .
Definition (computational zero-knowledge). An interactive proof for is computational zero-knowledge if there exists a PPT simulator such that for every PPT , the following distributions are computationally indistinguishable:
Definition (commitment scheme). A commitment scheme is a pair where produces a commitment to message using randomness , satisfying:
- (Binding) It is computationally infeasible to find with and .
- (Hiding) and are computationally indistinguishable for any .
Counterexamples to common slips
"Zero-knowledge means the proof reveals no information." The proof reveals that the statement is true. Zero-knowledge means the proof reveals nothing beyond the truth of the statement. The distinction matters.
"Any interactive proof is zero-knowledge." No. A standard interactive proof may leak information about the witness. Zero-knowledge is an additional property requiring the existence of a simulator.
"Zero-knowledge proofs are always non-interactive." The basic definition is interactive. Non-interactive zero-knowledge (NIZK) is a special case requiring a common reference string. The Fiat-Shamir heuristic converts some interactive ZK proofs to non-interactive ones in the random oracle model.
Key theorem with proof Intermediate+
Theorem (GMW: every NP language has a ZK proof). Assuming one-way functions exist, every language in NP has a computational zero-knowledge proof system.
Proof sketch. By NP-completeness, it suffices to give a ZK proof for Graph 3-Colouring (3COL). The reduction from any NP language to 3COL is polynomial-time.
Protocol. Let be a graph and a valid 3-colouring (the witness). Repeat times:
- Prover picks a random permutation of and commits to for each .
- Verifier picks a random edge .
- Prover opens the commitments for and .
- Verifier checks .
Completeness. If is valid, for every edge, so . The verifier always accepts.
Soundness. If is not 3-colourable, every colouring has at least one edge with the same colour on both endpoints. The verifier finds this edge with probability at least per round. Over rounds, the probability the cheating prover escapes is at most , which is negligible.
Zero-knowledge. The simulator for a single round works as follows: pick a random edge and a random pair of distinct colours . Commit to for , for , and random values for all other vertices. Run the verifier to get its query edge . If , output the transcript. Otherwise, rewind and try again.
The simulator succeeds with probability per attempt, so the expected number of attempts is . The output distribution is identical to the real interaction because: (1) the permutation is random in both, (2) the opened colours are a random pair of distinct colours in both, and (3) the unopened commitments are computationally hiding in both.
The commitment scheme exists if one-way functions exist (by Naor's theorem, 1991).
Bridge. The GMW theorem is the foundational reason zero-knowledge is universal for NP: by reducing any NP statement to 3-colouring and applying the commitment-based protocol, every claim of the form "I know a witness for " can be proven without revealing the witness. This builds toward the broader theory of cryptographic protocols where ZK proofs are composed into secure multiparty computation, and this is exactly the pattern that appears again in 47.06.04 where the Fiat-Shamir heuristic converts interactive ZK protocols into digital signatures. The central insight is that commitment schemes (which exist iff OWFs exist) provide the hiding and binding properties that make zero-knowledge possible, and putting these together with the interactive proof framework of 47.03.04 shows that ZK proofs add a privacy layer on top of the IP framework: IP = PSPACE captures what can be proved, while ZK captures what can be proved privately.
Exercises Intermediate+
Lean formalization Intermediate+
Mathlib has no formalization of zero-knowledge proofs, interactive proof systems, commitment schemes, or simulators. A formalization would require an InteractiveProtocol typeclass with prover and verifier as probabilistic computations, a ZeroKnowledge predicate requiring the existence of a simulator, and a computational indistinguishability relation on distributions of transcripts. The foundational gap is the absence of any ProbabilisticComputation monad in Mathlib's type theory. This unit ships without a lean_module.
Advanced results Master
Three directions extend the ZK framework.
Result 1 (NIZK and the common reference string). Blum, Feldman and Micali (1988) introduced non-interactive zero-knowledge proofs in the common reference string (CRS) model. The prover sends a single message, and the verifier checks it using a publicly known CRS. The CRS is generated by a trusted setup. Feige, Lapidot and Shamir (1990) showed that every NP language has a NIZK in the CRS model assuming one-way functions. NIZKs are essential for efficient cryptographic protocols because they eliminate the interaction rounds [Arora-Barak Ch. 8].
Result 2 (zk-SNARKs). Succinct Non-interactive ARguments of Knowledge (SNARKs) are NIZKs with sublinear proof size and sublinear verification time. The construction of Bitansky, Canetti, Chiesa and Tromer (2012) uses arithmetic circuit satisfiability and elliptic curve pairings. A zk-SNARK for an NP statement of size has proof size group elements and verification time pairings plus input processing. zk-SNARKs are used in blockchain systems (Zcash, Ethereum) for privacy-preserving transactions [Arora-Barak Ch. 8].
Result 3 (ZK and secure multiparty computation). The GMW theorem extends beyond proofs to computation: Goldreich, Micali and Wigderson (1987) proved that any polynomial-time function can be computed by parties such that each party learns only the output and nothing about other parties' inputs. The construction uses ZK proofs as a subroutine to enforce honest behaviour. This is the foundational result of secure multiparty computation (MPC), with applications to privacy-preserving machine learning, threshold cryptography, and distributed voting [Arora-Barak Ch. 8].
Synthesis. Zero-knowledge proofs are the foundational reason privacy and verification can coexist: the simulator paradigm ensures that interaction reveals nothing beyond the statement's truth, and this builds toward the entire field of privacy-preserving cryptography where ZK proofs compose into MPC, NIZK, and SNARKs. The central insight is that the three properties (completeness, soundness, zero-knowledge) are not in tension: the same commitment scheme that enables soundness (binding) also enables zero-knowledge (hiding), and this is exactly the pattern that appears again in 47.06.01 where one-way functions provide both pseudorandomness and one-wayness. Putting these together with the interactive proof theory of 47.03.04 shows that ZK proofs are interactive proofs refined with a privacy guarantee, and the fact that every NP statement has a ZK proof means that privacy is free: any proof can be made zero-knowledge without changing what can be proved, only how it is proved.
Full proof set Master
Proposition 1 (GMW protocol for 3COL is zero-knowledge). The GMW protocol for Graph 3-Colouring is computational zero-knowledge assuming computationally hiding commitments.
Proof. We construct a simulator for a single round. receives and has black-box access to verifier .
picks a random edge and random distinct colours . For all other vertices , commits to a random colour. sends all commitments to and receives its challenge edge .
If , opens the commitments for and (revealing ) and outputs the transcript. If , rewinds to the beginning and tries again.
Success probability. Each attempt succeeds with probability at least (the probability picks the edge prepared). Expected number of attempts: .
Indistinguishability. The real transcript has: commitments to for random , opened colours for the queried edge. The simulated transcript has: commitments to random values (except the prepared edge), opened colours (random distinct pair). By the hiding property of commitments, the unopened commitments are indistinguishable in both distributions. The opened colours are uniformly random distinct pairs in both. So the full transcripts are computationally indistinguishable.
Proposition 2 (composition of ZK proofs). If is a ZK proof for and is a ZK proof for , then the parallel composition (run both protocols simultaneously) is a ZK proof for .
Proof. The composed simulator runs and independently to simulate the transcripts for both protocols. Since 's output is indistinguishable from the real - interaction, and 's output is indistinguishable from the real - interaction, the joint output is indistinguishable from the real joint interaction by the hybrid argument (replace one protocol's transcript at a time).
Connections Master
47.06.01— One-way functions provide the commitment schemes needed for ZK proofs; the GMW theorem that every NP language has a ZK proof is conditional on OWF existence.47.03.04— IP = PSPACE establishes the power of interactive proofs; ZK proofs add the zero-knowledge property, showing that privacy is compatible with the full power of IP.47.06.02— The discrete logarithm setting provides the algebraic structure for Schnorr protocols, which are efficient Sigma protocols (a subclass of ZK proofs).47.06.04— Digital signatures can be derived from ZK proofs via the Fiat-Shamir heuristic, converting interactive ZK into non-interactive authentication.
Historical & philosophical context Master
Zero-knowledge proofs were introduced by Goldwasser, Micali and Rackoff (1985) in their paper "The Knowledge Complexity of Interactive Proof Systems." The concept was initially met with scepticism—the idea that one could prove knowledge without revealing it seemed paradoxical. The GMW theorem (1986, published 1991) established that ZK proofs exist for all of NP, transforming the concept from a curiosity into a fundamental tool.
The philosophical significance is that knowledge and privacy are not in conflict. Any proof can be restructured to reveal nothing beyond its conclusion. This has profound implications: in principle, every authentication, verification, and audit process can be performed without exposing private data. The gap between principle and practice is engineering, not theory [Arora-Barak Ch. 8].
The development of zk-SNARKs (2012-2013) brought ZK proofs into practical use. Zcash (2016) was the first large-scale deployment, using zk-SNARKs to prove transaction validity without revealing sender, receiver, or amount. The technology has since spread to Ethereum, where zk-rollups use SNARKs for scalability and privacy.
Bibliography Master
@book{arora2009computational,
author = {Arora, Sanjeev and Barak, Boaz},
title = {Computational Complexity: A Modern Approach},
publisher = {Cambridge University Press},
year = {2009},
}
@article{goldwasser1989knowledge,
author = {Goldwasser, Shafi and Micali, Silvio and Rackoff, Charles},
title = {The Knowledge Complexity of Interactive Proof Systems},
journal = {SIAM Journal on Computing},
volume = {18},
number = {1},
pages = {186--208},
year = {1989},
}
@article{goldreich1991proofs,
author = {Goldreich, Oded and Micali, Silvio and Wigderson, Avi},
title = {Proofs that Yield Nothing But Their Validity or All Languages in {NP} Have Zero-Knowledge Proof Systems},
journal = {Journal of the ACM},
volume = {38},
number = {3},
pages = {691--729},
year = {1991},
}
@inproceedings{blum1988noninteractive,
author = {Blum, Manuel and Feldman, Paul and Micali, Silvio},
title = {Non-Interactive Zero-Knowledge and Its Applications},
booktitle = {Proceedings of the 20th ACM Symposium on Theory of Computing},
year = {1988},
pages = {103--112},
}