# Computer science

Solo disponible en BuenasTareas
• Páginas : 16 (3888 palabras )
• Descarga(s) : 0
• Publicado : 20 de septiembre de 2010

Vista previa del texto
Eric Landquist MATH 488: Cryptographic Algorithms December 14, 2001

1

Introduction

Mathematicians have been attempting to ﬁnd better and faster ways to factor composite numbers since the beginning of time. Initially this involved dividing a number by larger and larger primes until you had the factorization. This trial division was not improvedupon until Fermat applied the factorization of the diﬀerence of two squares: a2 − b2 = (a − b)(a + b). In his method, we begin with the number to be factored: n. We ﬁnd the smallest square larger than n, and test to see if the diﬀerence is square. If so, then we can apply the trick of factoring the diﬀerence of two squares to ﬁnd the factors of n. If the diﬀerence is not a perfect square, then weﬁnd the next largest square, and repeat the process. While Fermat’s method is much faster than trial division, when it comes to the real world of factoring, for example factoring an RSA modulus several hundred digits long, the purely iterative method of Fermat is too slow. Several other methods have been presented, such as the Elliptic Curve Method discovered by H. Lenstra in 1987 and a pair ofprobabilistic methods by Pollard in the mid 70’s, the p − 1 method and the ρ method. The fastest algorithms, however, utilize the same trick as Fermat, examples of which are the Continued Fraction Method, the Quadratic Sieve (and it variants), and the Number Field Sieve (and its variants). The exception to this is the Elliptic Curve Method, which runs almost as fast as the Quadratic Sieve. The remainderof this paper focuses on the Quadratic Sieve Method.

2

The Quadratic Sieve, hereafter simply called the QS, was invented by Carl Pomerance in 1981, extending earlier ideas of Kraitchik and Dixon. The QS was the fastest known factoring algorithm until the Number Field Sieve was discovered in 1993. Still the QS is faster than the Number Field Sieve for numbers up to 110digits long.

1

3

How it Works

If n is the number to be factored, the QS attemps to ﬁnd two numbers x and y such that x ≡ ±y (mod n) and x2 ≡ y 2 (mod n). This would imply that (x − y)(x + y) ≡ 0 (mod n), and we simply compute (x − y, n) using the Euclidean Algorithm to see if this is a nontrivial divisor. There is at least 1 a 2 chance that the factor will be nontrivial. Our ﬁrststep in doing so is to deﬁne √ Q(x) = (x + n )2 − n = x2 − n, ˜ and compute Q(x1 ), Q(x2 ), . . . , Q(xk ). Determining the xi will be explained below. From the evaluations of Q(x), we want to pick a subset such that Q(xi1 )Q(xi2 ) . . . Q(xir ) is a square, y 2 . Then note that for all x, Q(x) ≡ x2 ˜ (mod n). So what we have then is that Q(xi1 )Q(xi2 ) . . . Q(xir ) ≡ (xi1 xi2 . . . xir )2 (mod n).And if the conditions above hold, then we have factors of n.

3.1

Setting up a Factor Base and a Sieving Interval

With the basic outline of the QS in place, we need an eﬃcient way to determine our xi , and to get a product of the Q(xi ) to be a square. Now to check to see if the product is a square, the exponents of the prime factors of the product need to all be even. So we will needto factor each of the Q(xi ). Therefore, we want them to be small and to factor over a ﬁxed set of small prime numbers (including -1), which we call our factor base. To make Q(x) small, we need to select x close to 0, so we set a bound M and only consider values of x over the sieving interval [−M, M ]. (Alternatively, we √ could have √ 2 deﬁned Q(x) = x −n and let the sieving interval be [ n −M, n+M ].) Now if x is in this sieving interval, and if some prime p divides Q(x), then √ (x − n )2 ≡ n (mod p), so n is a quadratic residue (mod p). So the primes in our factor base must be primes such that the Legendre symbol n p 2 = 1.

A second criterion for these primes is that they should be less than some bound B, which depends on the size of n. We will discuss this when we analyze the...