10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

372 Chapter 7 ELLIPTIC CURVE ARITHMETIC<br />

implemented a highly efficient elliptic curve primality proving (ECPP) scheme<br />

[Atkin and Morain 1993b]. The method is now in wide use. There are various<br />

ways to proceed in practice with this ECPP; we give just one here.<br />

The idea once again is to find either “closed-form” curve orders, or at least<br />

be able to specify orders relatively quickly. One could conceivably use closed<br />

forms such as those of Algorithm 7.5.10, but one may well “run out of gas,”<br />

not being able to find an order with the proper structure for Theorem 7.6.1.<br />

The Atkin–Morain approach is to find curves with complex multiplication, as<br />

in Algorithm 7.5.9. In this way, a crucial step (called [Assess curve order], in<br />

Algorithm 7.6.2) is a point of entry into the Atkin–Morain order/curve-finding<br />

Algorithm 7.5.9. A quick perusal will show the great similarity of Algorithm<br />

7.6.3 below and Algorithm 7.6.2. The difference is that here one searches for<br />

appropriate curve orders first, and only then constructs the corresponding<br />

elliptic curve, both using Algorithm 7.5.9, while the Schoof algorithm 7.5.6 is<br />

dispensed with.<br />

Algorithm 7.6.3 (Atkin–Morain primality test). Given a nonsquare integer<br />

n > 2 32 strongly suspected of being prime (in particular gcd(n, 6) = 1 and<br />

presumably n has already passed a probable prime test), this algorithm attempts<br />

to reduce the issue of primality of n to that of a smaller number q. The algorithm<br />

returns either the assertion “n is composite” or the assertion “If q is prime, then<br />

n is prime,” where q is an integer smaller than n. (Note similar structure of<br />

Algorithm 7.6.2.)<br />

1. [Choose discriminant]<br />

Select a fundamental discriminant D by increasing value of h(D) for<br />

which <br />

D<br />

n =1and for which we are successful in finding a solution<br />

u2 + |D|v2 =4n via Algorithm 2.3.13, yielding possible curve orders m:<br />

m ∈{n +1± u, n +1± 2v}, forD = −4,<br />

m ∈{n +1± u, n +1± (u ± 3v)/2}, forD = −3,<br />

m ∈{n +1± u}, forD1 and q is a<br />

probable prime > (n 1/4 +1) 2 (however if this cannot be done according<br />

to some time-limit criterion, goto [Choose discriminant]);<br />

3. [Obtain curve parameters]<br />

Using the parameter-generating option of Algorithm 7.5.9, establish the<br />

parameters a, b for an elliptic curve that would have order m if n is<br />

indeed prime;<br />

4. [Choose point on Ea,b(Zn)]<br />

Choose random x ∈ [0,n− 1] such that Q =(x3 + ax + b) modnhas Q<br />

n = −1;<br />

Apply Algorithm 2.3.8 or 2.3.9 (with a = Q and p = n) to find an integer<br />

y that would satisfy y2 ≡ Q (mod n) if n were prime;<br />

if(y2 mod n = Q) return “n is composite”;<br />

P =(x, y);

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

Saved successfully!

Ooh no, something went wrong!