Wang 2015
Wang 2015
12 DECEMBER 2015
                                                                                                                                      2677
PAPER
A New Attack on RSA with Known Middle Bits of the Private Key∗
Shixiong WANG†a) , Nonmember, Longjiang QU† , Member, Chao LI† , Nonmember, and Shaojing FU†† , Member
SUMMARY In this paper, we investigate the security property of RSA           such as fault attacks [4], timing attacks [15] and power anal-
when some middle bits of the private key d are known to an attacker. Using   yses [16]. In 1998, Boneh, Durfee and Frankel first pre-
the technique of unravelled linearization, we present a new attack on RSA
                                                                             sented partial key exposure attacks on RSA [6], which are
with known middle bits, which improves a previous result under certain
circumstance. Our approach is based on Coppersmith’s method for finding      based on a corollary of the conclusion in [8]. Let us denote
small roots of modular polynomial equations.                                 most significant bits by MSBs and least significant bits by
key words: RSA, attack with known middle bits, Coppersmith’s method,         LSBs. Given (log2 N)/4 LSBs of d, an attack was showed
lattice, LLL algorithm, unravelled linearization                             for small e in [6]. Other attacks of [6] require√knowledge
                                                                             of MSBs, but only apply to the case of e < N. A nat-
1. Introduction                                                              ural question raised in [6] is whether knowledge of MSBs
                                                                             or LSBs of d enables one to factor√N in polynomial time
In 1977, Rivest, Shamir and Aldeman proposed the well-                       when e is substantially larger than N. Based on Copper-
known RSA public key cryptosystem [23]. We let N = pq                        smith’s method, Blömer and May [3] and Ernst et al. [10]
be RSA modulus and let e and d be the public exponent and                    then independently described new partial key exposure at-
the private exponent respectively, i.e. e · d ≡ 1(mod ϕ(N)),                 tacks, and answered the question to some extent. Another
where ϕ(·) is the Euler’s totient function. We also call d the               question raised in [6] is whether knowledge of (log2 N)/4
private key.                                                                 middle bits of d enables one to factor N in polynomial time.
      We consider lattice-based cryptanalysis of RSA, in                     This belongs to attacks with known middle bits of the pri-
which Coppersmith’s method plays an important role. The                      vate key.
method is to find small roots of v-variate modular polyno-                         Notice that there have been many partial key exposure
mial equations (or (v + 1)-variate integer polynomial equa-                  attacks, most of which only assume that MSBs or LSBs are
tions) in polynomial time based on lattice basis reduction.                  known [1], [3], [6], [10], [14], [25]. In this paper, we con-
Initially in 1996, Coppersmith got the results for the case                  sider the case of known middle bits. In 2011, Sarkar studied
of v = 1 [7], [8]. Later the method of [7] (and [8]) was re-                 partial key exposure attacks on RSA when the number of
formulated by Howgrave-Graham [12] (and Coron [9]) in a                      unexposed blocks in d is more than one [24]. And the case
simpler way which has been widely adopted by researchers                     of known middle bits of d is just the case of two unexposed
for cryptanalysis. The reformulation by Howgrave-Graham                      blocks in d. Later in 2014, Z. Huang et al. presented their
(and Coron) can be also extended to the case of v  2, in                    attack on Takagi’s variant of RSA, which assumes N = pr q
which the results are heuristic. In general, the reformulation               for r  2, with known middle bits of d [13]. However, the
is used when we refer to Coppersmith’s method.                               result in [13] also applies to the case of r = 1. Both Theorem
      There have been some attacks on RSA if a portion of                    2 in [24] and Theorem 1 in [13] almost gave the same result
the private key d is known. These attacks, called partial                    of attack on RSA with known middle bits, though Theorem
(private) key exposure attacks, are usually based on Copper-                 2 in [24] only considerd the case of e ≈ N. We summa-
smith’s method. The results are of practical interest since                  rize this known result as Result 2.1 in Sect. 2, which is the
implementations may leak bits of d via side channel attacks                  best result as we know. Our main work in this paper is to
                                                                             improve Result 2.1 under certain circumstance.
       Manuscript received March 30, 2015.                                         In 1990, based on approximations using continued
       Manuscript revised July 21, 2015.                                     fractions, Wiener presented the first low private exponent at-
     †
       The authors are with the College of Science, National Univer-         tack [27]. In 1999, based on Coppersmith’s method, Boneh
