Zero-Knowledge ProofZKP

A zero-knowledge proof lets one party convince another that a statement is true, such as that a batch of transactions is valid or that someone is over 18, without revealing anything beyond that fact.

Most proofs give something away: to show you know a password, you normally type it. A zero-knowledge proof is a cryptographic method that lets a prover show a statement is true while the verifier learns nothing except that it is true.1 The idea comes from academic cryptography in the 1980s, and in crypto markets it now underpins ZK rollups, privacy coins and private identity checks.2 This entry explains the idea in plain terms, the three properties every proof must have, the main proof families and what they mean for traders and users.

Category
Cryptocurrency and Blockchain
Reading time
7 min
Also called
ZK proof, Zero knowledge, zk-SNARK
Updated

Zero-knowledge proofs in plain words

Imagine proving to a bouncer that you are over 18 without showing your date of birth, your name or your address. The bouncer ends up convinced of one fact and learns nothing else. That is the goal of a zero-knowledge proof: one side, the prover, convinces the other side, the verifier, that a claim holds without disclosing the underlying data.2

The concept was defined formally by Shafi Goldwasser, Silvio Micali and Charles Rackoff in their paper on the knowledge complexity of interactive proof systems.3 On blockchains, the most visible use is scaling: a ZK rollup proves that thousands of off-chain transactions were processed correctly, and Ethereum checks the proof instead of re-running every transaction.4

How a zero-knowledge proof works, step by step

  1. Fix the statement

    The prover and verifier agree on what is being claimed, for example “this batch of transfers moves the ledger from state A to state B correctly” or “I hold the private key for this public key”.1

  2. The prover holds a secret witness

    The witness is the hidden information that makes the statement true, such as the transaction details or the key itself. It never leaves the prover.

  3. Generate the proof

    In an interactive proof the two sides exchange rounds of challenges and answers; in a non-interactive proof the prover produces a single proof that anyone with the verification key can check.2

  4. Check the three properties

    A valid scheme is complete (honest proofs of true statements pass), sound (false statements almost never pass) and zero-knowledge (the verifier learns only true or false).2

  5. Verify

    The verifier runs a check that is much cheaper than redoing the work. On Ethereum, a rollup’s verifier contract accepts a new state root only after the proof checks out.4

  6. Act on the result

    Once verified, the result is final for that system: for a ZK rollup, withdrawals to Ethereum can complete as soon as the proof is accepted, without a challenge window.4

Worked examples

Example 1 — Why repeated rounds make cheating hopeless

Soundness

In the classic cave illustration, a prover who does not know the secret can guess each challenge correctly only half the time.2 The verifier repeats the challenge 20 times.

Example 1 — Why repeated rounds make cheating hopeless — calculation
Cheater’s chance per round1 ÷ 2 = 0.5
Rounds20
Chance of passing all 201 ÷ 1,048,576
As a percentage≈ 0.0000954%

Each extra round halves a cheater’s odds, which is how soundness works in practice: false claims can pass only with a vanishingly small probability.

Example 2 — Sharing the cost of one proof across a batch

Scaling

Verifying one zk-SNARK on Ethereum costs roughly 500,000 gas.2 A hypothetical rollup batch holds 2,000 transactions, and gas is a hypothetical 10 gwei.

Example 2 — Sharing the cost of one proof across a batch — calculation
Verification gas per batch500,000
Gas per transaction500,000 ÷ 2,000 = 250
Cost per transaction250 × 10 = 2,500 gwei
In ETH0.0000025 ETH

The proof costs the same whether it covers 200 or 2,000 transactions, so bigger batches cut each user’s share of the verification cost. Data publication and operator fees come on top.4

Example 3 — Proving age without revealing identity

Privacy

A user wants to access a service open only to adults. Using a zero-knowledge identity scheme, of the kind used in some national digital ID systems, they prove the claim “age is at least 18”.2

Example 3 — Proving age without revealing identity — calculation
Statement provedAge ≥ 18
Date of birth revealedNo
Name or ID number revealedNo
What the service learnsTrue or false only

The service gets the one answer it needs, while the personal data stays with the user, so the service has none to store or leak.

zk-SNARKs and zk-STARKs compared

Aspectzk-SNARKzk-STARK
NameSuccinct non-interactive argument of knowledgeScalable transparent argument of knowledge
Trusted setupNeeded, via a common reference string2Not needed; randomness is public2
Proof sizeSmall, quick to verify4Larger, costlier to verify on Ethereum4
Quantum resistanceRelies on elliptic curvesRelies on hash functions2

