1/5
## Unpacking Zero-Knowledge Proofs: Knowledge vs. Computation Zero-Knowledge Proofs (ZKPs) are a cornerstone of modern cryptography, offering powerful ways to prove statements without revealing underlying sensitive information. However, a subtle but crucial distinction exists within ZKPs that can sometimes cause confusion: the difference between a Zero-Knowledge Proof of Knowledge (ZKPoK) and a Zero-Knowledge Proof of Computation (ZKPoC). While both are important, it's often the latter, ZKPoC, that serves as the primary mechanism in many practical applications. This lesson will clarify this distinction. ## The "Zero-Knowledge" Property: Privacy at its Core Before diving into the specifics of ZKPoK and ZKPoC, it's vital to understand the "Zero-Knowledge" aspect itself. This term refers to the fundamental **privacy property** of the proof. It signifies that a Prover can convince a Verifier of the truth of a specific statement (or the correctness of a computation) without revealing any information beyond the mere validity of that statement or computation. The Verifier learns nothing else about the Prover's secret data. ## Delving into Zero-Knowledge Proof of Knowledge (ZKPoK) A Zero-Knowledge Proof of Knowledge (ZKPoK) is, at its heart, about directly proving possession of certain secret information, often referred to as a "witness." The Prover aims to convince the Verifier that they *know* this secret, but crucially, without disclosing the secret itself. Imagine a scenario: a Prover wants to demonstrate they know a secret value 'x'. They would generate a ZKPoK and present it to a Verifier. This proof would assure the Verifier that the Prover indeed possesses 'x', but 'x' itself remains hidden. The focus is squarely on the Prover's knowledge of a particular piece of data. ## Exploring Zero-Knowledge Proof of Computation (ZKPoC) While ZKPoK focuses on knowing a secret, Zero-Knowledge Proof of Computation (ZKPoC) is highlighted as the more prevalent application of ZKPs. Here, the emphasis shifts. Instead of directly proving knowledge of a secret, the Prover demonstrates that they have correctly executed a specific computation according to a pre-defined set of rules or constraints. How does this relate to knowledge? By proving that a computation involving certain inputs was performed correctly, the Prover implicitly demonstrates that they *know* valid inputs that satisfy the computation's constraints. For example, a Prover might provide a "Proof I did x > 18" and "Proof I did the computation correctly." The Verifier receives this as a "Proof of Computation." The core idea is to "prove that I correctly computed these constraints and therefore know the valid inputs." ## The Key Relationship: How ZKPoC Implies ZKPoK This brings us to a central point: a Proof of Computation often means you can have Proof of Knowledge as a result. More explicitly, **a Proof of Computation implies a Proof of Knowledge of the private inputs used in that computation.** Essentially, the proof of knowledge becomes "wrapped up" inside the proof of computation. You demonstrate that you know the secret inputs not by directly proving you have them, but by proving you correctly used them in a defined computational process. If the computation is proven correct, and that computation requires specific types of inputs, then the Prover must have known such inputs. ## The Role of Circuits in Zero-Knowledge Proofs The terms "circuits" or "arithmetic circuits" are frequently used when discussing ZKPs, particularly ZKPoC. A circuit, in this context, is a mathematical representation of the computation whose correctness is being proven. It details the inputs to the computation, the operations performed, the expected outputs, and, critically, the constraints that the computation must satisfy. The underlying ZKP mathematics is developed to construct proofs related to these circuits. The goal is to prove that the computation represented by the circuit was performed correctly, and that all constraints were met, all without revealing the specific values of any private inputs fed into the circuit. For instance, a circuit might represent the computation "assume (x >= 18)," where 'x' is a private input. ## Practical Application: Age Verification with ZKPoC Let's illustrate ZKPoC with the common age verification example. Consider the statement: "I am over 18, therefore I can enter the club." Here's how ZKPoC would be applied: 1. **The Computation:** The Prover wants to prove their age (let's call it 'x') is greater than or equal to 18. The core of the computation, or the "circuit," is the condition `x >= 18`. 2. **Prover's Action:** The Prover doesn't just claim they know an age that is 18 or over. Instead, they take their actual age (which is a private input) and execute the computation: "is my age >= 18?". 3. **Generating the Proof:** The Prover then generates a zero-knowledge proof. This proof demonstrates that they performed this specific computation (`x >= 18`) correctly using their private input (their actual age). 4. **Verifier's Action:** The Verifier (e.g., the club's entry system) receives this proof. Crucially, the Verifier does not learn the Prover's actual age. 5. **Implication:** If the proof is valid, the Verifier is convinced of two things: * The Prover correctly executed the computation "x >= 18". * Because the computation was executed correctly, the Prover *must have had* an input 'x' (their age) that satisfied this computation. The Prover executes the circuit (e.g., `assume (x >= 18)`) and then proves they did this correctly. Therefore, their 'x' input must satisfy the constraints. 6. **Outcome:** The statement ("I am over 18") is proven true. The Prover has indirectly proven knowledge of a valid age that meets the criteria, all without revealing the age itself. The primary focus of the ZKP here is on verifying the correct execution of the "age >= 18" check. ## Conclusion: ZKPoC as the Dominant Practical Mechanism In summary, while Zero-Knowledge Proofs *can* be used to directly prove knowledge of a secret (ZKPoK), in many practical scenarios, particularly in systems like blockchains and privacy-preserving applications, they are employed to prove that a specific computation was performed correctly and validly (ZKPoC). This proof of correct computation then serves as an indirect, yet equally powerful, proof that the Prover knew the necessary private inputs required for that computation. Understanding this distinction is key to appreciating the versatility and power of Zero-Knowledge Proofs in the digital world.
An insightful breakdown to Unpacking ZKPs: Knowledge vs. Computation - Distinguish between Zero-Knowledge Proof of Knowledge (ZKPoK) and Proof of Computation (ZKPoC), clarifying why the latter is often key in practical applications. See how proving a computation's correctness inherently confirms knowledge of the secret inputs used.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Fundamentals of zero-knowledge proofs (ZKPs)
Interactive vs non-interactive ZKPs
ZKP requirements
ZK Terminology
How ZKPs work in practice
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 22, 2025
ZK Developer
Fundamentals of Zero-Knowledge Proofs (ZKPs)Duration: 45min
Course Overview
About the course
Fundamentals of zero-knowledge proofs (ZKPs)
Interactive vs non-interactive ZKPs
ZKP requirements
ZK Terminology
How ZKPs work in practice
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 22, 2025