Professional Documents
Culture Documents
557 1979 1 PB
557 1979 1 PB
2, FEBRUARY 2009
Abstract—The RSA cryptosystem is one of the widely used environment to simulate the parallel RSA factorization.
public key systems. The security of it is based on the With optimized parameters in the sieving procedure, the
intractability of factoring a large composite integer into two computation complexity of our method is lower than that
component primes, which is referred to as the RSA of the original one, which contributes to the reduction of
assumption. So far, the Quadratic Sieve (QS) is the fastest
and general-purpose method for factoring composite
the overall running time.
numbers having less than about 110 digits. In this paper, we The rest of this paper is organized as follows. Section
present our study on a variant of the QS, i.e., the Multiple 2 recalls some security notions of the RSA cryptosystem.
Polynomial Quadratic Sieve (MPQS) for simulating the Section 3 introduces some related factoring algorithms
parallel RSA factorization. The parameters of our enhanced including the Dixon’s Random Squares algorithm, the
methods (such as the size of the factor base and the length QS and its variant, the MPQS. We simulate the parallel
of the sieving interval) are benefit to reduce the overall RSA factorization using an enhanced MPQS in Sections
running time and the computation complexity is actually 4. Finally, a conclusion with the significance of our
lower. The experimental result shows that it only takes 6.6 experimental results is given in Section 5.
days for factoring larger numbers of 100 digits using the
enhanced MPQS by 32 workstations.
2 2 &
two integers satisfying x !{ ry (mod n) and x { y (mod z ( z1 , z 2 ,..., z m ) ( Z 2 ) m as zj = 1 if ra j U and zj = 0
2 2
n). Then we can derive (x + y)(x – y) = x – y { 0 (mod
n). It can be seen that gcd(x + y, n) and gcd(x – y, n) must if ra j U, for 1 d j d m. Note that ( Z 2 ) m denotes the
be non-trivial factors of n with the probability of at least m-dimensional vector space over the finite field Z2 of 2
1/2. Therefore, n is successfully factored. To find such x
2 2
and y fulfilling x { y (mod n), the algorithm begins by elements. Since f (ri ) is a perfect square and
2 ri U
choosing several random integers ri’s such that ri > n,
2 m
and proceeds to compute f(ri) = ri mod n. It is obvious zj
2 2
that f(ri) { ri (mod n) and f(ri) z ri for all the ri’s. Let f (ri ) ( f (ra j
))
ri U j 1
the setʳS contain these ri’s, and we have f (ri ) y2
m § b ·
zj
ri S ¨
pk ek , j ¸
¨ ¸
for some y, and x ri . Derived from the equality j 1© k 1 ¹
ri S
b § m ·
¨ ¸
x ri , we know that ¨¨ pk ek , j z j ¸¸
ri S k 1© j 1 ¹
2 m
§ · ¦ ek , j z j
¨ ¸ b
x2 { ¨ ri ¸ (mod n)
¨ r S ¸ pk
j 1
,
©i ¹
k 1
{ ri 2 (mod n) m
ri S we know ¦ ek , j z j { 0 (mod 2), for 1 d k d b. This
j 1
{ f (ri )(mod n) homogeneous linear system can be written in the form of
ri S
matrix as
{ y2 (mod n).
ª e1,1 e1,2 e1, m º ª z1 º ª0º
Note that f (ri ) y 2 for some y holds if and «e »« » « »
« 2,1 e2, 2 e2, m » « z 2 » { «0» (mod 2). (1)
ri S
« »« » « »
« »« » « »
only if each prime factor of f (ri ) is used for even
¬«eb,1 eb,2 eb, m ¼» ¬ z m ¼ ¬0¼
ri S
To solve Eq. (1), we can use the algorithms such as the
times. Such notion benefits us to find the set S. Suppose Gauss-Jordan Elimination [4], the Block Lanczos
we have known the complete factorization of each f(ri), it algorithm [1] and the Wiedemann algorithm [8]. If a
would be easy to check whether the product of some &
solution s of Eq. (1) is found, the set S can thus be
specific f(ri)’s is a square. Yet, it is clearly difficult to constructed according to it. As a matter of fact, the
factor every f(ri). Thus, we just retain and use those crucial part is how to efficiently find enough ri’s such
f(ri)’s which can be “easily” factored. For simplicity, we that f(ri) is smooth over E, rather than solving the
first give the definitions of a factor base and being homogeneous linear system over a finite field.
smooth over a factor base.
B. Quadratic Sieve
Definition 1. factor base and being smooth over a
factor base The QS is a well-known factoring algorithm proposed
by Pomerance [10] in 1981. When factoring large
A factor base E is a nonempty set of prime integers. integers between 50 and 110 digits, the QS is
An integer D is said to be smooth over the factor base E if undoubtedly the best choice and has been widely used in
all the prime factors of D occur in E. practice for a long time. In fact, the QS use similar
The algorithm uses a factor base E composed of b factoring ideas to the Dixon’s Random Squares algorithm
smallest primes, i.e., E = {p1, p2, …, pb}. Let the set W = except for two major differences. One is that the function
2 2
{ ra1 , ra2 , …, ra m } such that f( ra j ) is smooth over E of f(ri) = ri mod n is replaced with f(ri) = ri – n. The
b other is that the QS chooses all the ri’s as successive
and f (ra j ) pk e k, j where ek, j t 0, 1 d j d m and 1 integers in the form of ri = ¬ ¼
n + i, for i N. Such
k 1 slight modifications can lead to dramatically faster
d k d b. We attempt to find a set S satisfying running time. More details are described as follows.
f (ri ) y 2 for some y from W. Observe that every Setting up the factor base:
ri S To set up the factor base E = {p1, p2, …, pb}, the QS
subset U W can be mapped to a vector uses any pk satisfying that there exists at least one ri such
suppose that g(ri) is divisible by pj exactly ei, j times with The experimental results are contributive to the analyses
ei, j t 0, for each pj E. Then we have of the strength of the RSA assumption against the
modern computer technology and should be taken into
g(ri) is smooth over E consideration on future cryptographic implementations
b
ei , j based on the RSA cryptosystem.
g (ri ) pj
j 1 TABLE 1.
b EXPERIMENTAL RESULTS FOR ESTIMATED RUNNING TIME
log( g (ri )) ¦ ei, j log( p j ) Original MPQS Enhanced MPQS
j 1 log10(n) / log2(n)
by one PC by 32 workstations
b
log( g (ri )) ¦ ei, j log( p j ) 0. 50 / 166 0.16 (hours) N.A.
j 1
80 / 266 22 (hours) 1.4 (hours)
The result can be applied to the sieving procedure as
follows. First, an array of size 2G is allocated, and let the 82 / 272 36 (hours) 3.4 (hours)
array elements be M[1], M[2], …, M[2G]. Assign the
85 / 282 72 (hours) 6.7 (hours)
logarithm of g(ri) for each ri to M[i], i.e., M[ri + G] =
90 / 299 210 (hours) 11.3 (hours)
log(g(ri)). For every ri So, t and 1 – G d ri d G, log(pk) is
subtracted from M[ri + G] where t d to. This procedure is 100 / 332 80 (days) 6.6 (days)
performed for every odd prime pk E. Similarly, if g(ri) 110 / 365 N.A. 49 (days)
is divisible by 2 at most t' times, t' log(2) must be
subtracted from M[ri + G]. As a matter of fact, t' can be REFERENCES
easily determined by scanning g(ri) from the least
[1] O. Bretscher, Linear Algebra with Applications, 3rd Ed.,
significant bit towards the most significant bit until the
Prentice Hall, 2004.
first 1 bit is found. In the end, all the M[i]’s are scanned [2] W. Diffie and M. Hellman, “New directions in
for which M[i] = 0 and thus we know which g(ri) is cryptography,” IEEE Transactions on Information Theory,
smooth over E. Vol. IT-22, No. 6, 1976, pp. 644-654.
[3] J.D. Dixon, “Asymptotically fast factorization of
D. Parallel Sieving integers,” Mathematics of Computation, Vol. 36, No. 153,
In order to make the MPQS more practical, we use 32 1981, pp. 255-260.
workstations to parallelize the sieving procedure. Each [4] S.H. FriedBerg, A.J. Insel and L.E. Spence, Linear
workstation is equipped with AMD Athlon XP 2700+ Algebra, 4th Ed., Prentice Hall, 2002.
[5] R. Kumanduri and C. Romero, Number Theory with
CPU (running at 2.2 GHz on average), 2 GB memory
Computer Applications, 1st Ed., Prentice Hall, 1997.
and 512 MB disk space total. The installed operating [6] A.K. Lenstra and H.W. Lenstra (eds.), The development of
system is RedHat Linux 9.0. We divide the sieving the number field sieve, Lecture Notes in Mathematics, Vol.
interval into several subintervals, and each workstation 1554, Springer-Verlag, 1993.
using different quadratic polynomial functions sieves [7] A. Menezes, P. Oorschot and S. Vanstone, Handbook of
over a different subinterval. That is, the jth workstation applied cryptography, CRC Press, Inc., 1997.
uses the coefficient dh satisfying that dh is prime and dh = [8] P.L. Montgomery, “A block Lanczos Algorithm for finding
dependencies over GF(2),” Advances in Cryptology
4(kt + j) + 3 where t is the number of total workstations,
EUROCRYPT’95, Springer-Verlag, 1995, pp. 106-120.
1 d j d t, and k Z. The only constraint is that t can not [9] J.M. Pollard, “Theorems on factorization and primality
be a multiple of 3. The execution time of factoring larger testing,” Proceedings of the Cambridge Philosophical
numbers in the range of 80-100 digits is shown as Table Society, Vol. 76, No. 2, 1974, pp. 521-528.
1. [10] C. Pomerance, “The quadratic sieve factoring algorithm”,
Although the estimated running time by using 32 Advances in Cryptology EUROCRYPT’84,
workstations is not 32 times faster than that by using one Springer-Verlag, 1985, pp. 169-182.
PC, the parameters of our enhanced method (such as the [11] C. Pomerance, Cryptology and Computational Number
size of the factor base and the length of the sieving Theory; Factoring, AMS, Providence, RI, 1990.
[12] H. Riesel, Prime Numbers and Computer Methods for
interval) are benefit to reduce the overall running time
Factorization, 2nd Ed., Boston, 1994.
and the computation complexity is actually lower. [13] R. Rivest, A. Shamir and L. Adleman, “A method for
obtaining digital signatures and public-key
V. CONCLUSIONS cryptosystems,” Communications of the ACM, Vol. 21, No.
2, 1978, pp. 120-126.
In this paper, we have presented our study on the [14] R. Silverman, “The multiple polynomial quadratic sieve,”
MPQS for simulating the parallel RSA factorization. By Mathematics of Computation, Vol. 48, No. 177, 1987, pp.
optimizing the size of the factor base and the length of 329-339.
the sieving interval, the computation complexity of our [15] D.R. Stinson, Cryptography: Theory and Practice, 2nd Ed.,
enhanced version is lower as compared with the original CRC Press, 2002.
MPQS, which helps reducing the overall running time. [16] D.H. Wiedemann, “Solving sparse linear equations over