The last lesson showed a hash replacing a live verifier with a single computation. This lesson tackles a different problem entirely: how does someone lock in a value now, prove later they never changed it, while keeping that value completely secret the whole time in between? That’s a commitment scheme — the second building block, alongside hashing, that almost every ZK proof system is built from.
The core idea: commit, then reveal
Think of a sealed envelope. Write something down, seal it, hand it over — nobody can see what’s inside, but it also can’t be swapped for a different piece of paper later. A commitment scheme does exactly that with numbers instead of paper.
Two phases: sends only — the receiver learns nothing about yet. Later, revealing and the opening key lets the receiver check that they really do produce that same .
Two promises: hiding and binding
That envelope metaphor only holds together if two separate promises are both kept at once. Break either one, and the scheme is useless.
Hiding — on its own reveals nothing about ; every possible message stays equally plausible. Binding — the committer can never produce a valid opening of to a message other than the one they actually started with.
A real construction — the Pedersen commitment
So far this has all been conceptual. Here’s an actual working construction, built entirely from tools already in this series: elliptic curve points, from topic 12.
and are two fixed generator points — both public, known to everyone. is the secret message being committed to. is a random blinding factor, chosen fresh and kept secret too.
Why the blinding factor matters
That in the formula might look like an unnecessary extra ingredient. It isn’t — it’s the entire reason hiding actually works. Watch what happens committing to the exact same message three separate times, with three different random values.
Without , committing to the same value twice would produce the exact same both times — and that repetition alone would leak the fact that the hidden values matched.
KZG — committing to an entire polynomial
A Pedersen commitment locks in a single number. KZG does something far more powerful: it commits to an entire polynomial — the exact object this series spent its second phase building — and compresses it down to one point.
The verifier picks a random evaluation point ; the prover reveals along with a short proof ; the verifier checks a pairing equation — the exact tool built in topic 13. This is what a Groth16 or PLONK proof actually sends: not the polynomial, just this.
Why this matters for ZK
Here’s how commitments and the Fiat-Shamir transform from the last lesson fit together into one system — and why the order of operations is the whole point.
The prover commits to their polynomials first — those are sealed by binding. Only then does the random challenge get generated, as , straight from the Fiat-Shamir transform built last lesson. Commit before seeing the question. This exact ordering — commit, then challenge — is what stops a prover from cheating in Groth16, PLONK, and KZG alike.