YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
AES-128 Algebraic Verification Suite
A complete, open-source toolkit for verifying the algebraic security properties of AES-128. Includes GF(2^8) arithmetic, S-box verification, corrected MILP differential trail search, GF(2) Jacobian rank computation, and formal Lean 4 proofs.
What This Is
This suite provides machine-verified evidence that AES-128 resists algebraic cryptanalysis through 10 rounds. It formalizes the "Topography of Failure" β proving exactly WHERE and WHY algebraic attack strategies hit mathematical walls.
Key Results
| Rounds | Active S-boxes | Trail Weight | Probability | Status |
|---|---|---|---|---|
| 4 | 25 | 150 bits | 2^-150 | Tight bound (Daemen-Rijmen) |
| 5 | 26 | 156 bits | 2^-156 | Verified |
| 6 | 30 | 180 bits | 2^-180 | Verified |
| 7 | 34 | 204 bits | 2^-204 | Verified |
| 8 | 50 | 300 bits | 2^-300 | Security wall |
Terminal Result: Full 10-round AES-128 resists algebraic inversion. No operator Q exists with Cost(Q) < 2^97.
Components
Python Tools (src/)
gf256.pyβ GF(2^8) field arithmetic (multiply, power, inverse, all verified)sbox.pyβ AES S-box as x^254 + affine transform (verified against standard table)jacobian.pyβ GF(2) Jacobian computation and rank analysis (128x128 over F_2)trail_search.pyβ Corrected MILP differential trail search (4-8 rounds)verify_all.pyβ Run all verifications and print results
Lean 4 Proofs (lean4/)
AES_Trail_Invariants.leanβ Differential trail bounds, MDS branch number, monotonicityAES_Algebraic_Structure.leanβ R_NL decomposition, rank vs inversion theoremAES_Terminal_Result.leanβ Three walls (diffusion + nonlinearity + entanglement)
All proofs are zero sorry β fully discharged.
Results (results/)
TERMINAL_RESULT.mdβ Complete 10-round analysis documentation
Quick Start
# Install dependency
pip install pulp
# Run all verifications
python src/verify_all.py
# Run just the trail search (4-8 rounds)
python src/trail_search.py
# Check Lean 4 proofs (requires Lean 4 + Mathlib)
cd lean4 && lake build
The Three Walls
Wall 1: Diffusion (MDS Branch Number 5)
MixColumns spreads 1 active byte to 4 per round. After 4 rounds: minimum 25 active S-boxes. After 10 rounds: 63+, probability 2^-378+.
Wall 2: Nonlinearity (S-box Degree 254)
S(x) = x^254 in GF(2^8). Effective algebraic degree after 10 rounds: ~127. No polynomial shortcut below exponential complexity. Linearization provably causes information loss.
Wall 3: Key Schedule Entanglement
11 round keys (1408 bits) determined by 128-bit key. No divide-and-conquer below 2^97.
Novel Contributions
- B_A Failure Proof: Formal proof that linearization implies information loss (rank-deficient Jacobian)
- Rank vs Inversion Boundary: rank_{F_2} = 128 is necessary but NOT sufficient for efficient inversion
- Corrected MILP: Fixed ShiftRows indexing bug in standard trail search formulation
- Constraint System C: Reduced full AES break to single functional requirement (existence of Q)
Citation
If you use this suite in research:
@software{aes_verification_suite_2026,
title={AES-128 Algebraic Verification Suite},
author={SNAPKITTYWEST},
year={2026},
url={https://github.com/SNAPKITTYWEST/aes-verification-suite}
}
License
Tri-licensed under AGPL-3.0 (default for open-source redistribution) with BSL-1.1 and MPL-2.0 options.
See LICENSE for full terms. License selection governed by the SNAPKITTYWEST License Policy Engine.