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.

354 Chapter 7 ELLIPTIC CURVE ARITHMETIC<br />

of same. We now describe the latter representation, as it is well suited for<br />

calculations involving division polynomials, especially in regard to the pointmultiplication<br />

property in Theorem 7.5.5. We shall consider a point to be<br />

P =(U/V,F/G), where U, V, F, G are all polynomials, presumably bivariate<br />

in X, Y . There is an alternative strategy, which is to use projective coordinates<br />

as mentioned in Exercise 7.29. In either strategy a simplification occurs, that<br />

in the Schoof algorithm we always obtain any point in a particular form; for<br />

example in the P =(U/V,F/G) parameterization option used in the algorithm<br />

display below, one always has the form<br />

P =(N(X)/D(X),YM(X)/C(X)),<br />

because of the division polynomial algebra. One should think of these four<br />

polynomials, then, as reduced mod Ψn and mod p, in the sense of item (2)<br />

above. Another enhancement we have found efficient in practice is to invoke<br />

large polynomial multiply via our Algorithm 9.6.1 (or see alternatives as in<br />

Exercise 9.70), which is particularly advantageous because deg(Ψn) is so large,<br />

making ordinary polynomial arithmetic painful. Yet more efficiency obtains<br />

when we use our Algorithm 9.6.4 to achieve polynomial mod for these largedegree<br />

polynomials.<br />

Algorithm 7.5.6 (Explicit Schoof algorithm for curve order). Let p > 3<br />

be a prime. For curve Ea,b(Fp) this algorithm returns the value of t (mod l),<br />

where l is a prime (much smaller than p) and the curve order is #E = p +1− t.<br />

Exact curve order is thus obtained by effecting this algorithm for enough primes<br />

l such that l > 4 √ p, and then using the Chinese remainder theorem to<br />

recover the exact value of t. We assume that for a contemplated ceiling L ≥ l<br />

on the possible l values used, we have precomputed the division polynomials<br />

Ψ−1,...,ΨL+1 mod p, which can be made monic (via cancellation of the high<br />

coefficient modulo p) with a view to such as Algorithm 9.6.4.<br />

1. [Check l =2]<br />

if(l == 2) {<br />

g(X) =gcd(X p − X, X 3 + aX + b); // Polynomial gcd in Fp[X].<br />

if(g(X) ==1) return 0; // T ≡ 0(mod2), so order #E is even.<br />

return 1; // #E is odd.<br />

}<br />

2. [Analyze relation (7.10)]<br />

p = p mod l;<br />

u(X) =Xp mod (Ψl,p);<br />

v(X) =(X3 + aX + b) (p−1)/2 mod (Ψl,p);<br />

// That is, v(X) =Y p−1 mod (Ψl,p).<br />

P0 =(u(X),Yv(X)); // P0 =(Xp ,Yp ).<br />

P1 =(u(X) p mod (Ψl,p),Yv(X) p+1 mod (Ψl,p));<br />

// P1 =(Xp2,Yp2 ).<br />

Cast P2 =[p](X, Y ) in rational form (N(X)/D(X),YM(X)/C(X)), for<br />

example by using Theorem 7.5.5;

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

Saved successfully!

Ooh no, something went wrong!