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.

344 Chapter 7 ELLIPTIC CURVE ARITHMETIC<br />

Algorithm 7.4.4 (Inversionless ECM). Given a composite number n to be<br />

factored, with gcd(n, 6) = 1, this algorithm attempts to uncover a nontrivial<br />

factor of n. This algorithm is inversion-free, needing only large-integer multiplymod<br />

(but see text following).<br />

1. [Choose criteria]<br />

B1 = 10000; // Stage-one limit (must be even).<br />

B2 = 100B1; // Stage-two limit (must be even).<br />

D = 100; // Total memory is about 3D size-n integers.<br />

2. [Choose random curve Eσ]<br />

Choose random σ ∈ [6,n− 1]; // Via Theorem 7.4.3.<br />

u =(σ 2 − 5) mod n;<br />

v =4σ mod n;<br />

C =((v − u) 3 (3u + v)/(4u 3 v) − 2) mod n;<br />

// Note: C determines curve y 2 = x 3 + Cx 2 + x,<br />

// yet, C can be kept in the form num/den.<br />

Q =[u 3 mod n : v 3 mod n]; // Initial point is represented [X : Z].<br />

3. [Perform stage one]<br />

for(1 ≤ i ≤ π(B1)) { // Loop over primes pi.<br />

Find largest integer a such that pa i ≤ B1;<br />

Q =[pa i ]Q; // Via Algorithm 7.2.7, and perhaps use FFT<br />

enhancements (see text following).<br />

}<br />

g =gcd(Z(Q),n); // Point has form Q =[X(Q) :Z(Q)].<br />

if(1

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

Saved successfully!

Ooh no, something went wrong!