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.

7.5 Counting points on elliptic curves 351<br />

Set s as the (unique) element of S;<br />

β = ind(A, s); γ = ind(B,s); // Find indices of unique match.<br />

Choose sign in t = β ± γW such that [p +1+t]P == O on E;<br />

return p +1+σt; // Desired order of original curve Ea,b.<br />

4. [Function shanks()]<br />

shanks(P, E) { // P is assumed on given curve E.<br />

A = {x([p +1+β]P ):β ∈ [0,W − 1]}; //Baby steps.<br />

B = {x([γW]P ):γ ∈ [0,W]}; // Giant steps.<br />

return A ∩ B; // Via Algorithm 7.5.1.<br />

}<br />

Note that assignment of point P based on random x canbedoneeitheras<br />

P =(x, y, 1), where y is a square root of the cubic form, or as P =[x :1]in<br />

case Montgomery parameterization—and thus, avoidance of y-coordinates—<br />

is desired. (In this latter parameterization, the algorithm should be modified<br />

slightly, to use notation consistent with Theorem 7.2.6.) Likewise, in the<br />

shanks() function, one may use Algorithm 7.2.7 (or more efficient, detailed<br />

application of the addh(), doubleh() functions) to get the desired point<br />

multiples in [X : Z] form, then construct the A, B lists from numbers XZ −1 .<br />

One can even imagine rendering the entire procedure inversionless, by working<br />

out an analogue of baby-steps, giant-steps for lists of (x, z) pairs, seeking<br />

matches not of the form x = x ′ , rather of the form xz ′ = zx ′ .<br />

The condition p>229 for applicability of the Shanks–Mestre approach<br />

is not artificial: There is a scenario for p = 229 in which the existence of a<br />

singleton set s of matches is not guaranteed (see Exercise 7.18).<br />

7.5.2 Schoof method<br />

Having seen point-counting schemes of complexities ranging from O p1+ɛ to O p1/2+ɛ and O p1/4+ɛ , we next turn to an elegant point-counting<br />

algorithm due to Schoof, which algorithm has polynomial-time complexity<br />

O ln k <br />

p for fixed k. The basic notion of Schoof is to resolve the order #E<br />

(mod l) for sufficiently many small primes l, so as to reconstruct the desired<br />

order using the CRT. Let us first look at the comparatively trivial case of #E<br />

(mod 2). Now, the order of a group is even if and only if there is an element<br />

of order 2. Since a point P = O has 2P = O if and only if the calculated<br />

slope (from Definition 7.1.2) involves a vanishing y-coordinate, we know that<br />

points of order 2 are those of the form P =(x, 0). Therefore, the curve order<br />

is even if and only if the governing cubic x 3 + ax + b has roots in Fp. This,in<br />

turn, can be checked via a polynomial gcd as in Algorithm 2.3.10.<br />

To consider #E (mod l) for small primes l > 2, we introduce a few<br />

more tools for elliptic curves over finite fields. Suppose we have an elliptic<br />

curve E(Fp), but now we consider points on the curve where the coordinates<br />

are in the algebraic closure Fp of Fp. Raising to the p-th power is a field<br />

automorphism of Fp that fixes elements of Fp, so this automorphism, applied

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

Saved successfully!

Ooh no, something went wrong!