sity of Defense Technology, Changsha, China.
    ††
       The author is with the College of Computer Science, National
                                                                             and Durfee improved Wiener’s result [5]. They claimed that
University of Defense Technology, Changsha, China.                           one may factor√ N in polynomial time if the private expo-
     ∗
                                                                             nent d  N 1− 2 −ε ≈ N 0.292−ε . As far as the authors know,
                                                                                               2
       This paper was partially supported by the Basic Research
Fund of National University of Defense Technology (No. CJ 13-                this result is the best low private exponent attack up to now.
02-01) and the Program for New Century Excellent Talents in
                                                                             Though several papers revisited the work [2], [11], [17]–
University (NCET) and the Natural Science Foundation of Hunan
Province (No. 13JJ4005) and the Natural Science Foundation of                [19], none of them improved this√ result. Boneh and Durfee
                                                                             only gave the proof of d  N 6 − 3 −ε ≈ N 0.285−ε in the main
                                                                                                              7   7
China (No. 11531002).
   a) E-mail: wsx09@foxmail.com                                              body of [5], while the proof of d  N 0.292−ε was placed in
       DOI: 10.1587/transfun.E98.A.2677
                    Copyright 
                              c 2015 The Institute of Electronics, Information and Communication Engineers
                                                                           IEICE TRANS. FUNDAMENTALS, VOL.E98–A, NO.12 DECEMBER 2015
2678
the appendix. The latter is a very intricate proof, which is          from Theorem 2 in [24] and Theorem 1 in [13].
independent of the idea of the main body. In 2010, Her-
rmann and May simplified the proof of d  N 0.292−ε using             Result 2.1. Notations are defined as before. Under Assump-
the technique of unravelled linearization [11].                       tion 3.4 (case v = 3), for any ε > 0, there exists an integer
      Both proofs in [5] and [11] are the applications of Cop-        N0 such that for any integer N > N0 , RSA modulus N can be
persmith’s method for finding small roots of v-variate mod-           factored in polynomial time if
ular polynomial equations in the case of v = 2. In this paper,                                7 1
we generalize the method of the proof of d  N 0.292−ε in                  β − (δ1 − δ2 )     −  48(α + β) − 39 − ε.                         (1)
                                                                                              8 8
[11] to the case of v = 3, and thus present a new attack with
known middle bits of d, i.e. an improvement to Result 2.1                  In this paper, we restrict the known middle bits, and
under certain circumstance. Then we give a corollary of the           present our new attack.
new attack. Note that though the result d  N 0.292−ε has
not been improved unconditionally, there are several attacks          Theorem 2.2. Notations are defined as before, and suppose
which show that RSA is also insecure for larger d if more             d2 < N β−0.5−δ2 . Under Assumption 3.4 (case v = 3), for
information is used. For example, [21] found RSA is vul-              any ε > 0 (or ε > 0), there exists an integer N0 such that
nerable for some d > N 0.292 when e/N is approximated a               for any integer N > N0 , RSA modulus N can be factored in
simple fraction, and [26] extended the bound of d for which           polynomial time if
RSA is weak with the knowledge of a few MSBs of p (alter-                                     5 1
natively these bits can be searched exhaustively). Similarly,              β − (δ1 − δ2 )     −  6(α + β) − 5 − ε                            (2)
                                                                                              6 3
our corollary shows that one may successfully attack RSA
for some d > N 0.292 if there exist enough many continuous                                     7 1
0 bits in d.                                                               ⇔     β  (δ1 −δ2 )+ −  6[α + (δ1 − δ2 )] + 1−ε . (3)
                                                                                               6 3
      This paper is organized as follows. In Sect. 2, we recall
the known result (Result 2.1) and present our results as The-               In Theorem 2.2, Inequality (3) is more useful in prac-
orem 2.2 and Corollary 2.3. In Sect. 3, we show how to de-            tice. The value of N, α, β, δ1 , δ2 must be known to construct
rive the problem of finding small roots from the knowledge            a lattice in our attack. Since N, α, δ1 , δ2 are already known,
of middle bits of d, and then recall Coppersmith’s method.            we can get a value of β from Inequality (3). If d  N β holds,
The lattice for Coppersmith’s method is constructed and the           the attack can be implemented.
proof of our attack is given in Sect. 4. In Sect. 5, we clarify             Now let us compare the two results according to In-
why our new result is obtained technically. And the justifica-        equality (1) and Inequality (2). One can check that 78 −
                                                                                                   
                                                                      8 48(α + β) − 39  6 − 3 6(α + β) − 5, where “=” holds
                                                                      1                       5   1
