← back to crypto

Zero-Knowledge Proofs

Wikipedia (CC BY-SA 4.0) ยท wpZero-knowledge proof

A zero-knowledge proof lets you prove you know a secret without revealing the secret itself. The verifier learns nothing except that the statement is true. This is one of the deepest ideas in cryptography: conviction without information.

entrance Path A Path B magic door (secret) Verifier Prover challenge: "come out A" exits A (used door)

The Ali Baba cave

Imagine a circular cave with a magic door at the back. The prover enters and takes path A or B (the verifier does not see which). The verifier shouts "come out path A" or "come out path B." If the prover knows the secret to open the door, they can always comply. If they do not, they have a 50% chance of being on the wrong side. After 20 rounds, a fake prover's odds of passing are less than one in a million.

Scheme

Interactive vs non-interactive

The cave protocol is interactive: the verifier must be online, issuing fresh challenges. A non-interactive proof replaces the verifier with a hash function (the wpFiat-Shamir heuristic). The prover hashes the commitment to generate their own challenge. Anyone can verify the proof later without interaction.

Scheme

ZK-SNARKs

ZK-SNARK stands for Zero-Knowledge Succinct Non-interactive Argument of Knowledge. "Succinct" means the proof is tiny (a few hundred bytes) regardless of the computation's size. "Non-interactive" means no back-and-forth. ZK-SNARKs let you prove you ran an arbitrary computation correctly, without revealing the inputs.

Scheme
Neighbors

This series

Foundations (Wikipedia)