Skip to content

Add AES InvMixColumns at depth 10 (92 XOR) and 10 zero-NOT [Inv]S-box circuits (including InvS-box 33/4/111/14, 109@15, and GD=10) - #2

Open
mizopl wants to merge 1 commit into
usnistgov:masterfrom
mizopl:we-star-aes-pareto-2026-11-18
Open

mizopl wants to merge 1 commit into
usnistgov:masterfrom
mizopl:we-star-aes-pareto-2026-11-18

Conversation

@mizopl

@mizopl mizopl commented Nov 18, 2026

Copy link
Copy Markdown

This pull request adds 11 straight-line circuits in %NCFF-0.1-2026 format — 1 over 2-input {XOR} in data/slp/aes/aes-invmixcols/, 9 over 2-input {AND, XOR, XNOR} in data/slp/aes/aes-invsbox/, and 1 over 2-input {AND, XOR, XNOR} in data/slp/aes/aes-sbox/ — all with #NOT = 0, zero constants, zero self-inputs, and zero dead gates:

File Function #AND AND depth #Gates Gate depth #XOR #XNOR #NOT
aes-invmixcols-xor92-depth10.circ.txt InvMixColumns 0 0 92 10 92 0 0
aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txt InvSBox 33 4 111 14 39 39 0
aes-invsbox-a33-ad4-g109-gd15-xx76-36.circ.txt InvSBox 33 4 109 15 40 36 0
aes-invsbox-a35-ad4-g129-gd13-xx94-42.circ.txt InvSBox 35 4 129 13 52 42 0
aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txt InvSBox 57 4 152 10 70 25 0
aes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txt InvSBox 56 4 155 10 73 26 0
aes-invsbox-a32-ad5-g116-gd16-xx84-46.circ.txt InvSBox 32 5 116 16 38 46 0
aes-invsbox-a32-ad5-g114-gd19-xx82-17.circ.txt InvSBox 32 5 114 19 65 17 0
aes-invsbox-a28-ad4-g143-gd16-xx115-59.circ.txt InvSBox 28 4 143 16 56 59 0
aes-invsbox-a28-ad4-g134-gd19-xx106-46.circ.txt InvSBox 28 4 134 19 60 46 0
aes-sbox-a37-ad4-g119-gd14-xx82-33.circ.txt SBox 37 4 119 14 49 33 0

