Twenty Years of Attacks on the RSA Cryptosystem
Dan Boneh
1 Intro duction
The RSA cryptosystem, invented by Ron Rivest, Adi Shamir, and Len Adleman [21 ], was rst
publicized in the August 1977 issue of Scienti c American. The cryptosystem is most commonly
used for providing privacy and ensuring authenticity of digital data. These days RSA is deployed
in many commercial systems. It is used by web servers and browsers to secure web trac, it is
used to ensure privacy and authenticity of Email, it is used to secure remote login sessions, and
it is at the heart of electronic credit-card payment systems. In short, RSA is frequently used in
applications where security of digital data is a concern.
Since its initial publication, the RSA system has b een analyzed for vulnerability by many
researchers. Although twentyyears of researchhave led to a numb er of fascinating attacks, none of
them is devastating. They mostly illustrate the dangers of improp er use of RSA. Indeed, securely
implementing RSA is a nontrivial task. Our goal is to survey some of these attacks and describ e
the underlying mathematical to ols they use. Throughout the survey we follow standard naming
conventions and use Alice and Bob to denote two generic parties wishing to communicate with
each other. We use Marvin to denote a malicious attacker wishing to eavesdrop or tamp er with the
communication b etween Alice and Bob.
We b egin by describing a simpli ed version of RSA encryption. Let N = pq b e the pro duct of
two large primes of the same size n=2 bits each. A typical size for N is n = 1024 bits, i.e. 309
decimal digits. Each of the factors is 512 bits. Let e; d be twointegers satisfying ed =1mod'N
where 'N = p 1q 1 is the order of the multiplicative group Z . We call N the RSA
N
modulus, e the encryption exponent, and d the decryption exponent. The pair hN; ei is the public
key. As its name suggests, it is public and is used to encrypt messages. The pair hN; di is called
the secret key or private key and is known only to the recipient of encrypted messages. The secret
key enables decryption of ciphertexts.
e
A message is an integer M 2 Z . To encrypt M , one computes C = M mo d N . To decrypt
N
d
the ciphertext, the legitimate receiver computes C mo d N . Indeed,
d ed
C = M = M mo d N ;
1
where the last equality follows by Euler's theorem . One de nes the RSA function as x 7 !
e
x mo d N . If d is given, the function can b e easily inverted using the ab ove equality. We refer to d
as a trapdoor enabling one to invert the function. In this survey we study the dicultyofinverting
1
Our description slightly oversimpli es RSA encryption. In practice, messages are padded prior to encryption
using some randomness [1]. For instance, a simple but insucient padding algorithm may pad a plaintext M by
app ending a few random bits to one of the ends prior to encryption. Adding randomness to the encryption pro cess
is necessary for prop er security. 1
the RSA function without the trap do or. We refer to this as breaking RSA. More precisely, given
th
the triple hN ; e; C i, we ask how hard is it to compute the e ro ot of C mo dulo N = pq when the
factorization of N is unknown. Since Z is a nite set, one mayenumerate all elements of Z until
N N
the correct M is found. Unfortunately, this results in an algorithm with running time of order N ,
namely exponential in the size of its input, which is of the order log N . We are interested mostly
2
c
in algorithms with a substantially lower running time, namely on the order of n where n = log N
2
and c is some small constant less than 5, say. Such algorithms often p erform well in practice on
the inputs in question. Throughout the pap er we refer to such algorithms as ecient.
In this survey we mainly study the RSA function as opp osed to the RSA cryptosystem. Lo osely
sp eaking, the dicultyofinverting the RSA function on random inputs implies that given hN ; e; C i
an attacker cannot recover the plaintext M . However, a cryptosystem must resist more subtle
attacks. If hN ; e; C i is given, it should b e intractable to recover any information ab out M . This is
2
known as semantic security . We do not discuss these subtle attacks, but p oint out that RSA as
describ ed ab ove is not semantically secure: given hN ; e; C i, one can easily deduce some information
ab out the plaintext M for instance, the Jacobi symbol of M over N can b e easily deduced from
C . RSA can b e made semantically secure by adding randomness to the encryption pro cess [1].
e
The RSA function x 7 ! x mo d N is an example of a trapdoor one-way function. It can b e easily
computed, but as far as we know cannot b e eciently inverted without the trap do or d except in
sp ecial circumstances. Trap do or one-way functions can b e used for digital signatures [19 ]. Digital
signatures provide authenticity and nonrepudiation of electronic legal do cuments. For instance,
they are used for signing digital checks or electronic purchase orders. To sign a message M 2 Z
N
d
using RSA, Alice applies her private key hN; di to M and obtains a signature S = M mo d N .
e
Given hM; Si, anyone can verify Alice's signature on M by checking that S = M mo d N . Since
only Alice can generate S , one may susp ect that an adversary cannot forge Alice's signature.
Unfortunately, things are not so simple; extra measures are needed for prop er security. Digital
signatures are an imp ortant application of RSA. Some of the attacks we survey sp eci cally target
RSA digital signatures.
n
-bit primes and multiplying them to An RSA key pair is generated by picking two random
2