Bitpunk

Tools & Resources

What Is a Zero-Knowledge Proof (ZK)? SNARK vs. STARK and Uses in Rollups and Identity Verification

6 min read · · Korean original

Contents 5
  1. How Zero-Knowledge Proofs Work: The Age Verification Analogy
  2. The Difference Between zk-SNARKs and zk-STARKs
  3. How ZK Rollups Process and Verify Transactions
  4. How Are ZK Rollups Different from Anonymous Transactions?
  5. Zero-Knowledge Identity Verification: Uses and What Gets Disclosed

When a site only needs to check your age but asks you to submit your entire ID, it's natural to hesitate. “Can't I just tell you that I'm an adult?” Zero-knowledge proofs (Zero-Knowledge Proof, ZK) are easiest to understand if you start from that question.

The core idea is sending a proof that the information meets the required condition, instead of showing the secret information itself. The person who holds the information creates the proof, and the other party verifies that the proof is valid without receiving the original. You can disclose less personal information while still confirming the facts that are needed.Source 1ethereum.org, Zero-Knowledge Proofs

How Zero-Knowledge Proofs Work: The Age Verification Analogy

Picture an ID that hands over only the result “age 18 or older” without showing your date of birth. The answer a service actually needs is whether you meet the age requirement, yet a regular ID card also contains your name and exact date of birth. Zero-knowledge proofs are used to separate what the other party needs to know from the information that can stay hidden.Source 1ethereum.org, Zero-Knowledge Proofs

That said, simply displaying “You are an adult” on a screen is not a proof. In practice, private information is used as input to generate a mathematical proof, and a verification program checks it. The side that creates the proof is called the Prover, and the side that checks it is called the Verifier.

A good proof system should accept proofs from people who meet the condition, and the chance of a false proof passing should be extremely small. At the same time, it must be impossible to learn the hidden information from the proof itself. These properties are called Completeness, Soundness, and Zero-Knowledge, respectively.

Here, “zero-knowledge” doesn't mean the other party learns nothing at all. They do learn the fact that you are “18 or older.” What it means is that they gain no additional information, such as the exact date of birth that was needed to prove that fact.

The Difference Between zk-SNARKs and zk-STARKs

zk-SNARKs and zk-STARKs are the two best-known ways of implementing these proofs. SNARKs stand out for their small proofs and fast verification, and because they are non-interactive, the prover and verifier don't need to exchange questions and answers multiple times. Whoever receives the proof can check it using a fixed verification procedure.Source 1ethereum.org, Zero-Knowledge Proofs

SNARKs that use a Trusted Setup prepare common parameters for creating and checking proofs. If a secret value produced during this process survives and is misused, someone could create false proofs, so you need to trust that the setup participants properly destroyed those values. One approach to reducing this risk is to have many people participate, so that as long as even one of them securely destroys their secret value, the setup stays safe.

STARKs are characterized by a “transparent setup” that works without a trusted setup relying on the destruction of such secret values. However, their proofs are generally larger than SNARK proofs, which can add a burden when transmitting them or verifying them on a blockchain. If you think of STARKs as an upgraded version of SNARKs that eliminates all of their drawbacks, you'll miss this cost difference.

You also need to look at the cost of creating a proof and the cost of checking it separately. Even if verification is fast, generating the proof can require complex computation and substantial hardware resources. Design priorities change depending on whether you need small proofs, whether you want to avoid a trusted setup, and how large a computation you want to prove.

Claims about quantum computers also need to be scoped carefully. STARK proofs based on hash functions can be designed to resist quantum attacks, but that alone doesn't make the entire blockchain secure. Wallet signature schemes and other connected networks need to be addressed separately.Source 2StarkWare, Quantum Computing and Starknet's Preparedness

How ZK Rollups Process and Verify Transactions

A ZK Rollup is a scaling approach that bundles and executes transactions outside Ethereum, then submits a proof to Ethereum that the computation was correct. Because it adds a separate processing layer on top of Ethereum, it's called a Layer 2. The key is dividing the work so that instead of Ethereum re-executing every transaction, it checks the submitted proof.Source 3ethereum.org, Zero-Knowledge Rollups

Let's say Alice sends Bob 10 tokens. The rollup computes the result of decreasing Alice's balance by 10 and increasing Bob's balance by 10. It doesn't just make the balance numbers add up; conditions such as whether Alice has enough balance to send and whether the transaction signature is valid are also included in the proof.

After processing multiple transactions, the rollup submits the resulting changes along with a Validity Proof. Ethereum's verification program checks that the proof is correct and then accepts the new state. By batching transactions and compressing data, the cost of recording and verifying on Ethereum can be spread across many transactions.

That said, the computation doesn't disappear. The rollup side still has to execute transactions and generate proofs, and posting data and verifying proofs also cost money. ZK rollups are a way of splitting computation and verification, not a technology that processes transactions for free.

How Are ZK Rollups Different from Anonymous Transactions?

Having ZK in the name doesn't mean your transaction history is automatically hidden. In a ZK rollup, the main role of the proof is to guarantee that “transactions were processed according to the rules.” The function of hiding personal information and the function of verifying that a computation is correct should be understood separately.Source 3ethereum.org, Zero-Knowledge Rollups

Rollups post the necessary data to Ethereum so that others can reconstruct balances and transaction state. What gets posted varies, such as compressed transaction data or state changes, but the posted data is public. That's why you can't expect anonymous transfers just because something is called a ZK rollup.

Zero-Knowledge Identity Verification: Uses and What Gets Disclosed

In identity verification, the goal is “proving you meet the requirements” rather than “revealing everything about who you are.” For example, you prove an age condition instead of your full date of birth, or the fact that you hold citizenship instead of your passport number. If a service receives only the qualifications it needs, users can disclose less personal information.Source 1ethereum.org, Zero-Knowledge Proofs

A real-world example, World ID, uses a zero-knowledge proof to show that you belong to a set of verified people. The Semaphore protocol it uses helps prove that you are a member of a set without revealing which member you are. The process of first verifying a person and the process of later proving eligibility to a service play different roles.

This distinction is also useful when evaluating services. What information is collected when you first register your identity and what is passed to a service when you log in are separate questions. A description saying “we use zero-knowledge proofs” means information disclosure is reduced during the proving process, not that no personal information is handled during the earlier registration process.

When you come across zero-knowledge proofs, start by separating what the technology hides from what it proves. Remember the difference: in identity verification, it's used to disclose only the qualifications that are needed, while in ZK rollups, it's used to verify that transaction computations are correct. Keeping this in mind will help you avoid misjudging what something does based on its name alone.

Most read in Tools & Resources

See all
Tools & ResourcesWonyotti Update and Complete Summary of His Trading Method AMA (KRW 6 Million → KRW 300 Billion)34 min · Tools & ResourcesWhere to Check the Bitcoin Greed Index | The Bitcoin Fear & Greed Index Explained3 min · Tools & ResourcesSmart Pension Investing: How to Save on Taxes with an ISA Account and Transfer It to a Pension Account7 min ·