Where zero-knowledge proofs are used

  • Scaling with ZK rollups

    Rollups batch transactions off-chain and post a validity proof, so Ethereum can accept the result without re-executing it. See Optimistic and ZK Rollups.4

  • Private payments

    Privacy-focused chains such as Zcash (ZEC) use zero-knowledge proofs so transactions can be checked without exposing their details.2

  • Identity and credentials

    Users can prove a single attribute, such as being over 18 or being a unique person, without handing over the full document.2

  • Voting and governance

    Some on-chain voting systems tally votes with zero-knowledge proofs so individual choices stay hidden, which makes bribery harder.2

Advantages and disadvantages

Advantages

  • Proves a claim while keeping the underlying data private.
  • Verification is far cheaper than redoing the work, which helps blockchains scale.
  • ZK rollup withdrawals do not need a multi-day challenge window.
  • Soundness can be made as strong as needed by design.

Disadvantages

  • Generating proofs needs heavy computation and often specialised hardware.
  • Many zk-SNARK systems depend on a trusted setup ceremony.
  • Verifying proofs on Ethereum still costs a meaningful amount of gas.
  • The maths is hard to audit, so implementation bugs are a real risk.

Going deeper

Read as far as you need. Each level builds on the one before it.

Zero-knowledge does not mean zero information

Beginner

The verifier always learns one thing: whether the statement is true. What stays hidden is the witness behind it. A ZK rollup also still publishes enough transaction data for anyone to rebuild balances, so using validity proofs for scaling does not by itself make transactions confidential.4

Interactive and non-interactive proofs

Intermediate

The original constructions were interactive: the verifier sends random challenges and the prover answers, round after round.3 Blockchains need proofs that anyone can check later without talking to the prover, so they use non-interactive proofs, which the ethereum.org overview credits to work by Blum, Feldman and Micali.2

A related variant, the zero-knowledge proof of knowledge, shows not just that a statement is true but that the prover actually knows the secret, for example the private key behind a public key.1

Trusted setups, cost and standardisation

Advanced

zk-SNARK setups create a common reference string in a multi-party ceremony; the system stays sound as long as at least one participant destroys their share of the secret randomness.2 zk-STARKs avoid this but produce larger proofs.

Proof generation is the main running cost for ZK rollup operators, while verification on Ethereum costs roughly 500,000 gas per zk-SNARK.4 NIST works with the ZKProof community on reference material and has invited zero-knowledge proof-of-knowledge submissions in its threshold cryptography call.1

Common mistakes

  1. Assuming every ZK rollup is private

    ZK rollups use proofs for validity, not secrecy. Transaction data is still published so the state can be rebuilt.4

  2. Treating “ZK” as a security guarantee

    A correct proof system can still sit inside buggy contracts or a centralised operator. Check audits and who controls upgrades. See Smart Contract.

  3. Ignoring the trusted setup

    With many zk-SNARKs, users rely on the setup ceremony having had at least one honest participant.2

  4. Buying a token because it says ZK

    The technology says nothing about a token’s value, supply or demand. Judge the project and its token economics separately.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1A cheating prover passes each round with probability 0.5. What is the chance of passing 10 rounds in a row?
Q2Which property means a false statement almost never produces a valid proof?

Key points to remember

  1. A zero-knowledge proof shows a statement is true without revealing the data behind it.
  2. Every scheme must be complete, sound and zero-knowledge.
  3. zk-SNARKs are small and cheap to verify but often need a trusted setup; zk-STARKs avoid the setup with larger proofs.
  4. ZK rollups use validity proofs to scale Ethereum, not to hide transactions.
  5. Proof generation is computationally heavy, and verification still costs gas.

Frequently asked questions

Who invented zero-knowledge proofs?

Shafi Goldwasser, Silvio Micali and Charles Rackoff introduced the concept in their paper on the knowledge complexity of interactive proof systems, dated to 1985, with the journal version published in 1989.23

What is the difference between a zk-SNARK and a zk-STARK?

zk-SNARKs have small proofs that are cheap to verify but usually need a trusted setup. zk-STARKs need no trusted setup and rely on hash functions, at the cost of larger proofs.2

Are zero-knowledge proofs only used in crypto?

No. They are a general privacy-enhancing technique that can prove facts about identity or check that other cryptographic protocols were followed correctly.1

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. NIST CSRC. Privacy-Enhancing Cryptography: ZKProof (opens in a new tab) Checked .
  2. ethereum.org. Zero-knowledge proofs (opens in a new tab) Checked .
  3. SIAM Journal on Computing. The Knowledge Complexity of Interactive Proof Systems (Goldwasser, Micali, Rackoff, 1989) (opens in a new tab) Checked .
  4. ethereum.org. Zero-knowledge rollups (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.