Articles

What Is a Zero-Knowledge Proof?

A zero-knowledge proof lets one party prove a statement is true without revealing why — the basis of privacy-preserving verification systems.

Chisato Chisato · · 4 min read
Padlocks attached to a cable, symbolizing cryptographic proof

A zero-knowledge proof (ZKP) is a cryptographic method that lets one party (the prover) convince another party (the verifier) that a statement is true, without revealing anything beyond the fact that it’s true. You prove you know a secret, or that a computation was done correctly, without exposing the secret or the computation’s inputs. It sounds paradoxical — how do you prove you know something without showing it? — but the trick is asking the prover to answer questions that are only answerable if the statement genuinely holds.

The three properties that define a ZKP

For a protocol to count as a zero-knowledge proof, it has to satisfy three properties:

  • Completeness. If the statement is true and both parties follow the protocol honestly, the verifier will be convinced.
  • Soundness. If the statement is false, a dishonest prover can’t convince an honest verifier — except with negligible probability.
  • Zero-knowledge. The verifier learns nothing beyond the fact that the statement is true. No secret, no extra information, leaks out.

That last property is what separates a ZKP from an ordinary proof. Showing someone your password proves you know it, but it also reveals the password. A zero-knowledge proof proves the same fact while revealing nothing else.

An intuitive example: the cave

The classic illustration is a circular cave with a single entrance and a locked door partway around, splitting it into paths A and B. The door can only be opened with a secret word. The prover wants to convince the verifier they know the word, without saying it.

The verifier waits outside while the prover walks in and picks either path at random. The verifier then shouts which path they want the prover to come out from — A or B. If the prover actually knows the secret word, they can always comply, unlocking the door if needed. If they don’t know it, they can only comply half the time — whenever they happened to guess the path the verifier would ask for.

Repeat this enough times, and a prover who doesn’t know the secret is caught with overwhelming probability, while a prover who does know it never has to say the word aloud. That’s completeness, soundness, and zero-knowledge in miniature.

Interactive vs non-interactive proofs

The cave example is an interactive proof — it requires back-and-forth rounds between prover and verifier. Many real systems instead use non-interactive zero-knowledge proofs, where the prover generates a single proof object that any verifier can check independently, without a live exchange. Non-interactive proofs are what make ZKPs practical for things like verifying a transaction once and having many parties check it later, rather than requiring a live challenge-response session for each verifier.

What zero-knowledge proofs are used for

  • Authentication without transmitting a secret. A user can prove they know a password or private key without ever sending it over the network — a stronger property than what most login flows offer today, where a JWT or session token is issued only after a credential has already crossed the wire.
  • Verifiable computation. Proving a computation was performed correctly (say, a batch of transactions was validated) without re-running it or revealing its inputs — useful for systems that want to scale verification without scaling trust.
  • Privacy-preserving identity. Proving a fact about yourself — that you’re over a certain age, or a member of an approved set — without revealing your full identity or the underlying record.

Why “zero-knowledge” is a strict requirement

It’s worth dwelling on how strict the zero-knowledge property actually is. It’s not enough for the proof to avoid revealing the secret directly — it has to reveal nothing the verifier couldn’t already have computed on their own, including subtle statistical leaks across many proof rounds. Formally, this is defined by requiring that a verifier’s entire view of the interaction could be simulated by someone who doesn’t know the secret at all, using only the fact that the statement is true. If a simulator can produce an indistinguishable transcript without ever touching the real secret, then the real protocol can’t be leaking anything a simulator wouldn’t already know either. That’s a much higher bar than “doesn’t print the password to the screen,” and it’s why designing a genuine zero-knowledge protocol is a specialized area of cryptography rather than something to improvise.

How it relates to other cryptographic tools

Zero-knowledge proofs are a different tool from the cryptography most developers touch day to day. Digital signatures prove a message came from a specific key holder and hasn’t been altered — but the signer’s public key and the message are both visible. HMAC and other keyed hashing schemes prove integrity and authenticity given a shared secret, but they don’t hide the underlying data from anyone who already has that secret. Hashing and encryption protect or obscure data itself. A ZKP is narrower and stranger: it proves a fact about data or a computation, while keeping the data or computation hidden entirely.

The takeaway

A zero-knowledge proof lets a prover convince a verifier that something is true — they know a secret, a computation was correct, a fact holds — without revealing anything beyond that bare truth. It’s built on three properties: completeness, soundness, and zero-knowledge, and it comes in interactive and non-interactive forms. As systems increasingly need to verify claims without trusting or exposing the data behind them, ZKPs are the cryptographic primitive built exactly for that job.

Chisato Chisato · · 4 min read

OCSP vs CRL: How Certificate Revocation Works

OCSP and CRL are the two mechanisms browsers use to check if a TLS certificate has been revoked before its expiry date. Here's how each works.

#Security #Cryptography #Networking
Chisato Chisato · · 4 min read

What Is a Timing Attack? Side-Channel Leaks Explained

A timing attack infers secret data by measuring how long an operation takes to run. How timing side channels leak information and how to close them.

#Security #Cryptography #Web Development
The Lycoris Team The Lycoris Team · · 5 min read

How Digital Signatures Work

A digital signature uses a private key to prove a message's origin and integrity, and a public key lets anyone verify it — no shared secret required.

#Security #Cryptography #Authentication