tion of our approach is examined through some experiments
in Sect. 6. Section 7 is the conclusion.                              if and only if α+β = 1. Thus the result of Theorem 2.2 is bet-
                                                                      ter than Result 2.1 under the condition d2 < N β−0.5−δ2 , which
2. Known Result and Our Contribution                                  is also obvious from Fig. 1 and Fig. 2. Assuming d = N β , we
                                                                      set α ≈ 1 (full size e) in Fig. 1 and set β ≈ 1 (full size d) in
In practice, the bit sizes of the prime factors p and q of            Fig. 2. And the y-axis (δ1 − δ2 )/β in both figures denotes
RSA
√     modulus N usually√ differ at most 1. Thus we assume              known fraction of d that is sufficient to implement the at-
  N/2 < q < p < 2 N just like most partial key exposure               tacks.
attacks. Similarly, we also assume ϕ(N) = N. In fact, if one                The condition d2 < N β−0.5−δ2 naturally holds when d2 =
lets ϕ(N) = N γ (γ ≈ 1), the result only has little difference.
Let e = N α , d  N β , and let the bit size of d be nd . Besides,
we write
       d = d1 · 2r1 + d2 · 2r2 + d3 , 0 < r2 < r1 < nd ,
       0  d1 < 2nd −r1 , 0  d2 < 2r1 −r2 , 0  d3 < 2r2 .
Suppose that after some attacks such as side-channel at-
tacks, we get the value of d2 and r1 , r2 at the same time,
while d1 and d3 are still unknown. Define δ1 = logr1 N , δ2 =
                                                          2
                         δ1 r2       δ2
log2 N , namely 2 = N , 2 = N . In this paper, we study
  r2              r1
                                                                                                              
Y, |z0 | < Z, we have |y0 z0 | < YZ = 3N α+β−0.5 . To restrict u0 ,                   h(x1 , · · · , xn ) =        |at1 ,··· ,tn |2 .
we hope A < N α+β−0.5 , namely d2 < (N α+β−0.5 + 1)/(e · N δ2 ).
                                                                                     Lemma 3.3. (Howgrave-Graham) Let h(x1 , · · · , xv ) ∈
Hence we can assume d2 < N α+β−0.5 /(e·N δ2 ), or equivalently
                                                                                     Z[x1 , · · · , xv ] be a polynomial that consists of at most s
d2 < N β−0.5−δ2 , and then get |u0 | < U = 4N α+β−0.5 . From the
                                                                                     monomials. Suppose that there exists (x1(0) , · · · , xv(0) ) ∈ Zv
above, under the condition d2 < N β−0.5−δ2 , we just need to
                                                                                     satisfying
find the desired root (x, y, z, u) = (x0 , y0 , z0 , u0 ) = (d3 , k, p +
q − 1, k(p + q − 1) + A) of the following modular equation:                          h(x1(0) , · · · , xv(0) ) ≡ 0 (mod V),             |x1(0) | < X1 , · · · , |xv(0) | < Xv ,
                                                                                                                          √
ex− Ny+u ≡ 0 (mod W),                  |x| < X, |y| < Y, |z| < Z, |u| < U.                  h(X1 x1 , · · · , Xv xv ) < V/ s.
                                                                                     Then h(x1(0) , · · · , xv(0) ) = 0 holds over the integers.
3.2 Coppersmith’s Method                                                                     Combining Fact 3.2 with Lemma 3.3, one can analyse
                                                                                     the bounds for the small roots. The method is called Cop-
To find small roots of modular polynomial equations, we                              persmith’s method, which has been widely adopted by re-
must introduce Coppersmith’s method. First of all, let us                            searchers for lattice-based cryptanalysis of RSA. Now we
recall the definition of lattice.                                                    summarize Coppersmith’s method for the case of v-variate
                                                                                     modular polynomial equations as follows.
