decomp(aes): select best of all four-state declaration orders #1088

Merged
coah80 merged 1 commits from agent/bittle/aes-exhaustive-final into main 2026-10-03 09:22:54 +00:00
coah80 commented 2026-10-03 09:21:44 +00:00 (Migrated from github.com)

Scope and objective

Reorders only the four existing uninitialized AESiDecryptBlock state declarations from d,b,c,a to b,a,c,d. All remaining source is byte-identical. No initializer/expression/type/scope/helper/table/ABI/linking change.

Official fuzzy improves 76.70518% → 78.95618%; unit83.64971% →84.47093%. This is an honest partial. The official declsearch structural/positional score gets worse: (60,205) →(68,215). Both are disclosed because that auxiliary score is not the requested official-fuzzy objective. Function stays251/251 instructions; encryption remains65.81013% and unchanged.

Exhaustive bounded experiment

The earlier17-order local search did not measure official fuzzy at each step. One separately authorized finite enumeration compiled all24 permutations of these same four declarations, including a fresh accepted baseline, and generated official reports and preservation gates for each. No compiler suppression or altered search tool. Each source/object hash and result is recorded; all24 orders passed exact/code/data/sibling gates. There are12 distinct objects. bacd and bcad tie at78.95618% and emit identical objects; bacd is retained. This exhausts this fixed four-declaration space only.

A read-only replay using the measured scores reproduces the earlier structural-first trajectory abcd→bacd→dacb→dbca: the higher-fuzzy form was an intermediate improvement displaced by the different ranking objective. This is not a new algorithm or behavioral reconstruction.

Independent parent verification on b25e0377

  • Freshly rebuilt final candidate; full1027-unit and allocated-object comparisons show only AES text changes, no fuzzy/exact/code/data regressions, all45 relocations/nontext data unchanged
  • All8 sibling bodies, exact7/9, matched code1116/2752 and data2800/2800 preserved
  • Parent audited all24 saved sources/objects/hashes, real build logs, reports and gates, then independently compiled the final candidate and current-main baseline under UBSan
  • Each source passes2406 AES-128/192/256 CBC known-answer/randomized cases, including in-place/incremental calls; candidate passes2688 direct-block partial input/output overlaps
  • Actual source/original final-round interpreter passes4608 state/key-overlap publication cases, preserving interleaved key loads and output stores. Diagnostic alias checks do not imply a new public API contract or whole-Wii runtime proof
  • Pool4/4 identical; literal audit9 functions /5 arguments, no candidates/skips/errors
  • Full default progress/43U/ok, worktree/diff gates pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d

Candidate object SHA2561a37fcb561221b6b60fb66feaf06411cc02fafef101d705b60ce2c69a4379569. Uploaded treee6b71a9118849cb2320ba2e949a2db98af07d504 equals independently tested tree. Evidence includes complete per-order table and explicit limits. No merge or auto-merge requested.

Note

Reorder four state declarations in AESiDecryptBlock to b, a, c, d

Reorders the four local u32 declarations in AESiDecryptBlock to b, a, c, d, the best of all 24 candidate orders. No logic, API, or control flow changed. Adds an exhaustive experiment report in allhands-aes-state-order-exhaustive.attempts.md covering fuzzy scores, object hashes, and reproduction commands.

Macroscope summarized dbb2611.

## Scope and objective Reorders only the four existing uninitialized AESiDecryptBlock state declarations from d,b,c,a to b,a,c,d. All remaining source is byte-identical. No initializer/expression/type/scope/helper/table/ABI/linking change. Official fuzzy improves 76.70518% → 78.95618%; unit83.64971% →84.47093%. This is an honest partial. The official declsearch structural/positional score gets worse: (60,205) →(68,215). Both are disclosed because that auxiliary score is not the requested official-fuzzy objective. Function stays251/251 instructions; encryption remains65.81013% and unchanged. ## Exhaustive bounded experiment The earlier17-order local search did not measure official fuzzy at each step. One separately authorized finite enumeration compiled all24 permutations of these same four declarations, including a fresh accepted baseline, and generated official reports and preservation gates for each. No compiler suppression or altered search tool. Each source/object hash and result is recorded; all24 orders passed exact/code/data/sibling gates. There are12 distinct objects. bacd and bcad tie at78.95618% and emit identical objects; bacd is retained. This exhausts this fixed four-declaration space only. A read-only replay using the measured scores reproduces the earlier structural-first trajectory abcd→bacd→dacb→dbca: the higher-fuzzy form was an intermediate improvement displaced by the different ranking objective. This is not a new algorithm or behavioral reconstruction. ## Independent parent verification on b25e0377 - Freshly rebuilt final candidate; full1027-unit and allocated-object comparisons show only AES text changes, no fuzzy/exact/code/data regressions, all45 relocations/nontext data unchanged - All8 sibling bodies, exact7/9, matched code1116/2752 and data2800/2800 preserved - Parent audited all24 saved sources/objects/hashes, real build logs, reports and gates, then independently compiled the final candidate and current-main baseline under UBSan - Each source passes2406 AES-128/192/256 CBC known-answer/randomized cases, including in-place/incremental calls; candidate passes2688 direct-block partial input/output overlaps - Actual source/original final-round interpreter passes4608 state/key-overlap publication cases, preserving interleaved key loads and output stores. Diagnostic alias checks do not imply a new public API contract or whole-Wii runtime proof - Pool4/4 identical; literal audit9 functions /5 arguments, no candidates/skips/errors - Full default progress/43U/ok, worktree/diff gates pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d Candidate object SHA2561a37fcb561221b6b60fb66feaf06411cc02fafef101d705b60ce2c69a4379569. Uploaded treee6b71a9118849cb2320ba2e949a2db98af07d504 equals independently tested tree. Evidence includes complete per-order table and explicit limits. No merge or auto-merge requested. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Reorder four state declarations in `AESiDecryptBlock` to b, a, c, d > Reorders the four local `u32` declarations in `AESiDecryptBlock` to b, a, c, d, the best of all 24 candidate orders. No logic, API, or control flow changed. Adds an exhaustive experiment report in [allhands-aes-state-order-exhaustive.attempts.md](https://github.com/coah80/wii-ipl/pull/1088/files#diff-506e3f8d2f3800d4701f57c4352539bee216ea01f75c69dd6a65877fb41b9f1f) covering fuzzy scores, object hashes, and reproduction commands. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized dbb2611.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 09:22:52 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.