-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Motivation
Add the Multivariate Quadratic (MQ) problem over F_2, a core problem in post-quantum cryptography and algebraic cryptanalysis. This fills a gap in the project by introducing polynomial equation solving over the Boolean field, which is fundamental to multivariate public-key cryptosystems (MPKC) and algebraic attacks on symmetric ciphers. MQ over F_2 is polynomial-time interreducible with SAT, connecting it directly to the existing reduction graph.
Associated reduction rules:
- [Rule] Satisfiability to MultivariateQuadratic #131: [Rule] Satisfiability → MultivariateQuadratic
- [Rule] MultivariateQuadratic to Satisfiability #132: [Rule] MultivariateQuadratic → Satisfiability
Definition
Name: MultivariateQuadratic
Reference:
- Patarin, J. (1996). "Hidden Fields Equations (HFE) and Isomorphisms of Polynomials (IP): Two New Families of Asymmetric Algorithms."
- Ding, J., & Yang, B. Y. (2009). "Multivariate Public Key Cryptography." In Bernstein, Buchmann & Dahmen (eds.), Post-Quantum Cryptography, Springer, DOI: 10.1007/978-3-540-88702-7_6
- Multivariate cryptography (Wikipedia)
Given m quadratic polynomials f_0, f_1, ..., f_{m-1} over F_2 = {0, 1} with n binary variables x_0, x_1, ..., x_{n-1}, determine whether there exists a solution x ∈ F_2^n such that all equations are satisfied:
f_0(x_0, ..., x_{n-1}) = 0
f_1(x_0, ..., x_{n-1}) = 0
...
f_{m-1}(x_0, ..., x_{n-1}) = 0
where each f_i is a quadratic polynomial of the form:
f_i(x) = Σ_{0 ≤ j ≤ k < n} a_{ijk} x_j x_k + Σ_{j=0}^{n-1} b_{ij} x_j + c_i, where a_{ijk}, b_{ij}, c_i ∈ F_2
Note: over F_2, x_j^2 = x_j, so squared terms are absorbed into linear terms. The quadratic terms are only cross-terms x_j x_k with j < k.
Note: This is the decision version (does a solution exist?), distinct from the search version (find a solution).
Variables
- Count: n (number of binary variables)
- Per-variable domain: {0, 1} (elements of F_2)
- Meaning: x_i ∈ {0, 1} represents the i-th binary variable in the polynomial system. A valid assignment satisfies all m equations simultaneously (all f_i evaluate to 0 mod 2).
Schema (data type)
Type name: MultivariateQuadratic
Variants: none (F_2 only)
| Field | Type | Description |
|---|---|---|
| num_variables | usize | Number of binary variables n |
| equations | Vec | List of m quadratic polynomials over F_2 |
Where QuadraticPoly contains:
quadratic_terms: Vec<(usize, usize)> — pairs (j, k) with j < k where the coefficient a_{jk} = 1 (only store nonzero terms; all coefficients are 0 or 1 in F_2)linear_terms: Vec — indices j where the coefficient b_j = 1constant: bool — constant term c_i (true = 1, false = 0)
Getter methods: num_variables(), num_equations() (used in declare_variants! complexity strings and #[reduction(overhead)] expressions).
Notes:
- This is a satisfaction (decision) problem:
Metric = bool, implementingSatisfactionProblem. - Restricted to F_2 (Boolean field). Extension to general F_q is future work.
- Over F_2, coefficients are in {0, 1}, so only nonzero terms need to be stored.
Complexity
- Best known exact algorithm: Dinur (SODA 2021) gives a randomized algorithm running in O(1.6181^n) time for solving degree-2 polynomial systems over F_2. This improves over Lokshtanov et al. (SODA 2017) who first beat brute force with O(2^{0.876n}), and Björklund et al. (ICALP 2019) who gave an intermediate improvement.
declare_variants!complexity string:"1.6181^num_variables"(Dinur, SODA 2021)- Complexity class: NP-complete over F_2 in the decision setting.
- References:
- I. Dinur (2021). "Improved Algorithms for Solving Polynomial Systems over GF(2) by Multiple Parity-Counting." SODA 2021, pp. 2550–2564.
- D. Lokshtanov, R. Paturi, S. Tamaki, R. Williams, H. Yu (2017). "Beating Brute Force for Systems of Polynomial Equations over Finite Fields." SODA 2017, pp. 2190–2202.
- Faugère, J. C. (1999). "A new efficient algorithm for computing Gröbner bases (F4)." Journal of Pure and Applied Algebra 139, pp. 61–88.
- Patarin, J. (1996). "Hidden Fields Equations (HFE) and Isomorphisms of Polynomials (IP)." EUROCRYPT 1996, LNCS 1070.
Extra Remark
Relationship to existing algebraic problems:
| Problem | MQ over F_2 | Key Difference |
|---|---|---|
| QUBO | Quadratic optimization over {0,1} | MQ: constraint satisfaction; QUBO: unconstrained optimization |
| ILP | Linear constraints over integers | MQ: quadratic constraints over F_2 |
| SAT | Boolean satisfiability | MQ over F_2 and SAT are polynomial-time interreducible; MQ uses polynomial equations, SAT uses CNF clauses |
Why MQ is distinct:
- Domain: Binary field F_2 (same domain as QUBO, but different problem type)
- Constraints: Quadratic equations = 0 (not unconstrained like QUBO, not linear like ILP, not clause-based like SAT)
- Problem type:
SatisfactionProblem(returns bool, not optimization objective) - Algorithms: Gröbner bases (F4/F5), XL algorithm, polynomial method — fundamentally different from SAT solvers (DPLL/CDCL)
Applications in cryptography:
- Post-quantum cryptography: HFE/UOV-style multivariate signature schemes and related MPKC constructions
- Algebraic attacks: Breaking stream ciphers, block ciphers via polynomial representation
How to solve
- It can be solved by (existing) bruteforce (enumerate all 2^n binary assignments)
- It can be solved by reducing to integer programming — binary variables with quadratic constraints linearized via auxiliary variables
- Other: Gröbner basis (F4/F5), XL algorithm, polynomial method (Dinur 2021)
Example Instance
Instance 1: F_2 — YES (satisfiable)
Field: F_2 = {0, 1}
Variables: n = 3 (x_0, x_1, x_2)
Equations:
f_0: x_0·x_1 + x_2 = 0
f_1: x_1·x_2 + x_0 = 0
Exhaustive check:
(0,0,0): f_0 = 0+0 = 0 OK, f_1 = 0+0 = 0 OK ← solution
(0,0,1): f_0 = 0+1 = 1 X
(0,1,0): f_0 = 0+0 = 0 OK, f_1 = 0+0 = 0 OK ← solution
(0,1,1): f_0 = 0+1 = 1 X
(1,0,0): f_0 = 0+0 = 0 OK, f_1 = 0+1 = 1 X
(1,0,1): f_0 = 0+1 = 1 X
(1,1,0): f_0 = 1+0 = 1 X
(1,1,1): f_0 = 1+1 = 0 OK, f_1 = 1+1 = 0 OK ← solution
Answer: YES
Solutions: (0,0,0), (0,1,0), (1,1,1)
Instance 2: F_2 — NO (unsatisfiable, with quadratic terms)
Field: F_2 = {0, 1}
Variables: n = 3 (x_0, x_1, x_2)
Equations:
f_0: x_0·x_1 + x_0·x_2 + x_0 = 0
f_1: x_0·x_1 + x_1·x_2 + x_1 + 1 = 0
f_2: x_0·x_2 + x_1·x_2 + x_2 + 1 = 0
Exhaustive check (all arithmetic mod 2):
(0,0,0): f_0 = 0 OK, f_1 = 0+0+0+1 = 1 X
(0,0,1): f_0 = 0 OK, f_1 = 0+0+0+1 = 1 X
(0,1,0): f_0 = 0 OK, f_1 = 0+0+1+1 = 0 OK, f_2 = 0+0+0+1 = 1 X
(0,1,1): f_0 = 0 OK, f_1 = 0+1+1+1 = 1 X
(1,0,0): f_0 = 0+0+1 = 1 X
(1,0,1): f_0 = 0+1+1 = 0 OK, f_1 = 0+0+0+1 = 1 X
(1,1,0): f_0 = 1+0+1 = 0 OK, f_1 = 1+0+1+1 = 1 X
(1,1,1): f_0 = 1+1+1 = 1 X
Answer: NO (all 8 assignments fail at least one equation)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status