Scope & Limitations

  • None of the 6 live CSRC wish-list thresholds (A <= 27, G <= 100, G <= 110 at GD <= 14, MixColumns <= 86, MixColumns <= 93 at GD = 3, InvMixColumns <= 105 at GD <= 5) is reached here: aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txt stops at 111 gates (+1 gate above <= 110 at GD <= 14).
  • At GD = 10, aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txt (152 gates) and aes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txt (155 gates) avoid unary NOT gates (#NOT = 0); when unary NOT gates are permitted, aes-invsbox-a55-ad4-g148-gd10-xxn93-26-2.circ.txt (2 NOT gates) uses 4 fewer total gates (148 vs 152) and 2 fewer AND gates (55 vs 57).
  • All 11 circuits are pairwise non-dominated and non-dominated on (#AND, AND depth, #Gates, Gate depth) by all zero-NOT circuits in usnistgov/Circuits at commit 21f076fa (2026-11-18) and PR #1 (and 9 of the 11 remain non-dominated when circuits with unary NOT gates are included).

Comparison with the Repository (commit 21f076fa, 2026-11-18)

  • Inverse MixColumns at GD = 10 (92 XOR gates): aes-invmixcols-xor92-depth10.circ.txt reduces the GD = 10 gate count from 93 (aes-invmixcols-xor93-depth10.circ.txt) to 92 and dominates aes-invmixcols-xor92-depth11.circ.txt (92@11) along with 8 other existing aes-invmixcols/ files. (A second non-isomorphic 92@10 {XOR} circuit with value-set symmetric difference 40 is archived in the companion repository.)
  • Inverse S-box at GD = 13..15:
    • aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txt (33/4/111/14): 12 fewer gates than aes-invsbox-a33-ad4-g123-gd14-xx90-16.circ.txt (33/4/123/14) at the same #AND = 33, AD = 4, GD = 14, dominating 14 existing aes-invsbox/ files.
    • aes-invsbox-a33-ad4-g109-gd15-xx76-36.circ.txt (33/4/109/15): 9 fewer gates than aes-invsbox-a33-ad4-g118-gd15-xx85-9.circ.txt (33/4/118/15) and 8 fewer depth levels than aes-invsbox-a33-ad4-g109-gd23-xx76-11.circ.txt (33/4/109/23), dominating 8 existing files.
    • aes-invsbox-a35-ad4-g129-gd13-xx94-42.circ.txt (35/4/129/13): 2 fewer gates than aes-invsbox-a35-ad4-g131-gd13-xx96-14.circ.txt (35/4/131/13), dominating 8 existing files.
  • Inverse S-box at GD = 10 with #NOT = 0: aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txt (57/4/152/10) and aes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txt (56/4/155/10) reduce the zero-NOT InvS-box depth from GD = 12 in master (aes-invsbox-a45-ad4-g141-gd12-xx96-25.circ.txt) and GD = 11 in PR #1 (55/4/143/11) to GD = 10.
  • Inverse S-box at #AND = 32 and #AND = 28 (GD = 16..19):
    • aes-invsbox-a32-ad5-g116-gd16-xx84-46.circ.txt (32/5/116/16): 12 fewer gates than aes-invsbox-a32-ad5-g128-gd16-xx96-23.circ.txt (32/5/128/16) and 9 fewer gates than 32/5/125/15; aes-invsbox-a32-ad5-g114-gd19-xx82-17.circ.txt (32/5/114/19) reaches 114 gates at GD = 19 (GD = 20 has 32/5/110/20).
    • aes-invsbox-a28-ad4-g143-gd16-xx115-59.circ.txt (28/4/143/16): 7 fewer gates than aes-invsbox-a28-ad4-g150-gd16-xx122-27.circ.txt (28/4/150/16), dominating 8 existing files; aes-invsbox-a28-ad4-g134-gd19-xx106-46.circ.txt (28/4/134/19): 6 fewer gates than aes-invsbox-a28-ad4-g140-gd19-xx112-30.circ.txt (28/4/140/19) and dominates aes-invsbox-a28-ad4-g135-gd20-xx107-35.circ.txt (28/4/135/20), dominating 9 existing files.
  • Forward S-box at GD = 14 (119 gates): aes-sbox-a37-ad4-g119-gd14-xx82-33.circ.txt (37/4/119/14) uses 2 fewer total gates than aes-sbox-a33-ad4-g121-gd14-xx88-23.circ.txt (33/4/121/14, commit 21f076fa), trading #AND = 37 vs #AND = 33.

Verification & Formatting

Each circuit was verified exhaustively against NIST FIPS 197 (InvMixColumns() on all 32 GF(2) basis vectors; SBox() / InvSBox() on all 256 input bytes), together with an independent recomputation of gate tallies, gate depth, AND depth, Gates per gate level, AND gates per AND level, sequential a1:aA / t1:tT internal wire numbering, and zero dead gates across all 218 files in aes-invmixcols/ (43), aes-invsbox/ (89), and aes-sbox/ (86).

Conventions match the existing files: x0:x31 -> y0:y31 (LSB = 0 within each byte b = 0:3) for aes-invmixcols/, x0:x7 -> y0:y7 (MSB = 0) for aes-invsbox/, and U0:U7 -> S0:S7 (MSB = 0) for aes-sbox/. To avoid merge conflicts, the README.md summary tables are left untouched.

Construction & Companion Verification Package

  • aes-invmixcols-xor92-depth10.circ.txt was synthesized via incremental uint64_t value-set plateau walks and connected-cone 2->1 / 2->2 / 3->2 Meet-in-the-Middle linear synthesis (HiGHS Top-2-Layer MILP confirms its 75-gate GD <= 8 prefix is optimal at GD <= 10).
  • aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txt and aes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txt exploit the 0x63 affine input shift of InvS-box (z = A_AES^-1(x ^ 0x63)), which makes 8 / 15 nonzero GF(2^4) subfield norm masks (z^17, rank 4 / 4) reachable at GD <= 3 without unary NOT gates (whereas unshifted forward S-box reaches 2 / 15 masks of rank 2 < 4).
  • aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txt and the GD = 13..19 circuits combine 3-level GF(2^4) normal-basis inverter joins, partial distributive GD = 11 AND splitting (A = 33 -> 34 -> 33 saddle traversal), observable don't-care (ODC) AND-window replacement, and deadline-aware linear resynthesis.
  • Standalone Python verifier (< 0.3s, zero third-party dependencies) and sub-block optimality / barrier certificates: https://github.com/mizopl/we-star/tree/main/solutions/nist-aes-circuit-records

— engineered & verified by we* (PROOFER powered by Gemini + @mizopl)

mizopl pushed a commit to mizopl/we-star that referenced this pull request Nov 18, 2026
mizopl pushed a commit to mizopl/mizopl that referenced this pull request Nov 18, 2026
— we* (PROOFER powered by Gemini + @mizopl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant