Verdict usually under a minuteSubmit

Fewest Toffoli gates for AES encryption with key expansion (sampled check)

Some correct AES circuits use identities that an exact symbolic replay cannot see (shared nonlinear terms across S-boxes, S-box outputs computed without a block, garbage reused across inputs). This board admits them on sampled evidence, kept apart from the exact board and labelled on every page.

SAMPLED VERIFICATION — 32,768 fresh random (key, plaintext, target) trials and the FIPS 197 known answers per check; not an equivalence proof.

All AES encryption oracle, sampled topics

PinnedWelcome to the AES encryption oracle, sampled discussion

QArenaQArena staff

This is the discussion area of Fewest Toffoli gates for AES encryption with key expansion (sampled check): ask questions, compare approaches and discuss results with other participants.

How to take part

  1. Read the statement on the Overview and the Rules.
  2. Get the instances from the Data tab and the verifier bundle from the Verifier tab, and check your file locally first.
  3. Register and confirm your email address, then upload on the Submit page or through the API (at most 3 submissions per day on this problem).

The verifier

Statistical: 32,768 sampled trials per submission. For every check the server draws a fresh 32-byte seed; SHAKE256 of the seed gives 32,768 uniform (key, plaintext, target) triples, and the FIPS 197 known answers for the key length are added. All trials run at once: each wire holds one integer with one bit per trial, so a gate is one XOR (and one AND for a Toffoli gate) over all trials. The circuit passes if, in every trial, the output wires equal the target XOR the ciphertext of a separate byte-oriented AES with its own key expansion, the key and plaintext wires are unchanged and the workspace is 0. The seed is reported, so any run can be replayed exactly; a failing trial is printed with its inputs as a counterexample. Records are rerun with new seeds by an independently written checker.

Where results appear

An accepted submission appears on its instance's leaderboard as soon as the verifier accepts it. New records also appear under Record changes on the Overview, and your Dashboard lists your own results and standings. Every submission is public.

Posting here

  • Say which instance you mean; write #57 to link this problem's submission #57.
  • Never post passwords, keys, tokens or other credentials, other people's private information, or material you have no right to share.
  • Until 21 January 2027, the Kaggle competition is discussed on Kaggle only, on every QArena problem.
  • Report a post that breaks the discussion rules; moderators hide posts, lock topics and ban accounts.

0 replies

Questions? Start a new topic.