Skip to content
Memory corruption Write-up Advanced

We beat Google’s zero-knowledge proof of quantum cryptanalysis

The Rust guest program used to generate Google's zero-knowledge quantum circuit proofs contained memory-safety and logic flaws: an out-of-range operation type could skip the Toffoli counter, and register aliasing allowed irreversible gates. An attacker could therefore forge a proof that verifies under Google's key while reporting far lower quantum resource costs than the real circuit.

blog.trailofbits.com

Published on blog.trailofbits.com

Two weeks ago, Google’s Quantum AI group published a zero-knowledge proof of a quantum circuit so optimized, they concluded that first-generation quantum computers will break elliptic curve cryptography keys in as little as 9 minutes. Today, Trail of Bits is publishing our own zero-knowledge proof that significantly…

The author, on blog.trailofbits.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the guest program deserialised untrusted circuit bytes with unchecked access and then used an unvalidated operation-type value in match expressions, so an out-of-range value jumped into the wrong jump table and skipped the gate counter; a missing check that a gate's inputs differ from its output compounded this.

What the attacker needed

Ability to supply private circuit input; unpatched Google prover/verifier code

How it was found

  1. Read the untrusted private circuit bytes with the unchecked deserialiser.
  2. Supply an operation type outside the expected range so the first jump table is overrun.
  3. Land in the second jump table so the operation still executes but the Toffoli counter is skipped.
  4. Tie a gate's control and target qubits together to reset a qubit to zero, breaking reversibility.
  5. Build classical logic gates and then elliptic curve point addition from these primitives.
  6. Apply register sharing in the modular inversion to fit within the qubit bound.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A zero-knowledge proof lets someone convince you a program ran correctly without showing the inputs. Here the program was meant to simulate a quantum circuit and report how much computing power it needs. Bugs in that simulator let the author craft inputs that made the reported costs look much smaller than they really were, while the proof still passed verification.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.