Crypto Lexicon
Zero-Knowledge Proofs (ZK)
A Zero Knowledge Proof (ZKP) is a cryptographic protocol that allows one party (the prover) to prove to another party (the verifier) that a specific statement is mathematically true without revealing any underlying confidential information.
The Ali Baba Cave Analogy
Imagine a circular cave with two paths (A and B) separated by a locked secret door in the middle.
- Peggy knows the secret password to open the door.
- Victor wants to verify that Peggy knows the password without Peggy revealing the password to Victor.
- Victor waits outside while Peggy walks into the cave taking either path A or B.
- Victor shouts for Peggy to exit via path A. If Peggy truly knows the secret password, she can unlock the door and exit path A every single time Victor asks, proving her knowledge with 100 percent certainty without ever revealing the secret word.
The Two Major Blockchain Applications
- Confidential Privacy: Used by privacy networks (like Zcash) to verify that a transaction is completely valid (the sender has funds, the signature is authentic) without revealing the sender address, receiver address, or transaction amount on the public ledger.
- Massive Layer 2 Scalability (ZK Rollups): Networks like zkSync and Starknet process thousands of transactions offchain, compress the entire batch into a single lightweight mathematical validity proof (ZK SNARK or ZK STARK), and post only the proof to Ethereum. Ethereum verifies thousands of transactions in a fraction of a second.
ZK SNARKs vs ZK STARKs
- ZK SNARKs: Highly compact proofs with small byte sizes, but historically required a trusted cryptographic setup ceremony.
- ZK STARKs: Larger proof sizes, but completely transparent (no trusted setup required) and mathematically resistant to future quantum computing attacks.
Explore scaling solutions in our Layer 1 and Layer 2 Blockchain Architecture Guide.
Frequently asked question
What is Zero-Knowledge Proofs (ZK)?
A Zero Knowledge Proof (ZKP) is a cryptographic protocol that allows one party (the prover) to prove to another party (the verifier) that a specific statement is mathematically true without revealing any underlying confidential information.