Zero knowledge proofs explained simply: a zero-knowledge proof lets one party (the prover) convince another (the verifier) that a statement is true without revealing anything beyond the fact that it is true. You can prove you know a password, or that a transaction is valid, without showing the password or the transaction details.
Blockchains use this idea for privacy and for scaling. Privacy coins hide amounts and senders, and rollups compress thousands of transactions into one short proof that the base chain can check cheaply.
A classic explanation is a circular cave with one entrance that splits into a left and right path. The paths meet at a door that opens only with a secret word.
After 20 rounds, a cheater passes with probability 1 in about a million (2^-20), yet Victor learned nothing about the word. He could not even convince a third person, because he could have faked a video of the rounds.
Every zero-knowledge proof system must satisfy:
| Property | Meaning |
|---|---|
| Completeness | If the statement is true, an honest prover convinces an honest verifier |
| Soundness | If the statement is false, no cheating prover can convince the verifier, except with negligible probability |
| Zero knowledge | The verifier learns nothing except that the statement is true |
Zero knowledge is formalised with a simulator: if the verifier could have produced an identical transcript on its own without the secret, then the transcript leaks nothing.
The cave needs back-and-forth rounds. A blockchain cannot ask a prover questions, so practical systems are non-interactive: the prover generates one proof that anyone can verify later.
The standard trick is the Fiat-Shamir transform. Instead of the verifier choosing random challenges, the prover derives the challenge by hashing the earlier messages. Because the hash output cannot be predicted, it acts like a random verifier.
Schnorr's identification protocol shows the core idea in a few lines. The prover knows x such that y = g^x mod p.
r and sends t = g^r mod p.c.s = r + c * x (mod the group order).g^s == t * y^c.The response s looks random because r is random, so it does not reveal x. This is a toy group and offers no security; it only shows the structure.
Modern proofs can show that an arbitrary computation was done correctly, not just a single formula.
| Feature | zk-SNARK | zk-STARK |
|---|---|---|
| Proof size | Very small (hundreds of bytes) | Larger (tens to hundreds of kilobytes) |
| Verification | Very fast | Fast, scales well |
| Trusted setup | Needed for some schemes (Groth16), not for others | Not needed (transparent) |
| Quantum resistance | Elliptic curve based ones are not | Hash based, believed resistant |
The computation is first turned into an arithmetic circuit or constraint system. The prover then shows it knows an assignment that satisfies all constraints, and the proof system makes the check cheap.
No. Encryption hides data so it can be decrypted later. A proof shows a fact about hidden data and never needs decryption.
Proofs are probabilistic or computational. The chance of a false proof being accepted is made negligibly small, such as below 2^-128.
SNARKs give smaller proofs but often need a trusted setup. STARKs are transparent and hash based, with larger proofs.
No. Developers usually use frameworks that compile programs to circuits, but knowing the three properties helps you reason about guarantees.
A zero-knowledge proof convinces a verifier that a statement is true while revealing nothing else. It must be complete, sound and zero knowledge. Fiat-Shamir makes proofs non-interactive, and SNARKs and STARKs let blockchains use them for privacy and rollup scaling.