Coppersmith's attack describes a class of cryptographic attacks on the public-key cryptosystem RSA based on the Coppersmith method. Particular applications of the Coppersmith method for attacking RSA include cases when the public exponent e is small, when the private key d is small, or when partial knowledge of a prime factor of the secret key is available.
Overview
The public key in the RSA cryptosystem is a pair of integers (N,e), where N=pq is a product of two primes with Euler totient φ(N)=(p−1)(q−1), and e<φ(N) is chosen to be coprime with φ(N). The secret key is given by an integer d satisfying ed≡1 (mod φ(N)). A message is an integer M<N (for example the binary representation of a string), and encryption produces a ciphertext C≡Me (mod N), which can be decrypted using d by computing M≡Cd(mod N). Such exponentiation may be performed by exponentiation by squaring and requires a number of arithmetic operations linear in the number of bits of e and d. In order to improve encryption and decryption speeds, smaller values of e and d are desirable. A safe reduction which gives a mathematically equivalent and faster decryption algorithm is known as CRT-RSA. In this scheme, the secret is given by two smaller integers, dp≡d (mod p−1) and dq≡d (mod q−1). Encryption is performed as before, but decryption is formed by computing Mp=Cdp (mod p) and Mq=Cdq (mod q) and applying the Chinese remainder theorem to combine Mp,Mq into the message M. Coppersmith's attack primarily concerns the case when the exponents e or d are chosen to be too small. For example, e is often chosen to be one of the Fermat primes 3,17 or 65537. Prime values for e are desirable because they can be quickly checked if they are coprime with φ(N), leading to faster key generation. Employing small values of d leads to complete attacks such as Wiener's attack, a sort of instance of the Coppersmith method , while small values of e (such as e=3) still leads to attacks in certain situations. For example, the simplest possible instance of the attack would be when both e and the message M are too small, such as e=3 and M<N1/3. In this case, the ciphertext satisfies C=M3 as integers (not merely as a congruence), and the message M may be recovered as the integer cube root of C. The Coppersmith method generalizes this case by considering polynomials other than Me, such as those resulting from padding or polynomials on the public key itself.
Coppersmith's theorem
A simplified version of Coppersmith's theorem is stated as follows. All polynomials will be assumed to have integer coefficients, and we say a polynomial is monic modulo N if its leading coefficient is 1 mod N. Let N be an integer. If f(x) is a polynomial of degree d which is monic modulo N, then the modular equation f(x)≡0 (mod N) may be efficiently solved for all "small" solutions x0, more precisely those satisfying |x0|<Nδ for a fixed δ<1/d. Informally, in computational terms, if N is n bits long, then it is possible to efficiently recover the roots of a degree d polynomial modulo N whose bit length is less than n/d bits. Note that we require the bound on logNx0 to be bounded away from 1/d. The closer this bound is to 1/d, the less efficient the method becomes. All instances of Coppersmith's attack involve expressing the message, or an essential piece of information about the cryptosystem, as a small root for some modular polynomial equation. The Chinese remainder theorem may be employed to obtain equations with larger moduli, thus increasing the threshold on the small root condition in Coppersmith's theorem.
Håstad's broadcast attack The simplest form of Håstad's attack is presented to ease understanding. The general case uses the Coppersmith method. Suppose one sender sends the same message M to multiple people P1,P2,…,Pk, using distinct moduli N1,N2,…,Nk but the same small public exponent, say e=3. If Eve intercepts three of the ciphertexts (for e=3), then she may recover M efficiently. Indeed, suppose Eve intercepts three of the ciphertexts, C1,C2,C3 satisfying Ci≡M3 (mod Ni). By the Chinese remainder theorem, she may combine these into an integer 0≤C<N1N2N3 satisfying C≡M3 (mod N1N2N3). Here we assume gcd(Ni,Nj)=1, or else we may factor some Ni and compute M directly. However, since M<Ni for each i, we have M3<N1N2N3. Therefore, the congruence implies an actual equality C=M3 over the integers, and Eve may efficiently compute the integer cube root of C to obtain the message M. For larger values of e, the same method allows Eve to compute M with e ciphertexts by use of an integer root algorithm.
Generalization to linear pads We still suppose the sender is sending M to multiple people, but now they pad the message by some different (but publicly known) amount for each recipient. Håstad also showed that such a scheme (or any scheme involving a fixed linear padding) does not protect against the above attack. Indeed, the polynomial Mie is now replaced by Ci=fi(M)e for some fixed linear functions fi based on the pads. For example, if M if m bits long, the padding may be fi(M)=i2m+M. Given monic polynomials gi(x) satisfying gi(M)≡0 (mod Ni), we may construct a polynomial g(x) with degree equal to the maximum degree of the gi(x), such that g(M)≡0 (mod N‾) where N‾=N1⋯Nk, and is monic modulo N‾. Note that we may suppose the gi(x) are monic modulo Ni or else we may factorize Ni just like before. In our case, the polynomials have degree e, and if Eve obtains k>e such ciphertexts Ci, if M<Ni for all i then M<N‾1/k, so that Coppersmith's theorem applies with δ=1/k<1/deg(g) in order to recover M. This attack suggests that randomized padding should be used in RSA encryption.
… excerpt ends here. Continue reading the full article.