Repository navigation
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
Conversation
— we* (PROOFER powered by Gemini + @mizopl)
mizopl
pushed a commit
to mizopl/we-star
that referenced
this pull request
Nov 18, 2026
— we* (PROOFER powered by Gemini + @mizopl)
mizopl
pushed a commit
to mizopl/mizopl
that referenced
this pull request
Nov 18, 2026
— we* (PROOFER powered by Gemini + @mizopl)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds
11straight-line circuits in%NCFF-0.1-2026format —1over 2-input{XOR}indata/slp/aes/aes-invmixcols/,9over 2-input{AND, XOR, XNOR}indata/slp/aes/aes-invsbox/, and1over 2-input{AND, XOR, XNOR}indata/slp/aes/aes-sbox/— all with#NOT = 0, zero constants, zero self-inputs, and zero dead gates:aes-invmixcols-xor92-depth10.circ.txtaes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txtaes-invsbox-a33-ad4-g109-gd15-xx76-36.circ.txtaes-invsbox-a35-ad4-g129-gd13-xx94-42.circ.txtaes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txtaes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txtaes-invsbox-a32-ad5-g116-gd16-xx84-46.circ.txtaes-invsbox-a32-ad5-g114-gd19-xx82-17.circ.txtaes-invsbox-a28-ad4-g143-gd16-xx115-59.circ.txtaes-invsbox-a28-ad4-g134-gd19-xx106-46.circ.txtaes-sbox-a37-ad4-g119-gd14-xx82-33.circ.txtScope & Limitations
6live CSRC wish-list thresholds (A <= 27,G <= 100,G <= 110atGD <= 14,MixColumns <= 86,MixColumns <= 93atGD = 3,InvMixColumns <= 105atGD <= 5) is reached here:aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txtstops at111gates (+1gate above<= 110atGD <= 14).GD = 10,aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txt(152gates) andaes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txt(155gates) avoid unaryNOTgates (#NOT = 0); when unaryNOTgates are permitted,aes-invsbox-a55-ad4-g148-gd10-xxn93-26-2.circ.txt(2NOTgates) uses4fewer total gates (148vs152) and2fewerANDgates (55vs57).11circuits are pairwise non-dominated and non-dominated on(#AND, AND depth, #Gates, Gate depth)by all zero-NOTcircuits inusnistgov/Circuitsat commit21f076fa(2026-11-18) andPR #1(and9of the11remain non-dominated when circuits with unaryNOTgates are included).Comparison with the Repository (
commit 21f076fa,2026-11-18)GD = 10(92XOR gates):aes-invmixcols-xor92-depth10.circ.txtreduces theGD = 10gate count from93(aes-invmixcols-xor93-depth10.circ.txt) to92and dominatesaes-invmixcols-xor92-depth11.circ.txt(92@11) along with8other existingaes-invmixcols/files. (A second non-isomorphic92@10{XOR}circuit with value-set symmetric difference40is archived in the companion repository.)GD = 13..15:aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txt(33/4/111/14):12fewer gates thanaes-invsbox-a33-ad4-g123-gd14-xx90-16.circ.txt(33/4/123/14) at the same#AND = 33, AD = 4, GD = 14, dominating14existingaes-invsbox/files.aes-invsbox-a33-ad4-g109-gd15-xx76-36.circ.txt(33/4/109/15):9fewer gates thanaes-invsbox-a33-ad4-g118-gd15-xx85-9.circ.txt(33/4/118/15) and8fewer depth levels thanaes-invsbox-a33-ad4-g109-gd23-xx76-11.circ.txt(33/4/109/23), dominating8existing files.aes-invsbox-a35-ad4-g129-gd13-xx94-42.circ.txt(35/4/129/13):2fewer gates thanaes-invsbox-a35-ad4-g131-gd13-xx96-14.circ.txt(35/4/131/13), dominating8existing files.GD = 10with#NOT = 0:aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txt(57/4/152/10) andaes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txt(56/4/155/10) reduce the zero-NOTInvS-boxdepth fromGD = 12inmaster(aes-invsbox-a45-ad4-g141-gd12-xx96-25.circ.txt) andGD = 11inPR #1(55/4/143/11) toGD = 10.#AND = 32and#AND = 28(GD = 16..19):aes-invsbox-a32-ad5-g116-gd16-xx84-46.circ.txt(32/5/116/16):12fewer gates thanaes-invsbox-a32-ad5-g128-gd16-xx96-23.circ.txt(32/5/128/16) and9fewer gates than32/5/125/15;aes-invsbox-a32-ad5-g114-gd19-xx82-17.circ.txt(32/5/114/19) reaches114gates atGD = 19(GD = 20has32/5/110/20).aes-invsbox-a28-ad4-g143-gd16-xx115-59.circ.txt(28/4/143/16):7fewer gates thanaes-invsbox-a28-ad4-g150-gd16-xx122-27.circ.txt(28/4/150/16), dominating8existing files;aes-invsbox-a28-ad4-g134-gd19-xx106-46.circ.txt(28/4/134/19):6fewer gates thanaes-invsbox-a28-ad4-g140-gd19-xx112-30.circ.txt(28/4/140/19) and dominatesaes-invsbox-a28-ad4-g135-gd20-xx107-35.circ.txt(28/4/135/20), dominating9existing files.GD = 14(119gates):aes-sbox-a37-ad4-g119-gd14-xx82-33.circ.txt(37/4/119/14) uses2fewer total gates thanaes-sbox-a33-ad4-g121-gd14-xx88-23.circ.txt(33/4/121/14, commit21f076fa), trading#AND = 37vs#AND = 33.Verification & Formatting
Each circuit was verified exhaustively against NIST FIPS 197 (
InvMixColumns()on all32GF(2)basis vectors;SBox()/InvSBox()on all256input bytes), together with an independent recomputation of gate tallies, gate depth,ANDdepth,Gates per gate level,AND gates per AND level, sequentiala1:aA/t1:tTinternal wire numbering, and zero dead gates across all218files inaes-invmixcols/(43),aes-invsbox/(89), andaes-sbox/(86).Conventions match the existing files:
x0:x31 -> y0:y31(LSB = 0within each byteb = 0:3) foraes-invmixcols/,x0:x7 -> y0:y7(MSB = 0) foraes-invsbox/, andU0:U7 -> S0:S7(MSB = 0) foraes-sbox/. To avoid merge conflicts, theREADME.mdsummary tables are left untouched.Construction & Companion Verification Package
aes-invmixcols-xor92-depth10.circ.txtwas synthesized via incrementaluint64_tvalue-set plateau walks and connected-cone2->1/2->2/3->2Meet-in-the-Middle linear synthesis (HiGHSTop-2-Layer MILP confirms its75-gateGD <= 8prefix is optimal atGD <= 10).aes-invsbox-a57-ad4-g152-gd10-xx95-25.circ.txtandaes-invsbox-a56-ad4-g155-gd10-xx99-26.circ.txtexploit the0x63affine input shift ofInvS-box(z = A_AES^-1(x ^ 0x63)), which makes8 / 15nonzeroGF(2^4)subfield norm masks (z^17, rank4 / 4) reachable atGD <= 3without unaryNOTgates (whereas unshifted forwardS-boxreaches2 / 15masks of rank2 < 4).aes-invsbox-a33-ad4-g111-gd14-xx78-39.circ.txtand theGD = 13..19circuits combine 3-levelGF(2^4)normal-basis inverter joins, partial distributiveGD = 11ANDsplitting (A = 33 -> 34 -> 33saddle traversal), observable don't-care (ODC)AND-window replacement, and deadline-aware linear resynthesis.< 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* (
PROOFERpowered by Gemini + @mizopl)