What is a zero-knowledge proof?
A zero-knowledge proof (ZKP) lets someone convince another party that a statement is true without revealing any information beyond the statement itself. The party that submits the proof is called the prover, and the party that checks it is called the verifier. For example, a prover can show that they know a private key without handing it over. A private key is a secret number used to authorize the movement of assets.
The concept first appeared in "The Knowledge Complexity of Interactive Proof Systems," a paper published by three researchers in 1985. On blockchains, it has two uses: confirming that a batch of transactions was processed according to the rules and that balances were updated correctly, without redoing every transaction; and confirming that a condition holds, such as a user being at least 18 years old, without handing over data like a date of birth. Let's start with an example that needs no math.
Zero-knowledge proof example: proving two balls differ in color without saying which one is red
Suppose you have a red ball and a green ball that are identical except for color. Your friend cannot tell red from green, and you want to convince them that the two balls are different colors without telling them which one is red. Here you are the prover and your friend is the verifier.
- Your friend holds one ball in each hand and first lets you see clearly which ball is in which hand.
- They put their hands behind their back, independently and randomly decide whether to swap the balls, and then bring them out for you to see. You cannot see how they make the choice.
- You say whether the balls were swapped, and you repeat this for many rounds.
If the balls really are different colors, you can answer correctly every round. If they are the same color and have no other distinguishing features, you can only guess. Because your friend independently chooses to swap or not with equal probability in each round, the chance of guessing correctly 20 rounds in a row is 1/2 multiplied by itself 20 times, or 1/1,048,576, roughly one in a million. So after many correct answers in a row, your friend has good reason to believe the balls really are different colors.
You only answer "swapped" or "not swapped," which your friend already knows. They learn nothing from your answers about which ball is red. This is a made-up example to illustrate the idea, not a proof system that can be deployed directly on a blockchain.
Three properties of a zero-knowledge proof: completeness, soundness and zero-knowledge
The example illustrates three properties, which answer three questions: can a true statement be proven, can a false statement slip through, and is any extra information leaked?
| Property | Meaning | In the example |
|---|---|---|
| Completeness | When the statement is true and both parties follow the rules, the verifier accepts the proof | The balls are different colors, so you can answer correctly |
| Soundness | When the statement is false, it is very hard for the prover to get the verifier to accept | If the balls are the same color, you can only guess, and the chance of guessing right many rounds in a row is very small |
| Zero-knowledge | The verifier gains no information beyond the public statement | Your friend still does not know which ball is red |
Soundness here is probabilistic; it does not mean the verifier can never be fooled under any circumstances. In the example, adding more independent rounds lowers the probability of guessing every answer correctly; real proof systems control this error probability through their specific algorithms and parameters.
Two kinds of things a zero-knowledge proof can prove: that a statement holds, or that you know a secret
"The two balls are different colors" is a proof that a statement is true. Another kind of proof must also show that the prover actually knows a secret, not just that a conclusion is correct.
For example, a public key is a number that is paired with a private key and can be shared publicly. A prover can prove "I know the private key that corresponds to this public key" without handing over the private key.
Interactive vs. non-interactive proofs: why blockchains use proofs submitted in one go
The ball example requires back-and-forth communication round by round, which is called an interactive proof. On a blockchain, the computers that check and store data are called nodes, and each of them needs to verify the same records on its own. If every check required questioning the prover again, independent verification would be impractical.
A non-interactive proof lets the prover generate a proof once. Anyone who has the proof, the checking program and a set of public data that the prover and verifier have agreed to use in advance (called public parameters) can verify it on their own without asking the prover any further questions. Blockchains commonly use this approach, for example by submitting the proof to an onchain program that runs according to preset rules and checks it; this kind of program is called a smart contract.
Two uses of zero-knowledge proofs on blockchains
For scaling: confirming that a batch of transactions was computed correctly without redoing each one
Take Ethereum as an example. A rollup is a scaling approach that lets a blockchain handle more transactions: it first executes transactions in batches outside Ethereum's mainnet, the network that processes real-asset transactions, and then sends the results and data back to mainnet to be checked and recorded. A zero-knowledge rollup attaches a proof when it sends back its results, showing that the balance changes and other changes produced by the batch all follow the rules. This type of proof is called a validity proof. Once the smart contract on mainnet has checked the proof and it passes, the contract accepts the batch's results without executing the transactions one by one again.
This use values proofs that are succinct and faster to check than redoing the computation. Zero-knowledge is a separate property: a proof system can provide only a succinct validity proof, or it can also hide the private inputs behind the proof. A validity proof used for scaling does not by itself make transactions confidential; a zero-knowledge rollup still publishes enough data to reconstruct its account balances and other records, as explained in the Ethereum developer documentation. The name of this kind of solution therefore cannot be taken as a guarantee that transactions are anonymous.
For proving conditions: for example, proving you are at least 18 without revealing your date of birth
Suppose an app needs to confirm that a user is at least 18 years old. The user can submit a proof that lets the app check that the age condition is met, without revealing their full date of birth. What is revealed is "meets the age threshold"; what stays hidden is the personal data that supports that statement.
This only shows how disclosure can be reduced; it does not guarantee that the app as a whole leaks no other data. The app still has to decide whom the proof is about, where the data comes from and which information will be made public; a zero-knowledge proof alone cannot answer these questions.
How ZK-SNARKs and ZK-STARKs differ
Common proof systems used by zero-knowledge rollups include ZK-SNARKs and ZK-STARKs. The full name of the former is Zero-Knowledge Succinct Non-Interactive Argument of Knowledge, which emphasizes zero-knowledge, succinct proofs and non-interactivity; the latter is Zero-Knowledge Scalable Transparent Argument of Knowledge, which emphasizes zero-knowledge, scalability and transparency. Transparent here means not needing the trusted setup described below; it does not mean making private inputs public.
Some ZK-SNARK systems require a trusted setup first: participants generate public parameters used for proving and checking, and if the secret random numbers used in the process are kept, they could be used to forge proofs. A multi-party setup lets each participant contribute randomness and then destroy their own secret part; when the relevant construction and cryptographic assumptions hold, as long as at least one honest participant destroys their secret, no one else can use that setup to forge proofs. Users still need to trust how the setup was carried out.
ZK-STARKs build their parameters from publicly verifiable randomness and do not rely on this kind of setup in which secrets must be kept and then destroyed. The table below compares common implementations:
| Item | ZK-SNARK | ZK-STARK |
|---|---|---|
| Trusted setup | Required by some systems | Does not need the trusted setup described above |
| Proof size | Usually smaller | Usually larger |
| Cost of checking proofs on Ethereum | Lower in common implementations | Higher in common implementations |
Actual size, computation time and cost depend on the specific system; you cannot judge whether a project is better or worse based only on which category it falls into.
Limits of zero-knowledge proofs: no guarantee that inputs are true, and high generation costs
A proof used to confirm a computation shows that "given these inputs, the system produced these results according to the rules." It does not follow that the real-world information behind the inputs is true: for example, if an app accepted an incorrect date of birth, the proof could still correctly show that this data meets the age threshold. Whether the data source is genuine has to be confirmed by a separate mechanism.
Generating the validity proofs used by rollups takes a lot of computation and often relies on specialized hardware, and checking proofs on Ethereum also costs fees. Ethereum measures the work needed to execute operations in gas; for how fees work, see gas fee. These costs may raise the fees of a service. Using zero-knowledge proofs does not mean that a project or token has been endorsed as secure.
FAQ
Does zero-knowledge mean the verifier knows nothing at all?
No. The verifier knows the public statement being checked, the public parameters and the verification result. For example, a proof of knowledge of a private key can reveal the public key and hide only the private key. "Zero-knowledge" should not be understood to mean that the verifier does not even know what it has verified.
If a proof does not leak the private key, is the app guaranteed not to leak it?
No. The zero-knowledge property applies to the information conveyed by the proof. It does not automatically protect the entire process by which an app stores data, generates proofs or transmits other information. Even if a proof meets the zero-knowledge requirement, the software implementation and data handling still need to be checked separately.
Related terms
Explore zero-knowledge rollups, rollups, layer 2, offchain, private keys, public keys and smart contracts, or return to the Crypto Glossary.
References
Digital Assets subject to volatility and not insured. Not financial/investment advice. Not all products and services offered in all regions. Exclusions and T&Cs apply.
© 2026 OKX. This article may be reproduced or distributed in its entirety, or excerpts of 100 words or less of this article may be used, provided such use is non-commercial. Any reproduction or distribution of the entire article must also prominently state: “This article is © 2026 OKX and is used with permission.” Permitted excerpts must cite to the name of the article and include attribution, for example “Article Name, [author name if applicable], © 2026 OKX.” Some content may be generated or assisted by artificial intelligence (AI) tools. No derivative works or other uses of this article are permitted.








