Prime Numbers
Prime Numbers Prime Numbers
7.4 Elliptic curve method 337 B1 = 10000; // Or whatever is a practical initial “stage-one limit” B1. 2. [Find curve Ea,b(Zn) and point (x, y) ∈ E] Choose random x, y, a ∈ [0,n− 1]; b =(y 2 − x 3 − ax) modn; g =gcd(4a 3 +27b 2 ,n); if(g == n) goto [Find curve ...]; if(g >1) return g; // Factor is found. E = Ea,b(Zn); P =(x, y); // Elliptic pseudocurve and point on it. 3. [Prime-power multipliers] for(1 ≤ i ≤ π(B1)) { // Loop over primes pi. Find largest integer ai such that p ai i ≤ B1; for(1 ≤ j ≤ ai) { // j is just a counter. P = [pi]P , halting the elliptic algebra if the computation of some d−1 for addition-slope denominator d signals a nontrivial g =gcd(n, d), in which case return g; // Factor is found. } } 4. [Failure] Possibly increment B1; // See text. goto [Find curve ...]; What we hope with basic ECM is that even though the composite n allows only a pseudocurve, an illegal elliptic operation—specifically the inversion required for slope calculation from Definition 7.1.2—is a signal that for some prime p|n we have [k]P = O, where k = p a i i ≤B1 p ai i , with this relation holding on the legitimate elliptic curve Ea,b(Fp). Furthermore, we know from the Hasse Theorem 7.3.1 that the order #Ea,b(Fp) isin the interval (p+1−2 √ p, p+1+2 √ p). Evidently, we can expect a factor if the multiplier k is divisible by #E(Fp), which should, in fact, happen if this order is B1-smooth. (This is not entirely precise, since for the order to be B1-smooth it is required only that each of its prime factors be at most B1, but in the above display, we have instead the stronger condition that each prime power divisor of the order is at most B1. We could change the inequality defining ai to p ai i ≤ n +1+2√n, but in practice the cost of doing so is too high for the meager benefit it may provide.) We shall thus think of the stage-one limit B1 as a smoothness bound on actual curve orders in the group determined by the hidden prime factor p. It is instructive to compare ECM with the Pollard p−1 method (Algorithm 5.4.1). In the p − 1 method one has only the one group Z∗ p (with order p − 1), and one is successful if this group order is B-smooth. With ECM one has
338 Chapter 7 ELLIPTIC CURVE ARITHMETIC a host of elliptic-curve groups to choose from randomly, each giving a fresh chance at success. With these ideas, we may perform a heuristic complexity estimate for ECM. Suppose the number n to be factored is composite, coprime to 6, and not a proper power. Let p denote the least prime factor of n and let q denote another prime factor of n. Algorithm 7.4.2 will be successful in splitting n if we choose a, b, P in Step [Find curve ...] and if for some value of k of the form k = p a l where l ≤ π(B1) anda ≤ al, wehave i
- 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
- 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 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
- Page 362 and 363: 7.5 Counting points on elliptic cur
- Page 364 and 365: 7.5 Counting points on elliptic cur
- Page 366 and 367: 7.5 Counting points on elliptic cur
- Page 368 and 369: 7.5 Counting points on elliptic cur
- Page 370 and 371: 7.5 Counting points on elliptic cur
- Page 372 and 373: 7.5 Counting points on elliptic cur
- Page 374 and 375: 7.5 Counting points on elliptic cur
- Page 376 and 377: 7.5 Counting points on elliptic cur
- Page 378 and 379: 7.6 Elliptic curve primality provin
- Page 380 and 381: 7.6 Elliptic curve primality provin
- Page 382 and 383: 7.6 Elliptic curve primality provin
- Page 384 and 385: 7.7 Exercises 375 7.4. As in Exerci
- Page 386 and 387: 7.7 Exercises 377 (some Bj equals A
- Page 388 and 389: 7.7 Exercises 379 This reduction ig
- Page 390 and 391: 7.8 Research problems 381 multiply-
- Page 392 and 393: 7.8 Research problems 383 highly ef
- Page 394 and 395: 7.8 Research problems 385 is prime.
7.4 Elliptic curve method 337<br />
B1 = 10000; // Or whatever is a practical initial “stage-one limit” B1.<br />
2. [Find curve Ea,b(Zn) and point (x, y) ∈ E]<br />
Choose random x, y, a ∈ [0,n− 1];<br />
b =(y 2 − x 3 − ax) modn;<br />
g =gcd(4a 3 +27b 2 ,n);<br />
if(g == n) goto [Find curve ...];<br />
if(g >1) return g; // Factor is found.<br />
E = Ea,b(Zn); P =(x, y); // Elliptic pseudocurve and point on it.<br />
3. [<strong>Prime</strong>-power multipliers]<br />
for(1 ≤ i ≤ π(B1)) { // Loop over primes pi.<br />
Find largest integer ai such that p ai<br />
i ≤ B1;<br />
for(1 ≤ j ≤ ai) { // j is just a counter.<br />
P = [pi]P , halting the elliptic algebra if the computation of<br />
some d−1 for addition-slope denominator d signals a nontrivial<br />
g =gcd(n, d), in which case return g;<br />
// Factor is found.<br />
}<br />
}<br />
4. [Failure]<br />
Possibly increment B1; // See text.<br />
goto [Find curve ...];<br />
What we hope with basic ECM is that even though the composite n allows<br />
only a pseudocurve, an illegal elliptic operation—specifically the inversion<br />
required for slope calculation from Definition 7.1.2—is a signal that for some<br />
prime p|n we have<br />
[k]P = O, where k = <br />
p a i<br />
i ≤B1<br />
p ai<br />
i ,<br />
with this relation holding on the legitimate elliptic curve Ea,b(Fp). Furthermore,<br />
we know from the Hasse Theorem 7.3.1 that the order #Ea,b(Fp) isin<br />
the interval (p+1−2 √ p, p+1+2 √ p). Evidently, we can expect a factor if the<br />
multiplier k is divisible by #E(Fp), which should, in fact, happen if this order<br />
is B1-smooth. (This is not entirely precise, since for the order to be B1-smooth<br />
it is required only that each of its prime factors be at most B1, but in the<br />
above display, we have instead the stronger condition that each prime power<br />
divisor of the order is at most B1. We could change the inequality defining ai<br />
to p ai<br />
i ≤ n +1+2√n, but in practice the cost of doing so is too high for the<br />
meager benefit it may provide.) We shall thus think of the stage-one limit B1<br />
as a smoothness bound on actual curve orders in the group determined by the<br />
hidden prime factor p.<br />
It is instructive to compare ECM with the Pollard p−1 method (Algorithm<br />
5.4.1). In the p − 1 method one has only the one group Z∗ p (with order p − 1),<br />
and one is successful if this group order is B-smooth. With ECM one has