This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
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.
The public key in the RSA cryptosystem is a pair of integers , where is a product of two primes with Euler totient , and is chosen to be coprime with .
The secret key is given by an integer satisfying . A message is an integer (for example the binary representation of a string), and encryption produces a ciphertext , which can be decrypted using by computing . Such exponentiation may be performed by exponentiation by squaring and requires a number of arithmetic operations linear in the number of bits of and .
In order to improve encryption and decryption speeds, smaller values of and are desired. 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, and . Encryption is performed as before, but decryption is formed by computing and and applying the Chinese remainder theorem to combine into the message .
Coppersmith's attack primarily concerns the case when the exponents or are chosen to be too small. For example, is often chosen to be one of the Fermat primes or . Prime values for are desirable because they can be quickly checked if they are coprime with , leading to faster key generation.
Employing small values of leads to complete attacks such as Wiener's attack, a sort of instance of the Coppersmith method , while small values of (such as ) still leads to attacks in certain situations. For example, the simplest possible instance of the attack would be when both and the message are too small, such as and . In this case, the ciphertext satisfies as integers (not merely as a congruence), and the message may be recovered as the integer cube root of . The Coppersmith method generalizes this case by considering polynomials other than , such as those resulting from padding or polynomials on the public key itself.
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 if its leading coefficient is mod .
Let be an integer. If is a polynomial of degree which is monic modulo , then the modular equation may be efficiently solved for all "small" solutions , more precisely those satisfying for a fixed .
Note that we require the bound on to be bounded away from . The closer this bound is to , 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.
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 to multiple people , using distinct moduli but the same small public exponent, say . Then if three ciphertexts are known, the message is no longer secure. Indeed, suppose Eve intercepts three of the ciphertexts, satisfying . By the Chinese remainder theorem, she may combine these into an integer satisfying . Here we assume , or else we may factor some and compute directly.
However, since for each , we have . Therefore, the congruence implies an actual equality over the integers, and Eve may efficiently compute the integer cube root of to obtain the message .
For larger values of , the same method allows Eve to compute with ciphertexts by use of an integer root algorithm.
We still suppose the sender is sending 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 is now replaced by for some fixed linear functions based on the pads. For example, if if bits long, the padding may be .
Given monic polynomials satisfying , we may construct a polynomial with degree equal to the maximum degree of the , such that where , and is monic modulo . Note that we may suppose the are monic modulo or else we may factorize just like before. In our case, the polynomials have degree , and if Eve obtains such ciphertexts , if for all then , so that Coppersmith's theorem applies with in order to recover .
This attack suggests that randomized padding should be used in RSA encryption.
Like Håstad’s attack, this attack exploits a weakness of RSA with public exponent . Coppersmith showed that if randomized padding suggested by Håstad is used improperly, then RSA is not secure.
Suppose Bob sends a message to Alice using a small random padding before encrypting it. An attacker, Eve, intercepts the ciphertext and prevents it from reaching its destination. Bob decides to resend to Alice because Alice did not respond to his message. He randomly pads again and transmits the resulting ciphertext. Eve now has two ciphertexts corresponding to two encryptions of the same message using two different random pads. Then Eve may recover the message if the padding is too small.
More precisely, suppose Eve intercepted two ciphertexts based on two random paddings: and , with corresponding ciphertext . The key is to consider the two polynomials modulo
The point is that will measure the difference in padding . Supposing that was known, then solves both and mod , so that divides both polynomials modulo . One may then compute using the Euclidean algorithm to recover (this method is known as the Franklin-Reiter attack).
Therefore, we wish to find . As and have the common root (modulo ), the integer is a root for the resultant which has degree at most . Therefore, if and , we have , so that Coppersmith's theorem applies.
For example, if is 1024 bits long and , then the method applies for paddings less than 113 bits long. For this reason, it is recommended to use the value which is completely resistant to this particular attack.
There are several different ways in which the Coppersmith method can be applied to polynomial equations in several variables, such as the common bivariate case .
The third approach is particularly useful in application to attacks on small private keys. The "small roots" condition in this approach becomes more subtle to describe, since it depends on the lattice being reduced by the LLL algorithm. In general, larger collections of modular polynomial equations may produce higher dimensional lattices, allowing the LLL algorithm to produce smaller polynomials.
For example, it is possible to obtain Wiener's attack by applying the Coppersmith method to the system of polynomials
where if then is a common root. More precisely, the two polynomials (with scaled coefficients) span a lattice, and the LLL algorithm is applied to obtain polynomial equations over the integers, which may be solved efficiently. This is used to prove that may be recovered if as in Wiener's attack.
More sophisticated polynomial systems can be used to improve this bound to (for suitably large ). In fact, even the CRT-RSA scheme can be broken with sophisticated lattices under the bounds .