What is a Zero-Knowledge Proof?
A Zero-Knowledge Proof (ZKP) is a cryptographic technique that allows one party (the prover) to prove to another party (the verifier) that a statement is true, without revealing any information beyond the validity of the statement itself.
The Classic Analogy: Ali Baba’s Cave
Imagine a circular cave with a door in the middle that requires a password to open. Alice wants to prove to Bob that she knows the password, without revealing it:
- Alice enters the cave from one side
- Bob stands outside and shouts which side Alice should exit from
- If Alice knows the password, she can always exit from the correct side
Repeating this many times proves with high probability that Alice knows the password — yet Bob never learns it.
Properties of ZKPs
- Completeness: If the statement is true, an honest verifier will be convinced.
- Soundness: If the statement is false, no cheating prover can convince an honest verifier.
- Zero-Knowledge: The verifier learns nothing beyond whether the statement is true.
Types of ZKPs
| Type | Use Case | Example |
|---|---|---|
| zk-SNARK | Scalable, compact proofs | Zcash, zkSync |
| zk-STARK | No trusted setup, post-quantum | StarkNet |
| Bulletproofs | No trusted setup, slower | Monero |
Applications in Web3
- Privacy coins: Hide sender, receiver, and amount (Zcash, Monero)
- zk-Rollups: Compress thousands of transactions into a single proof (zkSync, StarkNet, Polygon zkEVM)
- Identity: Prove you’re over 18 without revealing your age or identity
- Compliance: Prove solvency without revealing balances