04.11.2012 Views

1 Montgomery Modular Multiplication in Hard- ware

1 Montgomery Modular Multiplication in Hard- ware

1 Montgomery Modular Multiplication in Hard- ware

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

FEI KEMT<br />

If the order of P ∈ E(Fq) satisfies certa<strong>in</strong> smoothness conditions described below,<br />

we can discover the factor q of n as follows:<br />

In the first phase of ECM, we calculate Q = kP where k is a product of prime<br />

powers p e ≤ B1 with appropriately chosen smoothness bounds. The second phase of<br />

ECM checks for each prime B1 < p ≤ B2 whether pQ reduces to the neutral element<br />

<strong>in</strong> E(Fq). Algorithm 3 – 1 summarises all necessary steps for both phases of ECM.<br />

Phase 2 can be done efficiently, e.g., us<strong>in</strong>g the Weierstraß form and projective<br />

coord<strong>in</strong>ates pQ = (xpQ : ypQ : zpQ) by test<strong>in</strong>g whether gcd(zpQ, n) is bigger than 1.<br />

Note that we can avoid all gcd computations but one at the expense of one<br />

modular multiplication per gcd by accumulat<strong>in</strong>g the numbers to be checked <strong>in</strong> a<br />

product modulo n and perform<strong>in</strong>g one f<strong>in</strong>al gcd.<br />

Algorithm 3 – 1 Elliptic Curve Method<br />

Require: Composite n<br />

Ensure: Factor d of n<br />

1: Phase 1:<br />

2: Choose arbitrary curve E(Zn) and random po<strong>in</strong>t P ∈ E(Zn) �= O<br />

3: Choose smoothness bounds B1, B2 ∈ N<br />

4: Compute<br />

k ⇐<br />

�<br />

pi∈P,pi≤B1<br />

5: Compute Q = kP ⇐ (xQ, yQ, zQ)<br />

6: Compute d ⇐ gcd(zQ, n)<br />

7: Phase 2:<br />

8: Set Π := 1<br />

9: for each prime p with B1 < p ≤ B2 do<br />

10: Compute pQ ⇐ (xpQ : ypQ : zpQ)<br />

11: Compute Π ⇐ Π · zpQ<br />

12: end for<br />

13: Compute d ⇐ gcd(Π, n)<br />

14: if 1 < d < n then<br />

15: A non-trivial factor d is found<br />

16: return d<br />

17: else<br />

p ep i<br />

i , epi ⇐ max{r ∈ N : pr i ≤ B2}<br />

18: Restart from choos<strong>in</strong>g another elliptic curve <strong>in</strong> phase 1 (Step 2).<br />

19: end if<br />

50

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

Saved successfully!

Ooh no, something went wrong!