Definition 3.1. Let b1 , b2 , · · · , bω ∈ R s be linearly inde-                          Finding small roots of v-variate modular polyno-
pendent (row) vectors for ω  s. A lattice Λ generated by                            mial equations can be described as finding each root
b1 , b2 , · · · , bω is the set of all integral linear combinations               (x1(0) , · · · , xv(0) ) ∈ Zv of h0 (x1 , · · · , xv ) ≡ 0 (mod W), |x1 | <
of these vectors:                                                                    X1 , · · · , |xv | < Xv . Let m be an undetermined parameter, and
                                      ⎧ ω                                      ⎫     find a subset Λ∗ of Z[x1 , · · · , xv ] satisfying
                                      ⎪
                                      ⎪
                                      ⎨                                        ⎪
                                                                               ⎪
                                                                               ⎬
                              
Λ = spanZ (b1 , b2 , · · · , bω ) = ⎪       x  
                                               b  | x  ∈ Z, i = 1, 2, · · · , ω⎪ .      h(x1(0) , · · · , xv(0) ) ≡ 0 (mod W m ),              ∀ h(x1 , · · · , xv ) ∈ Λ∗ .
                                      ⎪
                                      ⎩      i  i    i                         ⎪
                                                                               ⎭
                                        i=1
                                                                                     Given the order of some monomials of Z[x1 , · · · , xv ],
      We call s the dimension of Λ and ω its rank. Row                               there is a one-to-one correspondence between a polynomial
vectors b1 , b2 , · · · , bω are a basis of Λ, and we denote the                  h(x1 , · · · , xv ) in Λ∗ and a vector in a subset Λ of R s , whose
basis as a matrix, called the basis matrix of Λ:                                     components are coefficients of h(X1 x1 , · · · , Xv xv ) in order of
             ⎛ ⎞                                                                     corresponding monomials. We also require Λ to be a lat-
             ⎜⎜⎜ b1 ⎟⎟⎟                                                             tice of dimension s. Notice that in fact v is far less than s.
               ⎜⎜⎜  ⎟⎟⎟
                 ⎜b ⎟                                                                Combining Fact 3.2 with Lemma 3.3, if
      B = ⎜⎜⎜⎜ 2 ⎟⎟⎟⎟ ∈ Rω×s .
                 ⎜⎜⎜⎝· · ·⎟⎟⎟⎠                                                                                                      √
                                                                                           2 s(s−1)/4(s−v+1) det(Λ)1/(s−v+1) < W m / s               (6)
                     bω
                                                                                    is satisfied, by running LLL algorithm one can get v polyno-
The determinant of Λ is defined as det(Λ) = det(BBT ),                               mials, which all share each root (x1(0) , · · · , xv(0) ) as a common
which is independent of the choice of the basis and only                             root over the integers. For the case of v = 1, one can find
determined by Λ. In this paper, we only consider lattices for                        each root x1(0) ∈ Z using standard root-finding algorithms.
the case of ω = s. Thus B is a square matrix and det(Λ) =                            For the case of v  2, Coppersmith’s method needs the fol-
| det B|.                                                                            lowing assumption.
      In 1982, Lenstra et al. proposed the famous LLL al-
                                                                                     Assumption 3.4. In Coppersmith’s method, the common
gorithm for lattice basis reduction [20]. It allows one to
                                                                                     roots of v polynomials outputted by LLL algorithm can be
find a short vector in a lattice in polynomial time. The
                                                                                     found by computing the resultants of these v polynomials.
proof of the following fact can be found in [22]. The
norm of a vector vi = (vi1 , vi2 , · · · , vis ) is defined as vi =
                                                                                         Since Assumption 3.4 is heuristic, we need to perform
  v2i1   +   v2i2   + ··· +   v2is .                                                 experiments to examine it in our attack, which is done in
                                                                                     Sect. 6.
Fact 3.2. (LLL) Let s be the dimension (and the rank) of                                  Notice that Inequality (6) is equivalent to
Λ. Given a basis (square) matrix B of Λ, the LLL algorithm                                 det(Λ) · 2 s(s−1)/4 s(s−v+1)/2 < W m(s−v+1) .
outputs a LLL-reduced basis v1 , v2 , · · · , vs satisfying
                                                                                     In practice, we ignore terms that do not depend on W. Thus
         vi  2 s(s−1)/4(s−i+1) det(Λ)1/(s−i+1) ,      1is                        we obtain
