class: middle, center # Coppersmith's method and generalizations [Luca De Feo](http://defeo.lu/) ([UVSQ](http://www.uvsq.fr)) December 10, 2014, [CLIC 2014](http://idealcodes.github.io/clic-2014) .license[ ![Creative Commons Licence](https://i.creativecommons.org/l/by/4.0/80x15.png) [CC BY 4.0](http://creativecommons.org/licenses/by/4.0/) ] --- # Reminder on lattices A lattice in $ℝ^n$ is a *discrete subgroup* of $ℝ^n$ of rank $n$. .center[![](../Lattice-reduction.svg)] A lattice is also - An **abelian group**, - A free **$ℤ$-module** of rank $n$. --- # Lattice reduction Endow $ℝ^n$ with the $ℓ_2$ norm $$|v|\_2 = \sqrt{\sum\_{i=1}^n|v\_i|^2}$$ **Fundamental problem:** find *shortest* vectors (by the $ℓ_2$ norm). -- ### Fundamental tool: LLL
(Lenstra–Lenstra–Lovász)
**Input:** A lattice $Λ ⊂ ℝ^n$ given by a basis. **Output:** A nonzero *somewhat short* vector $v ∈ Λ$ satisfying $$|v|_2 ≤ 2^{(n-1)/4} \det(Λ)^{1/n}.$$ **Complexity:** polynomial-time. ??? In place of 2: anything > 4/3 --- # Small roots of modular equations **Input** - $f$ be a polynomial of degree $d$, - $N$ an integer (of *unknown factorization*). **Output:** All *small integers* $w$ such that *$f(w) = 0 \bmod N$*. ### Coppersmith's theorem All $w$ such that *$|w| < N^{1/d}$* can be found in time polynomial in $\log N$ and $d$. --- # Application: RSA with stereotyped messages Consider an RSA implementation with $N=pq$ and with *small public key* (e.g.: $k_p=3$). Suppose *a portion $B$* of the cleartext $m$ is *already known*, say the high-order bits, so that $$m = 2^aB + x$$ with $|x|
N^{1/2+o(1)},$$ then necessarily *$f(w)=p$*. ??? ALL w are found by the algorithm! --- # Other applications - $N = p^rq$ with large $r$. [Boneh, Durfee, Howgrave-Graham, 1999](). - $N = pq$ with fixed pattern padding. [Brier, Clavier, Coron, Naccache, 2001](). - $N = pq$, with small secret CRT-exponents, or with $d < N^{0.29}$. [Bleichenbacher and May, 2006. Boneh and Durfee, 1999](). - $N = pq$ combined attack on CRT-RSA. [Barbu, Battistello, Dabosville, Giraud, Renault, Renner, Zeitoun, 2013](). - ... --- # Integers vs polynomials
$ℤ$
$k[X]$
Primes
Irreducible polynomials
Size
Degree
Integer lattices
Polynomial lattices
Number fields
Function fields
.green[Euclidean division]
.green[Euclidean division]
.green[GCD]
.green[GCD]
.red[Factorization]
.green[Factorization]
.red[Discrete log in $𝔽_p$]
.orange[Discrete log in $𝔽_2[X]/I(X)$]
--- # Polynomial lattices Let $k$ be a field, and let $k[z]$ be the polynomial ring on $k$. **Definition:** A *polynomial lattice* is a free $k[z]$-module of finite rank. - It is an *abelian group*; - Elements of $k[z]$ act as *scalar multiplication*; - It has a *finite basis* (it is isomorphic to $k[z]^n$). ## Short vectors Define the *length* (or degree) of a vector $v(z)$ in $k[z]^n$ as $$\deg (v_1(z), v_2(z), \dots, v_n(z)) = \max_i \deg v_i(z).$$ It is a *non-Archimedean norm*. --- # Polynomial lattice reduction ## Row-reduced bases **Definition:** A basis $V = (v_1,\dots,v_n)$ of a polynomial lattice $Λ$ is said to be *row-reduced* if $$\deg V \triangleq \sum_i \deg v_i = \deg\det(Λ),$$ or, equivalently, if $\deg V$ is minimal among all bases of $V$. ### Theorem (see [Romain's talk](/clic-2014/abstracts/#Romain Lebreton)) - A row reduced basis always contains a *shortest vector* of $Λ$. - A row reduced basis can be computed in time $\tilde{O}(n^ω \max\deg v_i)$. --- # Coppersmith's method for $k(z)$ ### Theorem (Alekhnovic, Bernstein, Boneh, Coppersmith, ..., [Cohn–Heninger 2011](#references)) Let $f(x)$ be a polynomial of degree $d$, with coefficients in $k[z]/N(z)$. Let $n=\deg_z N$. For any $0<β≤1$, all polynomials $w(z)$ with $$\deg_z w < \frac{β^2 n}{d}$$ such that $$\deg_z\gcd\bigl(f(w(z)), N(z)\bigr) ≥ βn$$ can be found in polynomial time in $d$ and $n$. ??? In principle, since $N$ can be factored efficiently, all roots of $f$ could be described --- # Reed-Solomon codes Let $𝔽_q$ be a finite field, let *$x_1,\dots,x_n\in 𝔽_q$*. A *Reed-Solomon code* of length $n$ and dimension $k$ is the space $$RS(n,k) = \\{(w(x_1), \dots, w(x_n)) \;\mid\; w(z)\in 𝔽_q[z]_k \\},$$ where $𝔽_q[z]_k$ is the space of all polynomials of degree at most $k$. ### Reed-Solomon decoding problem Given a list of points *$(y_1,\dots,y_n)$*, find an element $w(z)$ of $𝔽_q[z]_k$ such that $$w(x_i) = y_i$$ for at least $n-e$ pairs $(x_i,y_i)$ (we will determine $e$ later). --- # Decoding via Coppersmith's method 1. Set *$N(z) = \prod_i (z-x_i)$*. 1. Construct (by interpolation) a polynomial $f(x)$ with coefficients in $𝔽_q[z]/N(z)$ such that for any $i$ $$f(x) = x - y_i \mod (z-x_i).$$ 1. Suppose *$w(x_i) = y_i$*, then $$f(w(z)) = 0 \bmod (z-x_i).$$ Find, by Coopersmith's algorithm. a $w(z)$ of degree at most $k$ satisfying this condition for at least $n-e$ of the $x_i$, i.e. such that $$\deg_z \gcd\bigl(f(w(z)), N(z)\bigr) ≥ n-e.$$ **Remark:** The theorem then implies *$e