Prime Numbers
Prime Numbers Prime Numbers
294 Chapter 6 SUBEXPONENTIAL FACTORING ALGORITHMS } Install the exponent vector v(a − bα) as the next row of the matrix; 4. [Linear algebra] By some method of linear algebra (see Section 6.1.3), find a nonempty subset S of S ′ such that (a,b)∈S v(a − bα) is the 0-vector (mod 2); 5. [Square roots] Use the known prime factorization of the integer square (a,b)∈S (a − bm) to find a residue v mod n with (a,b)∈S (a − bm) ≡ v2 (mod n); By some method, such as those of Section 6.2.5, find a square root γ in Z[α] of f ′ 2 (α) (a,b)∈S (a − bα), and, via simple replacement α → m, compute u = φ(γ) (modn); 6. [Factorization] return gcd(u − f ′ (m)v, n); If the divisor of n that is reported in Algorithm 6.2.5 is trivial, one has the option of finding more linear dependencies in the matrix and trying again. If we run out of linear dependencies, one again has the option to sieve further to find more rows for the matrix, and so have more linear dependencies. 6.2.7 NFS: Further considerations As with the basic quadratic sieve, there are many “bells and whistles” that may be added to the number field sieve to make it an even better factorization method. In this section we shall briefly discuss some of these improvements. Free relations Suppose p is a prime in the “factor base,” that is, p ≤ B. Our exponent vectors have a coordinate corresponding to p as a possible prime factor of a − bm, and#R(p) further coordinates corresponding to integers r ∈ R(p). (Recall that R(p) is the set of residues r (mod p) withf(r) ≡ 0(modp).) On average, #R(p) is1,butitcanbeaslowas0(inthecasethatf(x) hasno roots (mod p), or it can be as high as d, the degree of f(x) (in the case that f(x) splits into d distinct linear factors (mod p)). In this latter case, we have that the product of the prime ideals (p, α − r) in the full ring of algebraic integers in Q[α] is(p). Suppose p is a prime with p ≤ B, andR(p) hasdmembers. Let us throw into our matrix an extra row vector v(p), which has 1’s in the coordinates corresponding to p and to each pair p, r where r ∈ R(p). Also, in the final field of k coordinates corresponding to the quadratic characters modulo qj for j =1,...,k, put a 0 in place j of v(p) if p = 1 and put a 1 in place qj j if p = −1. Such a vector v(p) is called a free relation, since it is found qj in the precomputations, and not in the sieving stage. Now, when we find a subset of rows that sum to the zero vector mod 2, we have that the subset corresponds to a set S of coprime pairs a, b and a set F of free relations. Let w be the product of the primes p corresponding to the free relations in F.
6.2 Number field sieve 295 Then it should be that wf ′ 2 (α) (a,b)∈S wf ′ 2 (m) (a,b)∈S (a − bα) =γ 2 , for some γ ∈ Z[α], (a − bm) =v 2 , for some v ∈ Z. Then if φ(γ) =u, wehaveu 2 ≡ v 2 (mod n), as before. The advantage of free relations is that the more of them there are, the fewer relations need be uncovered in the time-consuming sieve stage. Also, the vectors v(p) are sparser than a typical exponent vector v(a, b), so including free relations allows the matrix stage to run faster. So, how many free relations do we expect to find? A free relation corresponds to a prime p that splits completely in the algebraic number field Q(α). Let g be the order of the splitting field of f(x); that is, the Galois closure of Q(α) in the complex numbers. It follows from the Chebotarev density theorem that the number of primes p up to a bound X that split completely in Q(α) is asymptotically 1 g π(X), as X →∞. That is, on average, 1 out of every g prime numbers corresponds to a free relation. Assuming that our factor base bound B is large enough so that the asymptotics are beginning to take over (this is yet another heuristic, but reasonable, assumption), we thus should expect about 1 g π(B) free relations. Now, the order g of the splitting field could be as small as d, the degree of f(x), or as high as d!. Obviously, the smaller g is, the more free relations we should expect. Unfortunately, the generic case is g = d!. That is, for most irreducible polynomials f(x) inZ[x] of degree d, the order of the splitting field of f(x) isd!. So, for example, if 1 d = 5, we should expect only about 120π(B) free relations, if we choose our polynomial f(x) according to the scheme in Step [Setup] in Algorithm 6.2.5. Since our vectors have about 2π(B) coordinates, the free relations in this case would only reduce the sieving time by less than one-half of 1 per cent. But still, it is free, so to speak, and every little bit helps. Free relations can help considerably more in the case of special polynomials f(x) with small splitting fields. For example, in the factorization of the ninth Fermat number F9, the polynomial f(x) =x5 + 8 was used. The order of the splitting field here is 20, so free relations allowed the sieving time to be reduced by about 2.5%. Partial relations As in the quadratic sieve method, sieving in the number field sieve not only reveals those pairs a, b where both of the numbers N(a−bα) =F (a, b) = b d f(a/b) anda − bm are B-smooth, but also pairs a, b where one or both of these numbers are a B-smooth number times one somewhat larger prime. If we allow relations that have such large primes, at most one each for N(a−bα) and a − bm, we then have a data structure not unlike the quadratic sieve with the double large-prime variation; see Section 6.1.4. It has also been suggested that reports can be used with N(a − bα) having two large primes and a − bm
- 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 288 and 289: 278 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 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
- Page 338 and 339: 7.2 Elliptic arithmetic 329 Before
- Page 340 and 341: 7.2 Elliptic arithmetic 331 the “
- Page 342 and 343: 7.3 The theorems of Hasse, Deuring,
- Page 344 and 345: 7.4 Elliptic curve method 335 a ran
- Page 346 and 347: 7.4 Elliptic curve method 337 B1 =
- Page 348 and 349: 7.4 Elliptic curve method 339 facto
- Page 350 and 351: 7.4 Elliptic curve method 341 propa
- Page 352 and 353: 7.4 Elliptic curve method 343 As fo
294 Chapter 6 SUBEXPONENTIAL FACTORING ALGORITHMS<br />
}<br />
Install the exponent vector v(a − bα) as the next row of the matrix;<br />
4. [Linear algebra]<br />
By some method of linear algebra (see Section 6.1.3), find a nonempty<br />
subset S of S ′ such that <br />
(a,b)∈S v(a − bα) is the 0-vector (mod 2);<br />
5. [Square roots]<br />
Use the known prime factorization of the integer square <br />
(a,b)∈S (a − bm)<br />
to find a residue v mod n with <br />
(a,b)∈S (a − bm) ≡ v2 (mod n);<br />
By some method, such as those of Section 6.2.5, find a square root γ in<br />
Z[α] of f ′ 2 (α) (a,b)∈S (a − bα), and, via simple replacement α → m,<br />
compute u = φ(γ) (modn);<br />
6. [Factorization]<br />
return gcd(u − f ′ (m)v, n);<br />
If the divisor of n that is reported in Algorithm 6.2.5 is trivial, one has the<br />
option of finding more linear dependencies in the matrix and trying again. If<br />
we run out of linear dependencies, one again has the option to sieve further<br />
to find more rows for the matrix, and so have more linear dependencies.<br />
6.2.7 NFS: Further considerations<br />
As with the basic quadratic sieve, there are many “bells and whistles” that<br />
may be added to the number field sieve to make it an even better factorization<br />
method. In this section we shall briefly discuss some of these improvements.<br />
Free relations<br />
Suppose p is a prime in the “factor base,” that is, p ≤ B. Our exponent<br />
vectors have a coordinate corresponding to p as a possible prime factor of<br />
a − bm, and#R(p) further coordinates corresponding to integers r ∈ R(p).<br />
(Recall that R(p) is the set of residues r (mod p) withf(r) ≡ 0(modp).) On<br />
average, #R(p) is1,butitcanbeaslowas0(inthecasethatf(x) hasno<br />
roots (mod p), or it can be as high as d, the degree of f(x) (in the case that<br />
f(x) splits into d distinct linear factors (mod p)). In this latter case, we have<br />
that the product of the prime ideals (p, α − r) in the full ring of algebraic<br />
integers in Q[α] is(p).<br />
Suppose p is a prime with p ≤ B, andR(p) hasdmembers. Let us throw<br />
into our matrix an extra row vector v(p), which has 1’s in the coordinates<br />
corresponding to p and to each pair p, r where r ∈ R(p). Also, in the final<br />
field of k coordinates corresponding to the quadratic characters modulo qj<br />
for j =1,...,k, put a 0 in place j of v(p) if p<br />
= 1 and put a 1 in place<br />
qj<br />
j if p<br />
= −1. Such a vector v(p) is called a free relation, since it is found<br />
qj<br />
in the precomputations, and not in the sieving stage. Now, when we find a<br />
subset of rows that sum to the zero vector mod 2, we have that the subset<br />
corresponds to a set S of coprime pairs a, b and a set F of free relations. Let<br />
w be the product of the primes p corresponding to the free relations in F.