in polynomial time in s and in the bit sizes of the entries of                             det(Λ) < W m(s−v+1) .                                                           (7)
the basis matrix B.
                                                                                     According to the analysis above, under Assumption 3.4, us-
    Next we introduce the following useful lemma due                                 ing Coppersmith’s method to find small roots of v-variate
to Howgrave-Graham [12].              The norm of a polyno-                          modular polynomial equations just requires the condition
                           
mial h(x1 , · · · , xn ) =   at1 ,··· ,tn x1t1 · · · xntn is defined as              Inequality (7).
WANG et al.: A NEW ATTACK ON RSA WITH KNOWN MIDDLE BITS OF THE PRIVATE KEY
                                                                                                                                                            2681
Note that in the above equations x0 , y0 , z0 , u0 , f 0 etc. are re-                            The proof of Proposition 4.1 is given in Appendix A.
garded as 1. Besides, though sets G∗t , Pi , P∗i also depend on                           Under the condition θi+1  θi + 1 and with the help of sub-
parameter m, we omit it in the subscripts for convenience.                                stitution yz = u − A, here we note that the main point is to
The nonnegative integer θi in the definitions of Pi , P∗i is an-                          prove that every polynomial in set B∗ only contains mono-
other parameter, which will be determined later.                                          mials (neglect coefficients) which belong to set B.
    Next for sets of monomials   τ             we define B =                                  Notice that Λ is the lattice generated by the basis ma-
B1 B2 , B1 = m          G
                     t=0 t , B   =
                               2  i=1 i    P ,  and for
                                                      msets ∗of poly-                    trix B. It is obvious that all polynomials in set B∗ have
                         ∗       ∗      ∗       ∗                 ∗
nomials
τ ∗        we  define B    =  B 1    B 2 ,  B  1  =    t=0 Gt , B2 =                     (x0 , y0 , z0 , u0 ) = (d3 , k, p + q − 1, k(p + q − 1) + A) as a com-
   i=1 Pi .                                                                               mon root modulo W m . Thus all polynomials correspond-
       We define a total order “” on set B. Let h(x, y, z, u),                           ing to all vectors in lattice Λ must have (x0 , y0 , z0 , u0 ) =
h (x, y, z, u) ∈ B. Then h(x, y, z, u)  h (x, y, z, u) if and only                     (d3 , k, p + q − 1, k(p + q − 1) + A) as a common root mod-
if one of the following cases occurs:                                                     ulo W m . Hence lattice Λ meets the requirement of Copper-
                                                                                                                    IEICE TRANS. FUNDAMENTALS, VOL.E98–A, NO.12 DECEMBER 2015
2682
smith’s method. Denote the dimension of lattice Λ by s and                                                  and the calculation of s and det(Λ) we can get
the order of (square) matrix B by s(B). Then s = s(B).                                                                                                       4
                                                                                                                                                                             o(m4 )            1 4 1 2 o(m4 )
Notice that det(Λ) = | det B| = det B, and B is a lower tri-                                                                    −     1
                                                                                                                                         ξ 4 + 16 ξ+ 24
                                                                                                                                                      1
                                                                                                                                                        + o(m4 )                          −       ξ +4ξ + 4
                                                                                                                                                                   Y 24 +
                                                                                                                                                                     1
                                                                                                                            X       24η3                   m                  m4      Z       8η2         m
Let v = 3 in Inequality (7) and get det(Λ) < W m(s−2) , which                                                       3η2 + 2η − 2(α + β − 1) > 0.                       (9)
is the condition of our attack. Put H∗i,t and Hi,t in B∗ and B re-                                                                                        
spectively, and it means that the left of Inequality (7) is mul-                                            Since η > 0, it is obtained that η > − 13 + 16 24(α + β) − 20.
tiplied by det Hi,t while the right is multiplied by W ms(Hi,t ) .                                          Finally we substitute η = 12 − [β − (δ1 − δ2 )] and get
Thus we hope det Hi,t  W ms(Hi,t ) , i.e. Z 2i (XUW −1 )t  1.
                                                                                                                                                      5 1
