๐ญ Zero-Knowledge Proofs
Proving you know a secret without revealing the secret itselfโฑ ~3 min
Imagine Ali Baba's cave โ a circular tunnel with one entrance. The path splits left and right inside, connected in the back. Peggy claims to know the magic word that opens the inner door. Victor wants to verify without learning the word. Peggy enters the tunnel while Victor stays outside. Victor shouts which path to exit from. If Peggy always appears from the right path regardless of which way she went in, she must know the magic word โ after 20 rounds, the probability she's just lucky is 1 in 2^20. No word was ever revealed.
What Is a Zero-Knowledge Proof?
A Zero-Knowledge Proof (ZKP) is a cryptographic protocol where a prover convinces a verifier that a statement is true, without revealing any information beyond the truth of the statement. Three properties must hold:
| Property | What It Means |
|---|---|
| Completeness | If the statement is true, an honest prover can always convince the verifier |
| Soundness | If the statement is false, no cheating prover can convince the verifier (except with negligible probability) |
| Zero-Knowledge | The verifier learns nothing about the witness (secret) beyond the fact that the statement is true |
Modern ZKP Systems
| Type | Full Name | Key Property | Used In |
|---|---|---|---|
| zk-SNARKs | Succinct Non-interactive Arguments of Knowledge | Tiny proof size, fast verification, requires trusted setup | Zcash privacy coin, Ethereum rollups |
| zk-STARKs | Scalable Transparent Arguments of Knowledge | No trusted setup, post-quantum secure, larger proofs | StarkNet, validity rollups |
| Bulletproofs | โ | No trusted setup, small proofs for range proofs | Monero, Confidential Transactions |
Real-World Applications
- โขPrivacy-preserving authentication โ prove you're over 18 without revealing your birthdate or ID
- โขBlockchain privacy โ Zcash's shielded transactions prove a transaction is valid without revealing sender, receiver, or amount
- โขEthereum Layer 2 scaling โ zkEVM rollups (zkSync, Polygon zkEVM) prove thousands of transactions are valid in a single proof, posted to Ethereum mainchain
- โขPrivate credentials โ prove you have a valid driver's license without showing the license; prove you pass a background check without revealing the check details
- โขVerifiable computation โ prove a machine learning model was trained on specific data without revealing the data or the model weights
A zero-knowledge proof lets you proveโฆ