Path: blob/main/frontier/09-commitments-sigma-protocols/connect/commitments-in-zk-proofs.ipynb
483 views
Connect: Commitments as Building Blocks for ZK Proofs
Module 09 | Real-World Connections
Pedersen commitments from this module appear inside every major zero-knowledge proof system. Here is where and how.
Introduction
The Pedersen commitment from 09b, , looks like a simple cryptographic primitive. Commit to a value, reveal it later. But this humble construction is a universal building block for zero-knowledge proof systems.
It appears in:
| Proof System | How Pedersen commitments are used |
|---|---|
| Bulletproofs | Commit to individual bits for range proofs |
| Groth16 | Commit to witness elements in the proof |
| KZG (Kate) commitments | Generalize Pedersen to polynomials via pairings |
| Confidential Transactions | Hide transaction amounts on-chain |
In this notebook, we trace the common pattern: commit, challenge, respond, the sigma protocol structure from 09c, scaled up to prove complex statements.
Pedersen Commitments: Quick Review
Let us set up Pedersen parameters and recall the key properties we will need:
Perfectly hiding: reveals nothing about (even to unbounded adversaries)
Computationally binding: cannot open to two different values (under DLP)
Homomorphic:
In Bulletproofs: Range Proofs from Bit Commitments
Bulletproofs (Bunz et al., 2018) prove that a committed value lies in a range without revealing the value. They are used in Monero and Mimblewimble for confidential transactions.
The core idea:
To prove , decompose into its bits:
Commit to each bit using a Pedersen commitment
Prove each using a sigma protocol
Prove the bit commitments are consistent with the value commitment
The homomorphic property is essential: we can check that the weighted sum of bit commitments equals the value commitment, without opening any of them.
Let's build a simplified version.
In Groth16: Committing to the Witness
Groth16 (2016) is the most widely deployed SNARK, used in Zcash and many other systems. The prover proves knowledge of a witness satisfying a circuit, without revealing .
At a high level, the proof contains commitments to witness elements that are structured like Pedersen commitments but use elliptic curve pairings instead of discrete-log groups:
where are witness elements and are public curve points from the trusted setup.
The key structural parallel:
Pedersen: , commit with one generator per value
Groth16: , commit with one curve point per witness element
Both achieve hiding (the commitment reveals nothing about the inputs) and both are verified using algebraic checks rather than opening.
Polynomial Commitments: From Values to Polynomials
KZG commitments (Kate, Zaverucha, Goldberg, 2010) generalize Pedersen commitments from single values to entire polynomials.
A Pedersen commitment commits to a scalar : .
A KZG commitment commits to a polynomial :
where are points from a trusted setup (nobody knows ).
This is a vector Pedersen commitment to the coefficient vector , with generators KZG adds the ability to prove evaluations: "I committed to , and " with a short proof.
KZG is the core commitment scheme in PLONK, Marlin, and Ethereum's EIP-4844 (proto-danksharding).
Let's demonstrate the analogy with a toy vector commitment.
The Common Pattern: Commit, Challenge, Respond
Look at the structure of every proof system we have discussed:
| Phase | Schnorr (09d) | Bulletproofs | Groth16 | PLONK/KZG |
|---|---|---|---|---|
| Commit | Bit commitments | (witness commitments) | Polynomial commitments | |
| Challenge | Random | Fiat-Shamir hash | Fiat-Shamir hash | Fiat-Shamir hash |
| Respond | Inner-product argument | Pairing check values | Evaluation proofs |
The sigma protocol from 09c is the DNA of all these systems. What changes is the complexity of the statement being proved, but the three-phase structure remains the same.
And at the commitment layer, Pedersen's construction (or its generalizations) provides the hiding and homomorphic properties that make the proofs zero-knowledge and composable.
Concept Map
| Module 09 Concept | Role in ZK Proof Systems |
|---|---|
| Pedersen commitment | Commit to witness values (inputs to the proof) |
| Homomorphic property | Compose and check commitments without opening |
| Sigma protocol (commit-challenge-respond) | Structure of every interactive/non-interactive proof |
| Fiat-Shamir transform | Make proofs non-interactive via hashing |
| Perfect hiding | Privacy guarantee: proof reveals nothing about witness |
| Computational binding | Soundness guarantee: prover cannot cheat |
| Vector Pedersen commitment | Commit to multiple values at once (Bulletproofs inner product) |
| Pedersen on polynomials | KZG polynomial commitments (SNARKs, PLONK, danksharding) |
Summary
| Concept | Key idea |
|---|---|
| Bulletproofs | Decompose a committed value into bits, commit to each with Pedersen, and prove each bit is 0 or 1 using OR-proofs |
| Groth16 | Uses Pedersen-like commitments on elliptic curves to hide witness elements inside proof elements |
| KZG polynomial commitments | Generalize vector Pedersen commitments to encode entire polynomials, enabling evaluation proofs for PLONK, Marlin, and danksharding |
| Confidential transactions | The homomorphic property lets verifiers confirm that inputs equal outputs without revealing any amounts |
| Common pattern | Commit, challenge, respond. The sigma protocol structure from Module 09 scales from scalars to vectors to polynomials |
The common thread is the sigma protocol structure from Module 09: commit, challenge, respond. What scales up is the complexity of the committed objects (from scalars to vectors to polynomials) and the sophistication of the response (from a single linear equation to inner-product arguments to pairing checks). But the core pattern, and the core commitment scheme, remain the same.