We roughly regard Z = 3N 0.5 as N 0.5 , and U = 4N α+β−0.5 as                                                       β − (δ1 − δ2 ) <                   −  6(α + β) − 5.                                             (10)
N α+β−0.5 . Then we substitute Z, U and X = N δ2 , W = N α+δ1                                                                                         6 3
in Z 2i (XUW −1 )t  1. Finally we can get t  1η i, where                                                  Notice that in calculation we ignore some terms, which con-
η = 12 − β + δ1 − δ2 = 12 − [β − (δ1 − δ2 )] > 0 (condition η > 0                                           tribute a “−ε” (ε > 0) in the right side of Inequality (10).
must be satisfied, otherwise we should take τ = 0 and finally                                               The accurate analysis for ε is given in Appendix B, from
get 0 < α + β − 1 + ε < η  0, a contradiction). Since t is an                                              which we know that ε is arbitrarily small if m and N are
integer, we have t  1η i , which means we select θi = 1η i .                                               large enough. Replace “<” with “” in Inequality (10) with
From η < 12 we know condition θi+1  θi + 1 naturally holds.                                                “−ε” added, and Theorem 2.2 follows.
      Notice that neither of Pτ or P∗τ is a null set, which means
θτ = 1η τ  m, or 1η τ  m (m is an integer). Define ξ = mτ ,                                               5. Why Theorem 2.2 Is Obtained Technically
and we get τ = ξm, 0  ξ  η < 12 . Now, let m → ∞ and                                                      Here we clarify why our new result is obtained technically.
we can get                                                                                                  For this purpose, let us first introduce our proof of Result
                m                                                                                         2.1, which is similar to proofs in [24] and [13]. In fact,
      s =             s(Gt ) + τi=1 s(Pi )
                t=0                        ξm m                                                         [24] is to find small roots of integer polynomial equations,
          =       m
                  t=0
                         t
                          j=0 ( j + 1) + i=1 t=θi (t + 1)                                                   while [13] and we consider different modular polynomial
          = [ 16 m3 + o(m3 )] + [(− 6η12 ξ3 + 12 ξ)m3 + o(m3 )]                                             equations. Though three proofs have slight difference, the
          = (− 6η12 ξ3 + 12 ξ + 16 )m3 + o(m3 ),                                                            ideas behind them are the same.
                                                                                                               Redefine f (x, y, z) = A + ex − Ny + yz, and do not use
      det(Λ) = m   t=0 (det   Gt ) τi=1 (det Pi )
                    m                                                                                      u = yz + A. Now sets of monomials or polynomials for the
               = t=0 t1 ,t2 ,t3 ∈Z+ ∪{0}, t1 +t2 +t3 =t X t1 Y t2 U t3 W m−t3 ·
                 ξm m                                         i t1 t3 m−t3                               construction of basis square matrix B are
                    i=1     t=θi    t1 ,t3 ∈Z+ ∪{0}, t1 +t3 =t Z X U W
                             1 4
                                  +o(m   4     1 4
                                                   +o(m   4
               = [(XYU) 24     m           )
                                             W8 m           )
                                                              ]·                                                  Gt = {xt1 yt2 (yz)t3 | t1 , t2 , t3 ∈ Z+ ∪ {0}, t1 + t2 + t3 = t},
                       (−        ξ + 4 ξ )m4 +o(m4 )
                              1 4 1 2
                                                                      (−     1
                                                                                ξ 4 + 16 ξ)m4 +o(m4 )
                  [Z         8η2                        (XU)               24η3                         ·     G∗t = {xt1 yt2 f t3 W m−t3 | t1 , t2 , t3 ∈ Z+ ∪ {0}, t1 + t2 + t3 = t},
                             1
                                ξ 4 − 12 ξ 3 + 13 ξ)m4 +o(m4 )
                  W
                       (
                           24η3      6η                           ]                                              m
                       (     1
                                ξ 4 − 12 ξ 3 + 13 ξ+ 18 )m4 +o(m4 )                                         Pi =     Hi,t , Hi,t = {zi · xt1 (yz)t3 | t1 , t3 ∈ Z+ ∪ {0}, t1 + t3 = t},
               =W          24η3      6η                                ·                                            t=0
                      (−     1
                                ξ 4 + 16 ξ+ 24
                                             1
                                               )m4 +o(m4 )
                  X        24η3                               ·                                                     
                                                                                                                    m
                  Y 24 m +o(m ) Z
                      1      4       4    (−
                                               8η2
                                                   ξ + 4 ξ )m4 +o(m4 )
                                                1 4 1 2
                                                                                ·                           P∗i =         H∗i,t , H∗i,t = {zi · xt1 f t3 W m−t3 | t1 , t3 ∈ Z+ ∪{0}, t1 + t3 = t},
                      (−      1
                                 ξ 4 + 16 ξ+ 24
                                             1
                                                )m4 +o(m4 )                                                         t=0
                  U         24η3                              .
                                                                                                            where t = 0, 1, 2, · · · , m and i = 1, 2, · · · , τ. Notice that here
     Notice that the condition of our attack is det(Λ) <                                                    we must always take θi = 0 in the definitions of Pi , P∗i to
