Prime Numbers
Prime Numbers Prime Numbers
278 Chapter 6 SUBEXPONENTIAL FACTORING ALGORITHMS As the number b grows in absolute value, y(b) is dominated by the term −4b 3 m. It is not unreasonable to expect that b will grow as large as 2 40 , in which case the size of |y(b)| will be near 2 323 . This does not compare favorably with the quadratic sieve with multiple polynomials, where the size of the numbers we sieve for smooths would be about 2 20√ n ≈ 2 301 .(This assumes a sieving interval of about 2 20 per polynomial.) However, we can also use multiple polynomials with the special quadratic sieve. For example, for the above number n0, take b0 = −2u 2 , b1 =2uv, b2 = v 2 . This then implies that we may take x(u, v) =v 2 m 2 +2uvm − 2u 2 , y(u, v) =(4v 4 − 8u 3 v)m +16uv 3 +4u 4 , and let u, v range over small, coprime integers. (It is important to take u, v coprime, since otherwise, we shall get redundant relations.) If u, v are allowed to range over numbers with absolute value up to 220 , we get about the same number of pairs as choices for b above, but the size of |y(u, v)| is now about 2283 , a savings over the ordinary quadratic sieve. (There is a small additional savings, since we may actually consider the pair n−1 1 2 x(u, v), 4y(u, v).) It is perhaps not clear why the introduction of u, v may be considered as “multiple polynomials.” The idea is that we may fix one of these letters, and sieve over the other. Each choice of the first letter gives a new polynomial in the second letter. The assumption in the above analysis of a sieve of length 240 is probably on the small side for a number the size of n0. A larger sieve length will make SQSlookpoorerincomparisonwithordinaryQS. It is not clear whether the special quadratic sieve, as described above, will be a useful factoring algorithm (as of this writing, it has not actually been tried out in significant settings). If the number n is not too large, the growth of the coefficient of m in y(b) ory(u, v) will dominate and make the comparison with the ordinary quadratic sieve poor. If the number n is somewhat larger, so that the special quadratic sieve starts to look better, as in the above example, there is actually another algorithm that may come into play and again majorize the special quadratic sieve. This is the number field sieve, something we shall discuss in the next section. 6.2 Number field sieve We have encountered some of the inventive ideas of J. Pollard in Chapter 5. In 1988 (see [Lenstra and Lenstra 1993]) Pollard suggested a factoring method that was very well suited for numbers, such as Fermat numbers, that are close to a high power. Before long, this method had been generalized so that it could be used for general composites. Today, the number field sieve (NFS) stands as the asymptotically fastest heuristic factoring algorithm we know for “worst-case” composite numbers.
6.2 Number field sieve 279 6.2.1 Basic NFS: Strategy The quadratic sieve factorization method is fast because it produces small quadratic residues modulo the number we are trying to factor, and because we can use a sieve to quickly recognize which of these quadratic residues are smooth. The QS method would be faster still if the quadratic residues it produces could be arranged to be smaller, since then they would be more likely to be smooth, and so we would not have to sift through as many of them. An interesting thought in this regard is that it is not necessary that they be quadratic residues, only small! We have a technique through linear algebra of multiplying subsets of smooth numbers so as to obtain squares. In the quadratic sieve, we had only to worry about one side of the congruence, since the other side was already a square. In the number field sieve we use the linear algebra method on both sides of the key congruence. However, our congruences will not start with two integers being congruent mod n. Rather, they will start with pairs θ, φ(θ), where θ lies in a particular algebraic number ring, and φ is a homomorphism from the ring to Zn. (These concepts will be described concretely, in a moment.) Suppose we have k such pairs θ1,φ(θ1),...,θk,φ(θk), such that the product θ1 ···θk is a square in the number ring, say γ 2 , and there is an integer square, say v 2 , such that φ(θ1) ···φ(θk) ≡ v 2 (mod n). Then if φ(γ) ≡ u (mod n) for an integer u, we have u 2 ≡ φ(γ) 2 ≡ φ(γ 2 ) ≡ φ(θ1 ···θk) ≡ φ(θ1) ···φ(θk) ≡ v 2 (mod n). That is, stripping away all of the interior expressions, we have the congruence u 2 ≡ v 2 (mod n), and so could try to factor n via gcd(u − v, n). The above ideas constitute the strategy of NFS. We now discuss the basic setup that introduces the number ring and the homomorphism φ. Suppose we are trying to factor the number n, which is odd, composite, and not a power. Let f(x) =x d + cd−1x d−1 + ···+ c0 be an irreducible polynomial in Z[x], and let α be a complex number that is a root of f. We do not need to numerically approximate α; we just use the symbol “α” to stand for one of the roots of f. Our number ring will be Z[α]. This is computationally thought of as the set of ordered d-tuples (a0,a1,...,ad−1) of integers, where we “picture” such a d-tuple as the element a0 + a1α + ···ad−1α d−1 . We add two such expressions coordinatewise, and we multiply via the normal polynomial product, but then reduce to a d-tuple via the identity f(α) = 0. Another, equivalent way of thinking of the number ring Z[α] istorealizeitasZ[x]/(f(x)), that is, involving polynomial arithmetic modulo f(x). The connection to the number n we are factoring comes via an integer m with the property that f(m) ≡ 0(modn). We do need to know what the integer m is. We remark that there is a very simple method of coming up with an acceptable choice of f(x) and
- Page 238 and 239: 5.1 Squares 227 5.1.2 Lehman method
- Page 240 and 241: 5.2 Monte Carlo methods 229 That is
- Page 242 and 243: 5.2 Monte Carlo methods 231 It is c
- Page 244 and 245: 5.2 Monte Carlo methods 233 computi
- Page 246 and 247: 5.3 Baby-steps, giant-steps 235 cal
- Page 248 and 249: 5.4 Pollard p − 1 method 237 can
- Page 250 and 251: 5.6 Binary quadratic forms 239 f(jB
- Page 252 and 253: 5.6 Binary quadratic forms 241 so o
- Page 254 and 255: 5.6 Binary quadratic forms 243 equi
- Page 256 and 257: 5.6 Binary quadratic forms 245 is a
- Page 258 and 259: 5.6 Binary quadratic forms 247 In t
- Page 260 and 261: 5.6 Binary quadratic forms 249 of D
- Page 262 and 263: 5.7 Exercises 251 is completely rig
- Page 264 and 265: 5.7 Exercises 253 of each of these
- Page 266 and 267: 5.8 Research problems 255 5.17. Sho
- Page 268 and 269: 5.8 Research problems 257 modulo th
- Page 270 and 271: 5.8 Research problems 259 In judgin
- Page 272 and 273: 262 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 274 and 275: 264 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 276 and 277: 266 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 278 and 279: 268 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 280 and 281: 270 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 282 and 283: 272 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 284 and 285: 274 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 286 and 287: 276 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 290 and 291: 280 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 292 and 293: 282 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 294 and 295: 284 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 296 and 297: 286 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 298 and 299: 288 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 300 and 301: 290 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 302 and 303: 292 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 304 and 305: 294 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 306 and 307: 296 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 308 and 309: 298 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 310 and 311: 300 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 312 and 313: 302 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 314 and 315: 304 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 316 and 317: 306 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 318 and 319: 308 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 320 and 321: 310 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 322 and 323: 312 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 324 and 325: 314 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 326 and 327: 316 Chapter 6 SUBEXPONENTIAL FACTOR
- Page 328 and 329: Chapter 7 ELLIPTIC CURVE ARITHMETIC
- Page 330 and 331: 7.1 Elliptic curve fundamentals 321
- Page 332 and 333: 7.2 Elliptic arithmetic 323 the poi
- Page 334 and 335: 7.2 Elliptic arithmetic 325 with EC
- Page 336 and 337: 7.2 Elliptic arithmetic 327 Algorit
6.2 Number field sieve 279<br />
6.2.1 Basic NFS: Strategy<br />
The quadratic sieve factorization method is fast because it produces small<br />
quadratic residues modulo the number we are trying to factor, and because<br />
we can use a sieve to quickly recognize which of these quadratic residues<br />
are smooth. The QS method would be faster still if the quadratic residues<br />
it produces could be arranged to be smaller, since then they would be more<br />
likely to be smooth, and so we would not have to sift through as many of<br />
them. An interesting thought in this regard is that it is not necessary that<br />
they be quadratic residues, only small! We have a technique through linear<br />
algebra of multiplying subsets of smooth numbers so as to obtain squares. In<br />
the quadratic sieve, we had only to worry about one side of the congruence,<br />
since the other side was already a square. In the number field sieve we use the<br />
linear algebra method on both sides of the key congruence.<br />
However, our congruences will not start with two integers being congruent<br />
mod n. Rather, they will start with pairs θ, φ(θ), where θ lies in a particular<br />
algebraic number ring, and φ is a homomorphism from the ring to Zn. (These<br />
concepts will be described concretely, in a moment.) Suppose we have k such<br />
pairs θ1,φ(θ1),...,θk,φ(θk), such that the product θ1 ···θk is a square in<br />
the number ring, say γ 2 , and there is an integer square, say v 2 , such that<br />
φ(θ1) ···φ(θk) ≡ v 2 (mod n). Then if φ(γ) ≡ u (mod n) for an integer u, we<br />
have<br />
u 2 ≡ φ(γ) 2 ≡ φ(γ 2 ) ≡ φ(θ1 ···θk) ≡ φ(θ1) ···φ(θk) ≡ v 2 (mod n).<br />
That is, stripping away all of the interior expressions, we have the congruence<br />
u 2 ≡ v 2 (mod n), and so could try to factor n via gcd(u − v, n).<br />
The above ideas constitute the strategy of NFS. We now discuss the basic<br />
setup that introduces the number ring and the homomorphism φ. Suppose we<br />
are trying to factor the number n, which is odd, composite, and not a power.<br />
Let<br />
f(x) =x d + cd−1x d−1 + ···+ c0<br />
be an irreducible polynomial in Z[x], and let α be a complex number that<br />
is a root of f. We do not need to numerically approximate α; we just use<br />
the symbol “α” to stand for one of the roots of f. Our number ring will<br />
be Z[α]. This is computationally thought of as the set of ordered d-tuples<br />
(a0,a1,...,ad−1) of integers, where we “picture” such a d-tuple as the element<br />
a0 + a1α + ···ad−1α d−1 . We add two such expressions coordinatewise, and we<br />
multiply via the normal polynomial product, but then reduce to a d-tuple via<br />
the identity f(α) = 0. Another, equivalent way of thinking of the number ring<br />
Z[α] istorealizeitasZ[x]/(f(x)), that is, involving polynomial arithmetic<br />
modulo f(x).<br />
The connection to the number n we are factoring comes via an integer m<br />
with the property that<br />
f(m) ≡ 0(modn).<br />
We do need to know what the integer m is. We remark that there is a<br />
very simple method of coming up with an acceptable choice of f(x) and