Zero-knowledge proof

Also known as: ZKP

On this page 8

A zero-knowledge proof (ZKP) is a cryptographic protocol in which a prover convinces a verifier that a statement is true while revealing nothing beyond the truth of that statement. In cryptography and cybersecurity, ZKPs make it possible to prove possession of a password, a private key, a valid credential or a correct computation without disclosing the secret or the underlying data.

The concept was introduced by Goldwasser, Micali and Rackoff in 1985 and has since moved from theory into authentication protocols, privacy-preserving credentials and blockchain scaling. Every zero-knowledge proof must satisfy three formal properties, and the way a scheme achieves them determines its proof size, speed and trust assumptions.

The three properties of a zero-knowledge proof

A protocol qualifies as a zero-knowledge proof only when it is complete, sound and zero-knowledge at the same time. Completeness and soundness make it a proof system at all; the zero-knowledge property is what makes it private.

The following table summarizes what each property guarantees and which party it protects.

PropertyGuaranteeProtects
CompletenessAn honest prover with a true statement always convinces an honest verifierProver
SoundnessA cheating prover with a false statement succeeds only with negligible probabilityVerifier
Zero-knowledgeThe verifier learns nothing it could not have simulated aloneProver
Knowledge soundnessThe prover must actually know a witness, not merely that one existsVerifier
Formal properties of zero-knowledge proofs

The zero-knowledge property is defined through a simulator: an algorithm that, without the secret, produces transcripts indistinguishable from real interactions. If such a simulator exists, the real transcript cannot carry information about the secret. Depending on how close the simulated and real distributions are, zero-knowledge is classified as perfect, statistical or computational.

How interactive and non-interactive proofs work

Classic ZKPs follow a commit, challenge and response pattern. The prover commits to a random value, the verifier sends a random challenge, and the prover answers in a way that is only possible with knowledge of the secret. The Schnorr identification protocol is the standard example: it proves knowledge of a discrete logarithm, which is exactly the relationship between a private key and its public key.

A single round of many protocols leaves a cheating prover a meaningful chance of guessing the challenge, so rounds are repeated to shrink the soundness error. With a binary challenge, 40 rounds reduce the cheating probability to about one in a trillion. Schnorr-type protocols use large challenge spaces, so one round already gives negligible soundness error.

Interaction is impractical for signatures and blockchains, so the Fiat-Shamir transform replaces the verifier’s random challenge with a hash function applied to the transcript. The result is a non-interactive zero-knowledge proof (NIZK) that anyone can verify later. Its security relies on modeling the hash as a random oracle, and careless implementations that omit public inputs from the hash have produced real forgery vulnerabilities.

Main families of modern ZKP systems

Modern general-purpose proof systems can prove any statement expressed as an arithmetic circuit, such as “this transaction batch was executed correctly”. They differ mainly in proof size, verification cost and setup assumptions, as the table below shows.

FamilyProof sizeTrusted setupPost-quantum security
zk-SNARK (Groth16)About 200 bytesRequired per circuitNo
PLONK-style SNARKsAbout 0.5-1 KBUniversal, updatableNo
zk-STARKTens to hundreds of KBNone (transparent)Plausibly yes
BulletproofsAbout 0.7-2 KBNoneNo
Sigma protocolsSmall, statement-specificNoneNo
Comparison of common zero-knowledge proof families

SNARKs (succinct non-interactive arguments of knowledge) rely on elliptic curve pairings and offer tiny proofs with verification in milliseconds. STARKs rely only on hash functions, which removes the trusted setup and resists known quantum attacks, at the cost of much larger proofs. Proof generation for large circuits remains computationally expensive in every family, often seconds to minutes on specialized hardware.

ZKPs are often confused with encryption or signatures, but they solve a different problem: proving a fact without disclosure. The comparison below places them among neighboring cryptographic tools.

TechniqueMain purposeWhat the other party learns
Zero-knowledge proofProve a statement is trueOnly that the statement holds
Digital signatureProve origin and integrity of a messageMessage, signature and public key
Symmetric encryptionKeep data confidentialNothing without the key
Password hashingStore verifiers for passwordsThe password itself at login
Homomorphic encryptionCompute on encrypted dataEncrypted result only
How ZKPs differ from related cryptographic tools

The relationship is close in practice: a Schnorr signature is a non-interactive ZKP of knowledge of a private key bound to a message. Password-authenticated key exchange protocols also borrow zero-knowledge ideas so that a server never receives the plaintext password during login.

Practical applications in cybersecurity

Zero-knowledge proofs are deployed wherever verification and privacy conflict. Typical uses include the following:

  • Anonymous credentials that prove an attribute, such as age over 18, without revealing a birth date or identity.
  • Validity rollups that compress thousands of blockchain transactions into one proof checked on chain.
  • Private transactions that hide sender, receiver and amount while proving that no value was created.
  • Proof of solvency for custodians that shows reserves exceed liabilities without listing accounts.
  • Verifiable computation, where a client checks outsourced work far faster than redoing it.

Choosing a scheme is an engineering decision driven by verifier cost, prover cost and trust model. The following decision table reflects common practice.

SituationTypical choiceReason
Proof verified on a blockchainGroth16 or PLONKSmallest proofs and cheapest verification
No trusted party acceptableSTARK or BulletproofsTransparent setup
Proving knowledge of one keySchnorr protocolSimple, fast and well analyzed
Long-term quantum concernHash-based STARKNo reliance on discrete logarithms
Selecting a zero-knowledge approach

Limitations, risks and common misconceptions

A ZKP proves only the statement encoded in its circuit, so a bug in the circuit is a bug in the proof. Under-constrained circuits, where some values are not fully checked, are the most frequent vulnerability class in audited ZK systems and can let an attacker prove false statements that still verify.

A compromised trusted setup is another serious risk: anyone who keeps the secret setup randomness, often called toxic waste, can forge proofs undetectably. Multi-party ceremonies mitigate this because security holds if at least one participant destroys their share. Finally, zero knowledge hides the witness but not metadata such as timing, proof size or which circuit was used, and a common misconception holds that ZKPs encrypt data, which they do not.

A non-technical view

Imagine proving that you know the password to a locked door without ever saying the password aloud. You simply walk through the door several times while someone watches from outside. They become convinced you know it, yet they learn nothing they could use to open the door themselves.

A zero-knowledge proof does the same with mathematics. One side proves a fact, the other side becomes certain, and no secret changes hands. This lets people prove their age, their right to access a system or the correctness of a calculation while keeping the private details private.

A concrete example

A national digital identity wallet needs to let citizens buy age-restricted products online without disclosing their names or birth dates. The issuing authority signs each citizen’s credential once. When a shopper checks out, the wallet generates a zero-knowledge proof that the signed birth date is more than 18 years ago, along with a fresh nonce from the shop to prevent replay.

The shop’s server verifies the proof in a few milliseconds and receives only a yes or no answer. It never stores a birth date, a name or a document number, so a later breach of the shop exposes no identity data. The result is age verification with data minimization built in, which also simplifies compliance with privacy regulation.