Learn / Math / Information Theory & Entropy
17. Information Theory & Entropy
Entropy · Lesson 18 of 26 · 7:07
How to measure a secret with entropy, why the Pedersen commitment hides perfectly but binds only computationally, and the simulation argument that turns 'zero-knowledge' from a slogan into something you can check — the final piece of math behind every proof system in this series.

Sixteen lessons have built numbers, polynomials, fields, groups, curves, pairings, hashes, commitments, and Merkle trees. This lesson adds the last idea: how do you measure a secret, and what does it actually mean for a proof to reveal nothing? The tool is entropy. Once it’s measurable, “zero-knowledge” stops being a slogan and becomes something you can check.

Entropy is counting yes/no questions

Information is surprise. Learn something you already knew, and you learn nothing. Learn something you couldn’t have guessed, and you learn a lot. Entropy measures how many yes/no questions it takes to pin down an unknown, counted in bits.

entropy is counting yes/no questions EQUALLY LIKELY OUTCOMES BITS OF ENTROPY 1 0 bits 2 (a coin flip) 1 bit 8 3 bits 1,024 10 bits 2256 (a 256-bit key) 256 bits WHY EIGHT OUTCOMES COSTS THREE QUESTIONS 8 ÷2 4 ÷2 2 ÷2 1 = 3 questions ENTROPY = THE NUMBER OF YES/NO QUESTIONS Each extra bit doubles the outcomes — that's why 256 bits is beyond brute force.
Fig. 1 — each extra bit doubles the outcomes a question can rule out. Eight outcomes cost exactly three questions.
Entropy

For a random variable with outcomes of probability pip_i, entropy is H(X)=∑ipilog⁡21piH(X) = \sum_i p_i \log_2\frac{1}{p_i}. When there are nn equally likely outcomes, this collapses to log⁡2(n)\log_2(n) bits — the exact same halving that gives a Merkle proof its log⁡2(n)\log_2(n) length.

Each extra bit doubles the number of outcomes. That’s exactly why 256 bits — the size of the secrets this series has used throughout — sits beyond brute force.

Entropy depends on the odds, not just the count

Entropy isn’t only about how many outcomes exist — it’s about how likely each one is. A predictable secret is a weak secret even when it has plenty of possible values.

same four outcomes, different entropy CERTAIN 100% 0% 0% 0% 0 bits UNEVEN 50% 25% 12.5% 12.5% 1.75 bits EQUAL 25% 25% 25% 25% 2 bits (maximum) ENTROPY IS HIGHEST WHEN OUTCOMES ARE EQUALLY LIKELY A predictable secret is a weak secret even with many possible values.
Fig. 2 — same four outcomes, three different entropies. A certain outcome teaches nothing; equally likely outcomes teach the most.

A certain outcome carries zero bits — there’s nothing left to ask. Skew the odds and the entropy climbs partway. Only when every outcome is equally likely does entropy hit its maximum for that many outcomes. A good secret isn’t just big, in other words — it has to be uniformly random too.

Low-entropy vs. high-entropy secrets

This is where entropy turns practical. Take the nullifier secret from the last lesson: its hash NN is published, and anyone can see it. Whether that’s safe depends entirely on the entropy behind it — not on the fact that it went through a hash function at all.

published: N = H(nf) — anyone can see N LOW ENTROPY 10,000 possible values nf = a 4-digit PIN attacker tries every guess: H(0000), H(0001), … H(9999) one matches N: nf found HIGH ENTROPY 2²⁵⁶ possible values nf = a random 256-bit value attacker needs 2²⁵⁶ hashes never finishes (longer than the age of the universe) ONE-WAY ONLY HELPS IF THE INPUT IS UNGUESSABLE A hash hides a secret only as well as the secret's entropy allows. That's why nullifier secrets and blinding factors must be random.
Fig. 3 — a four-digit PIN is broken in moments once its hash is public. A 256-bit random secret never is.

Ten thousand possible values is nothing to a computer — trying every guess and checking it against the published hash takes moments. Two to the 256 possible values is a different story: brute-forcing it would outlast the universe. A hash hides a secret only as well as the secret’s own entropy allows, which is exactly why nullifier secrets, and the blinding factors from two lessons back, have to come from a genuine random source, at full length.

Why the Pedersen commitment hides perfectly

The commitments lesson introduced the Pedersen commitment, C=g⋅m+h⋅rC = g\cdot m + h\cdot r, without fully explaining why it hides so completely. Entropy is the reason.

perfect hiding C = g·m + h·r r is random over the whole field m = 42, with some r m = 7, with some r m = 999, with some r C all the attacker sees Every message has exactly one matching r, and all are equally likely. RANDOMNESS MAKES EVERY MESSAGE EQUALLY LIKELY Even an attacker with unlimited computing power learns nothing about m from C.
Fig. 4 — every possible message has exactly one matching r, and every r is equally likely — so C can't favor any message over another.
Perfect hiding

For any message mm an attacker might guess, there is exactly one blinding factor rr that produces the same C=g⋅m+h⋅rC = g\cdot m + h\cdot r. Because rr is drawn uniformly from the whole field, every such mm is equally plausible given only CC.

