Coppersmith method explained
The Coppersmith method, proposed by Don Coppersmith, is a method to find small integer zeroes of univariate or bivariate polynomials modulo a given integer. The method uses the Lenstra–Lenstra–Lovász lattice basis reduction algorithm (LLL) to find a polynomial that has the same zeroes as the target polynomial but smaller coefficients.
In cryptography, the Coppersmith method is mainly used in attacks on RSA when parts of the secret key are known and forms a base for Coppersmith's attack.
Approach
Coppersmith's approach is a reduction of solving modular polynomial equations to solving polynomials over the integers.
Let
and assume that
for someinteger
.Coppersmith’s algorithm can be used to find this integer solution
.
Finding roots over is easy using, e.g., Newton's method, but such an algorithm does not work modulo a composite number . The idea behind Coppersmith’s method is to find a different polynomial related to that has the same root
modulo, but has only small coefficients. If the coefficients and
are small enough that
over the integers, then we have
, so that
is a root of over and can be found easily. More generally, we can find a polynomial
with the same root
modulo some power
of, satisfying
, and solve for
as above.
Coppersmith's algorithm uses the Lenstra–Lenstra–Lovász lattice basis reduction algorithm (LLL) to construct the polynomial with small coefficients.Given, the algorithm constructs polynomials
that all have the same root
modulo
, where is some integer chosen based on the degree of and the size of
.Any
linear combination of these polynomials also has
as a root modulo
.
The next step is to use the LLL algorithm to construct a linear combination
of the
so that the inequality
holds.Now standard factorization methods can calculate the zeroes of
over the integers.
Implementations
Coppersmith's method for univariate polynomials is implemented in
- Magma as the function
SmallRoots
;
- PARI/GP as the function
zncoppersmith
;
- SageMath as the method
small_roots
.
References
- Book: Coppersmith, D.. Advances in Cryptology — EUROCRYPT '96 . Finding a Small Root of a Univariate Modular Equation . Lecture Notes in Computer Science . 1070 . 155–165 . 1996 . 10.1007/3-540-68339-9_14. 978-3-540-61186-8 . free .
- Book: Coppersmith, D. . Advances in Cryptology — EUROCRYPT '96 . Finding a Small Root of a Bivariate Integer Equation; Factoring with High Bits Known . Lecture Notes in Computer Science . 1070 . 178–189 . 1996 . 10.1007/3-540-68339-9_16. 978-3-540-61186-8 . free .
- Book: Coron, J. S. . Advances in Cryptology - EUROCRYPT 2004 . Finding Small Roots of Bivariate Integer Polynomial Equations Revisited . Lecture Notes in Computer Science . 2004 . 3027. 492–505 . 10.1007/978-3-540-24676-3_29 . 978-3-540-21935-4 . https://iacr.org/archive/eurocrypt2004/30270487/bivariate.pdf.
- Book: A. . Bauer . A. . Joux . Advances in Cryptology - EUROCRYPT 2007 . Toward a Rigorous Variation of Coppersmith's Algorithm on Three Variables . Lecture Notes in Computer Science . Antoine Joux . 4515 . 2007 . 361–378 . 10.1007/978-3-540-72540-4_21 . 978-3-540-72539-8 . free .
- Book: Coron, J. S. . Advances in Cryptology - CRYPTO 2007 . Finding Small Roots of Bivariate Integer Polynomial Equations: A Direct Approach . Lecture Notes in Computer Science . 2007 . 4622 . 379–394 . 10.1007/978-3-540-74143-5_21 . 978-3-540-74142-8 . https://iacr.org/archive/crypto2007/46220372/46220372.pdf.