W m(s−2) (let v = 3 in Inequality (7) ). From det(Λ) < W m(s−2)                                             guarantee matrix B a lattice basis square matrix and a lower
WANG et al.: A NEW ATTACK ON RSA WITH KNOWN MIDDLE BITS OF THE PRIVATE KEY
                                                                                                                                                            2683
                                 Table 3     Some results of our experiments (with α ≈ 1) under condition d2 < N β−0.5−δ2 .
     N (bits)       α          β         δ1        δ2       d2      m    τ     θ1 , θ2 , · · · , θτ   s = dim(Λ)   log2 (det(Λ))   Time for LLL Algorithm
      1500       0.9981     0.6224     0.6144    0.0233     0      5    2            3, 5                77       9.348 × 105         281.3 seconds
      1000       0.9979     0.6006     0.5666    0.0260     0      5    2            3, 5                77       6.064 × 105         133.1 seconds
      2000       0.9992     0.5543     0.5293    0.0115     0      4    1              3                 44       5.384 × 105         7.644 seconds
      1500       0.9969     0.4503     0.4270    0.0367     =0      4    1              3                 44       3.724 × 105         7.224 seconds
      1000       0.9942     0.3866     0.2853    0.0400     =0      6    2            3, 6                113      8.618 × 105         798.2 seconds
      2000       0.9997     0.3282     0.2331    0.0455     =0      6    2            3, 6                113      1.647 × 106          1187 seconds
triangular matrix. Let m → ∞ and ξ = mτ . Similarly we                                     Case 2: Occasionally, Assumption 3.4 may fail even if
calculate the values of s and det(Λ) and substitute them in                          we compute resultants of more polynomials corresponding
the condition det(Λ) < W m(s−2) . To get the best possible                           to LLL-reduced basis vectors that share the desired root. In
result, one must take ξ = 23 η, where η = 12 − [β − (δ1 − δ2 )].                     our experiments the examples are that we can only get one
And finally Result 2.1 follows.                                                      polynomial h(y, z) sharing the desired root. And we are not
       We note that technique of unravelled linearization (i.e.                      able to eliminate y or z since any other polynomial g(y, z)
letting u = yz + A) enables us to throw away some H∗i,t (t =                         we can acquire is just a multiple of h(y, z) and thus their
0, 1, · · · , 1η i − 1) in P∗i while still guaranteeing B a lattice                  resultant is 0. Fortunately, all these examples in our exper-
basis square matrix and a lower triangular matrix, which is                          iments only occur when d2 = 0, and using the substitution
based on Proposition 4.1. According to our analysis before,                          yz = u+1 (d2 = 0) we can eliminate z in h(y, z) to get       h(y, u),
these H∗i,t (t = 0, 1, · · · , 1η i − 1) contribute more to the left                 which is just a homogeneous polynomial in y and u with de-
side than to the right side of det(Λ) < W m(s−2) . Thus Theo-                        gree at most 3. One example is that h(y, z) = a1 · (yz − 1)3 +
rem 2.2 improves Result 2.1 under condition d2 < N β−0.5−δ2 ,                        a2 · y(yz − 1)2 + a3 · y2 (yz − 1) + a4 · y3 , a1 , a2 , a3 , a4 ∈ Z
the cost of technique of unravelled linearization.                                   and thus  h(y, u) = a1 · u3 + a2 · yu2 + a3 · y2 u + a4 · y3 =
                                                                                     y · [a1 · (u/y)3 + a2 · (u/y)2 + a3 · (u/y) + a4 ]. Then one can
                                                                                      3