Perfect means perfect here: even an attacker with unlimited computing power learns nothing about mm from CC alone. That’s the maximum-entropy idea from the last section, doing exactly the work it promised.

Two kinds of security

That word “perfect” is doing real work, and it comes with a trade-off worth naming directly.

what hiding and binding rest on BASED ON ENTROPY Pedersen hiding holds even against unlimited computing power but only if r is truly random called information-theoretic BASED ON HARD PROBLEMS Pedersen binding relies on the discrete log problem (Topic 11) hash collision resistance (Topic 14) holds only while the problem stays hard called computational No commitment can be perfectly hiding and perfectly binding at once. TWO KINDS OF SECURITY, ONE TRADE-OFF Pedersen picks perfect hiding and computational binding. Other schemes choose the other way around.
Fig. 5 — information-theoretic security holds against unlimited computing power; computational security holds only as long as a hard problem stays hard.

Pedersen hiding is information-theoretic: safe against any attacker, no matter how much computing power they have, because the information simply isn’t there. Pedersen binding is only computational: safe because breaking it means solving the discrete log problem, which stays hard but isn’t impossible in principle. No commitment scheme gets both guarantees at full strength at once — Pedersen picks perfect hiding and computational binding; hash-based commitments tend to choose the other way around.

The simulation argument

So how does anyone actually prove a proof leaks nothing? By showing that someone who doesn’t know the secret can produce a transcript indistinguishable from a real one. If a fake looks exactly like the truth, the truth wasn’t carrying any extra information. Here’s the Schnorr proof from two lessons back, run both ways.

simulating a proof without the secret public: G and y = x·G. The prover claims to know x. REAL PROOF (prover knows x) pick a random r send a = r·G receive a random challenge c reply z = r + c·x transcript (a, c, z) check: z·G = a + c·y ✓ SIMULATED PROOF (nobody knows x) pick a random c and a random z challenge chosen first, then work backwards compute a = z·G – c·y (x is never used) transcript (a, c, z) check: z·G = a + c·y ✓ the two transcripts look identical IF YOU CAN FAKE IT WITHOUT THE SECRET, IT CAN'T LEAK THE SECRET That is the formal meaning of zero-knowledge: whatever the verifier sees, they could have generated on their own.
Fig. 6 — the real proof uses x to answer the challenge. The simulated proof never touches x: it picks the challenge first, then works backwards. Both pass the same check.
A Schnorr proof

Public: GG and y=x⋅Gy = x\cdot G. Real: pick a random rr, send a=r⋅Ga = r\cdot G, receive a challenge cc, reply z=r+c⋅xz = r + c\cdot x. Simulated: pick a random cc and zz first, then compute a=z⋅G−c⋅ya = z\cdot G - c\cdot y — no xx needed anywhere. Both transcripts pass the identical check z⋅G=a+c⋅yz\cdot G = a + c\cdot y, and both are distributed exactly the same way.

Since the verifier could have produced this transcript entirely on their own, the transcript teaches the verifier nothing beyond the fact that the statement holds. That’s the formal meaning of zero-knowledge.

The three promises

Put all of this together, and every proof system built across this series — Groth16, PLONK, the rest — is ultimately judged by the same three promises.

the three promises of a ZK proof COMPLETENESS a true statement: the honest prover always convinces the verifier built from polynomial division with zero remainder (Topic 8) the pairing equation (Topic 13) the check z·G = a + c·y (Topic 17) SOUNDNESS a false statement: a cheater is caught, with overwhelming probability built from Schwartz-Zippel (Topic 10) binding commitments (Topic 15) collision resistance (Topic 14) ZERO-KNOWLEDGE the verifier learns nothing except that it is true built from random blinding factors (Topics 15 and 17) the private path and nullifier (Topic 16) the simulator (Topic 17) COMPLETE. SOUND. ZERO-KNOWLEDGE. Every ZK system in this series, from Groth16 to PLONK, is judged by these three promises.
Fig. 7 — completeness, soundness, and zero-knowledge, and the exact tool from this series that builds each one.

Completeness: if the statement is true and the prover is honest, the verifier always accepts — built from polynomial division with zero remainder and the pairing equation. Soundness: if the statement is false, a cheating prover gets caught except with negligible probability — built from Schwartz-Zippel and binding commitments. Zero-knowledge: the verifier learns nothing except that the statement is true — built from random blinding factors and the simulator this lesson just walked through.

That’s the full arc of this series, from modular arithmetic to these three guarantees. Complete, sound, and zero-knowledge — no longer a slogan, but something you can now measure and check.

Key takeaways
  • Entropy measures how many yes/no questions it takes to pin down an unknown secret, counted in bits.
  • Entropy depends on the odds, not just the count — a predictable secret is weak even with many possible values, and uniform randomness maximizes it.
  • A hash only hides a secret as well as the secret’s own entropy allows — a 4-digit PIN is broken in moments once its hash is public, a 256-bit random value never is.
  • The Pedersen commitment hides perfectly (information-theoretic security, safe against unlimited computing power) but binds only computationally (depends on the discrete log problem staying hard).
  • The simulation argument — a fake transcript indistinguishable from a real one, built without the secret — is the formal meaning of zero-knowledge, completing this series’ three promises: completeness, soundness, and zero-knowledge.