[Paper Review] Generating and Exploring S-Box Multivariate Quadratic Equation Systems with SageMath
This paper presents a SageMath-based method to automatically generate and analyze multivariate quadratic (MQ) equation systems for cryptographic S-boxes, such as Rijndael's. It demonstrates that commonly used algebraic attack resistance (RAA) metrics—like those proposed by Cui et al.—fail to predict actual solving difficulty, as shown by SAT solver experiments revealing no meaningful correlation between metric scores and actual computational effort.
A new method to derive Multivariate Quadratic equation systems (MQ) for the input and output bit variables of a cryptographic S-box from its algebraic expressions with the aid of the computer mathematics software system SageMath is presented. We consolidate the deficiency of previously presented MQ metrics, supposed to quantify the resistance of S-boxes against algebraic attacks.
Motivation & Objective
- To develop an automated, transparent method for generating multivariate quadratic (MQ) equation systems from S-box algebraic expressions.
- To critically evaluate the validity of existing RAA (resistance against algebraic attacks) metrics proposed by Cui et al. and Courtois-Pieprzyk.
- To demonstrate that the claimed improved S-box (SAIA) by Cui et al. is not cryptographically superior, despite high RAA metric scores.
- To show that SageMath enables rapid, verifiable analysis of MQ systems and their Gröbner bases for S-box evaluation.
- To challenge the assumption that higher metric values (e.g., log2(Γ), log2(ΓCP)) indicate greater resistance to algebraic attacks.
Proposed method
- Utilizes SageMath to construct polynomial rings over GF(2) and quotient rings modulo the irreducible polynomial m(t) = t^8 + t^4 + t^3 + t + 1.
- Models input, intermediate, and output byte variables as multivariate polynomials in GF(2)[t]/(m(t)) using Lagrange interpolation and modular inversion.
- Automatically derives MQ systems by expanding the composition of inverse and affine transformations (SRD = A ∘ I).
- Generates Gröbner bases for the resulting MQ systems using SageMath’s integration with PolyBoRi/BRiAl.
- Employs SAT solvers to compute actual solution times for MQ systems as a practical measure of algebraic attack hardness.
- Compares theoretical RAA metric scores (e.g., log2(Γ), log2(ΓCP)) with empirical SAT solver performance to test their predictive validity.
Experimental results
Research questions
- RQ1Do the RAA metrics proposed by Cui et al. accurately predict the difficulty of solving MQ systems derived from S-boxes?
- RQ2Is the S-box SAIA, claimed to be more resistant to algebraic attacks, actually harder to solve than the original Rijndael S-box?
- RQ3Can SageMath be effectively used to automate and verify the generation of MQ systems and their analysis for cryptographic S-boxes?
- RQ4Why do high RAA metric scores fail to correlate with actual solving times in SAT solvers?
- RQ5Can a more complex algebraic expression for an S-box lead to a simpler, more easily solvable MQ system?
Key findings
- The Rijndael S-box MQ with 23 equations and 81 monomials is solved in 0.6 seconds by a SAT solver, while the SAIA S-box MQ with 2,039 equations and 18,232 monomials takes 7 seconds—contradicting predictions of increased hardness.
- The SAIA S-box, despite having a log2(ΓCP) score of 28.5 (vs. 20.0 for Rijndael), is not significantly harder to solve than the original, with SAT solver time increasing only from 0.6s to 7s.
- A simpler MQ system for SAIA, derived via algebraic simplification, results in only 32 equations and 137 monomials, solvable in 0.8s—comparable to the original Rijndael’s 0.7s.
- The Gröbner basis of the SAIA MQ has 8 equations of degree 7 with 263 monomials, and its SAT solution time (0.15s) is faster than that of the original Rijndael’s Gröbner basis (0.7s).
- No consistent correlation was found between RAA metric scores (e.g., log2(Γ), log2(ΓCP)) and actual SAT solver runtime, invalidating their use as reliable hardness predictors.
- The original Rijndael S-box, when mapped into the AIA form of Cui et al., produces a 2,039-equation MQ with 18,232 monomials—demonstrating that complex expressions do not inherently yield harder systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.