Prime Numbers
Prime Numbers Prime Numbers
302 Chapter 6 SUBEXPONENTIAL FACTORING ALGORITHMS Assuming the ERH, see Conjecture 1.4.2, an algorithm of Shanks deterministically factors n in a running-time bound of O(n 1/5+o(1) ). This method is described in Section 5.6.4. That is it for rigorous, deterministic methods. What, then, of probabilistic methods? The first subexponential probabilistic factoring algorithm with a completely rigorous analysis was the “random-squares method” of J. Dixon; see [Dixon 1981]. His algorithm is to take random integers r in [1,n], looking for those where r 2 mod n is smooth. If enough are found, then congruent squares can be assembled, as in QS, and so a factorization of n may be attempted. The randomness of the numbers r that are used allows one to say rigorously how frequently the residues r 2 mod n are smooth, and how likely the congruent squares assembled lead to a nontrivial factorization of n. Dixon showedthat the expected running time for his algorithm to split n is bounded by exp (c + o(1)) √ ln n ln ln n ,wherec = √ 8. Subsequent improvements by Pomerance and later by B. Vallée lowered c to 4/3. The current lowest running-time bound for a rigorous probabilistic factoring algorithm is exp((1 + o(1)) √ ln n ln ln n). This is achieved by the “class-group-relations method” of [Lenstra and Pomerance 1992]. Previously, this time bound was achieved by A. Lenstra for a very similar algorithm, but the analysis required the use of the ERH. It is interesting that this time bound is exactly the same as that heuristically achieved by QS. Again the devil is in the “o(1),” making the class-group-relations method impractical in comparison. It is interesting that both the improved versions of the random-squares method and the class-group-relations method use ECM as a subroutine to quickly recognize smooth numbers. One might well wonder how a not-yetrigorously analyzed algorithm can be used as a subroutine in a rigorous algorithm. The answer is that one need not show that the subroutine always works, just that it works frequently enough to be of use. It can be shown rigorously that ECM recognizes most y-smooth numbers below x in y o(1) ln x arithmetic operations with integers the size of x. Theremaybesome exceptional numbers that are stubborn for ECM, but they are provably rare. Concerning the issue of smoothness tests, a probabilistic algorithm announced in [Lenstra et al. 1993b] recognizes all y-smooth numbers n in y o(1) ln n arithmetic operations. That is, it performs similarly as ECM, but unlike ECM, the complexity estimate is completely rigorous and there are provably no exceptional numbers. 6.4 Index-calculus method for discrete logarithms In Chapter 5 we described some general algorithms for the computation of discrete logarithms that work in virtually any cyclic group for which we can represent group elements on a computer and perform the group operation. These exponential-time algorithms have the number of steps being about the square root of the group order. In certain specific groups we have more
6.4 Index-calculus method for discrete logarithms 303 information that might be used profitably for DL computations. We have seen in this chapter the ubiquitous role of smooth numbers as an aid to factorization. In some groups sense can be made of saying that a group element is smooth, and when this is the case, it is often possible to perform DLs via a subexponential algorithm. The basic idea is embodied in the index-calculus method. We first describe the index-calculus method for the multiplicative group of the finite field Fp, wherep is prime. Later we shall see how the method can be used for all finite fields. The fact that subexponential methods exist for solving DLs in the multiplicative group of a finite field have led cryptographers to use other groups, the most popular being elliptic-curve groups; see Chapter 7. 6.4.1 Discrete logarithms in prime finite fields Consider the multiplicative group F ∗ p,wherep is a large prime. This group is cyclic, a generator being known as a primitive root (Definition 2.2.6). Suppose g is a primitive root and t is an element of the group. The DL problem for F ∗ p is, given p, g, t to find an integer l with g l = t. Actually, l is not well-defined by this equation, the integers l that work form a residue class modulo p − 1. We write l ≡ log g t (mod p − 1). What makes the index-calculus method work in F ∗ p is that we do not have to think of g and t as abstract group elements, but rather as integers, and we may think of the equation g l = t as the congruence g l ≡ t (mod p). The index-calculus method consists of two principal stages. The first stage involves gathering “relations.” These are congruences g r ≡ p r1 1 ···prk k (mod p), where p1,...,pk are small prime numbers. Such a congruence gives rise to a congruence of discrete logarithms: r ≡ r1 log g p1 + ···+ rk log g pk (mod p − 1). If there are enough of these relations, it may then be possible to use linear algebra to solve for the various logg pi. After this precomputation, which is the heart of the method, the final discrete logarithm of t is relatively simple. If one has a relation of the form gRt ≡ p τ1 1 ···pτk k (mod p), then we have that log g t ≡−R + τ1 log g p1 + ···+log g pk (mod p − 1). Both kinds of relations are found via random choices for the numbers r, R. A choice for r givesrisetosomeresidueg r mod p, which may or may not factor completely over the small primes p1,...,pk. Similarly, a choice for R gives rise to the residue g R t mod p. By taking residues closest to 0 and allowing a factor −1 in a prime factorization, a small gain is realized. Note that we do not have to solve for the discrete logarithm of −1; it is already known as (p − 1)/2. We summarize the index-calculus method for F ∗ p in the following pseudocode.
- 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 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 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
- Page 354 and 355: 7.4 Elliptic curve method 345 if(1
- Page 356 and 357: 7.5 Counting points on elliptic cur
- Page 358 and 359: 7.5 Counting points on elliptic cur
- Page 360 and 361: 7.5 Counting points on elliptic cur
6.4 Index-calculus method for discrete logarithms 303<br />
information that might be used profitably for DL computations. We have<br />
seen in this chapter the ubiquitous role of smooth numbers as an aid to<br />
factorization. In some groups sense can be made of saying that a group element<br />
is smooth, and when this is the case, it is often possible to perform DLs via<br />
a subexponential algorithm. The basic idea is embodied in the index-calculus<br />
method.<br />
We first describe the index-calculus method for the multiplicative group<br />
of the finite field Fp, wherep is prime. Later we shall see how the method can<br />
be used for all finite fields.<br />
The fact that subexponential methods exist for solving DLs in the<br />
multiplicative group of a finite field have led cryptographers to use other<br />
groups, the most popular being elliptic-curve groups; see Chapter 7.<br />
6.4.1 Discrete logarithms in prime finite fields<br />
Consider the multiplicative group F ∗ p,wherep is a large prime. This group is<br />
cyclic, a generator being known as a primitive root (Definition 2.2.6). Suppose<br />
g is a primitive root and t is an element of the group. The DL problem for F ∗ p<br />
is, given p, g, t to find an integer l with g l = t. Actually, l is not well-defined<br />
by this equation, the integers l that work form a residue class modulo p − 1.<br />
We write l ≡ log g t (mod p − 1).<br />
What makes the index-calculus method work in F ∗ p is that we do not<br />
have to think of g and t as abstract group elements, but rather as integers,<br />
and we may think of the equation g l = t as the congruence g l ≡ t<br />
(mod p). The index-calculus method consists of two principal stages. The first<br />
stage involves gathering “relations.” These are congruences g r ≡ p r1<br />
1 ···prk<br />
k<br />
(mod p), where p1,...,pk are small prime numbers. Such a congruence gives<br />
rise to a congruence of discrete logarithms:<br />
r ≡ r1 log g p1 + ···+ rk log g pk (mod p − 1).<br />
If there are enough of these relations, it may then be possible to use linear<br />
algebra to solve for the various logg pi. After this precomputation, which is<br />
the heart of the method, the final discrete logarithm of t is relatively simple.<br />
If one has a relation of the form gRt ≡ p τ1<br />
1 ···pτk k (mod p), then we have that<br />
log g t ≡−R + τ1 log g p1 + ···+log g pk (mod p − 1).<br />
Both kinds of relations are found via random choices for the numbers r, R. A<br />
choice for r givesrisetosomeresidueg r mod p, which may or may not factor<br />
completely over the small primes p1,...,pk. Similarly, a choice for R gives rise<br />
to the residue g R t mod p. By taking residues closest to 0 and allowing a factor<br />
−1 in a prime factorization, a small gain is realized. Note that we do not have<br />
to solve for the discrete logarithm of −1; it is already known as (p − 1)/2. We<br />
summarize the index-calculus method for F ∗ p in the following pseudocode.