Path: blob/main/frontier/10-snarks-starks/break/toxic-waste-forgery.ipynb
483 views
Break: Forging Proofs with Compromised Trusted Setup
Module 10 | Breaking Weak Parameters
If the toxic waste from a Groth16 ceremony leaks, anyone can forge proofs for false statements.
Why This Matters
Groth16 requires a trusted setup ceremony that generates a Common Reference String (CRS) from secret randomness called the toxic waste (). After the CRS is published, the toxic waste must be destroyed.
If anyone retains the toxic waste, they can forge valid-looking proofs for any statement, true or false. This completely breaks the soundness of the proof system:
| Property | With destroyed toxic waste | With leaked toxic waste |
|---|---|---|
| Soundness | Computationally sound | Broken |
| Zero-knowledge | Yes | Yes (irrelevant, attacker doesn't need ZK) |
| Completeness | Yes | Yes |
Your task: given the toxic waste, forge a Groth16 proof that a false statement is true.
The Scenario
Consider a simple R1CS constraint: prove knowledge of such that over .
An honest prover has witness (since ). We will:
Set up a Groth16-style CRS with toxic waste
Show an honest proof with witness
Forge a proof claiming satisfies (it doesn't: )
Verify that the forged proof passes the verification equation
We work in and simulate the pairing check algebraically using exponent arithmetic. The key insight: the Groth16 pairing equation reduces to a scalar equation in the exponent.
Step 1: Groth16 Trusted Setup (with toxic waste)
The setup ceremony generates secret random values and computes the CRS. We simulate the full Groth16 verification equation in the exponent.
The Groth16 verification equation (simplified for one constraint) is:
which simplifies to:
The prover computes scalars , , (which become curve points in the real protocol), and the verifier checks this equation using pairings.
Step 3: Forge a Proof for a FALSE Statement
Now suppose the attacker has the toxic waste ().
The attacker wants to prove: "I know such that ."
This is false: in .
Without the toxic waste, the attacker cannot produce valid proof elements because the QAP divisibility check would fail. But with the toxic waste, the attacker can directly compute , , that satisfy the verification equation for any claimed public output.
The Fix: Multi-Party Computation Ceremonies
In practice, Groth16 ceremonies use MPC (multi-party computation) so that the toxic waste is never held by a single party:
Participant 1 generates , computes on curve points, passes to next
Participant 2 generates , updates to , passes on
continue for participants
Final CRS encodes
Security guarantee: as long as any single participant destroys their share, the combined toxic waste is unrecoverable. Zcash's Sapling ceremony had hundreds of participants across the world.
Alternatively, use transparent proof systems (STARKs, Bulletproofs) that need no trusted setup at all.
Summary
| Aspect | Without toxic waste | With toxic waste |
|---|---|---|
| Proof construction | Must use valid witness | Can pick arbitrary , solve for |
| Key operation | Cannot compute (DLP hides ) | |
| Soundness | Computationally sound | Completely broken |
| False statement proofs | Impossible (with overwhelming probability) | Trivially constructible |
Key takeaways:
Groth16 soundness relies entirely on the secrecy of the toxic waste.
Knowing (or any of ) lets you bypass the constraint check.
MPC ceremonies distribute trust: only one honest participant needed.
Transparent systems (STARKs, Bulletproofs) eliminate this attack vector entirely.
Back to Module 10: SNARKs and STARKs