10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

340 Chapter 7 ELLIPTIC CURVE ARITHMETIC<br />

current point by every prime in (B1,q]. Instead, one can use the point<br />

⎡<br />

Q = ⎣ <br />

p ai<br />

⎤<br />

⎦<br />

i P,<br />

pi≤B1<br />

which is the point actually “surviving” the stage-one ECM Algorithm 7.4.2,<br />

and check the points<br />

[q0]Q, [q0 +∆0]Q, [q0 +∆0 +∆1]Q, [q0 +∆0 +∆1 +∆2]Q,...,<br />

where q0 is the least prime exceeding B1, and∆i are the differences between<br />

subsequent primes after q0. The idea is that one can store some points<br />

Ri =[∆i]Q,<br />

once and for all, then quickly process the primes beyond B1 by successive<br />

elliptic additions of appropriate Ri. The primary gain to be realized here<br />

is that to multiply a point by a prime such as q requires O(ln q) elliptic<br />

operations, while addition of a precomputed Ri is, of course, one operation.<br />

Beyond this “stage-two” optimization and variants thereupon, one may<br />

invoke other enhancements such as<br />

(1) Special parameterization to easily obtain random curves.<br />

(2) Choice of curves with order known to be divisible by 12 or 16 [Montgomery<br />

1992a], [Brent et al. 2000].<br />

(3) Enhancements of large-integer arithmetic and of the elliptic algebra itself,<br />

saybyFFT.<br />

(4) Fast algorithms applied to stage two, such as “FFT extension” which is<br />

actually a polynomial-evaluation scheme applied to sets of precomputed<br />

x-coordinates.<br />

Rather than work through such enhancements with incremental algorithm<br />

exhibitions, we instead adopt a specific strategy: We shall discuss the above<br />

enhancements briefly, then exhibit a single, practical algorithm containing<br />

many of said enhancements.<br />

On enhancement (1) above, a striking feature our eventual algorithm will<br />

enjoy is that one need not involve y-coordinates at all. In fact, the algorithm<br />

will use the Montgomery parameterization<br />

gy 2 = x 3 + Cx 2 + x,<br />

with elliptic multiplication carried out via Algorithm 7.2.7. Thus a point<br />

will have the general homogeneous form P = [X, any,Z] = [X : Z] (see<br />

Section 7.2 for a discussion of the notation), and we need only track the<br />

residues X, Z (mod n). As we mentioned subsequent to Algorithm 7.2.7, the<br />

appearance of the point-at-infinity O during calculation on a curve over Fp,<br />

where p|n, is signified by the vanishing of denominator Z, and such vanishing

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!