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.

304 Chapter 6 SUBEXPONENTIAL FACTORING ALGORITHMS<br />

Algorithm 6.4.1 (Index-calculus method for F ∗ p). We are given a prime p,<br />

a primitive root g, and a nonzero residue t (mod p). This probabilistic algorithm<br />

attempts to find log g t.<br />

1. [Set smoothness bound]<br />

Choose a smoothness bound B; // See text for reasonable B choices.<br />

Find the primes p1,...,pk in [1,B];<br />

2. [Search for general relations]<br />

Choose random integers r in [1,p−2] until B cases are found with g r mod p<br />

being B-smooth;<br />

// It is slightly better to use the residue of g r mod p closest to 0.<br />

3. [Linear algebra]<br />

By some method of linear algebra, use the relations found to solve for<br />

log g p1,...,log g pk;<br />

4. [Search for a special relation]<br />

Choose random integers R in [1,p− 2] and find the residue closest to 0 of<br />

g R t (mod p) until one is found with this residue being B-smooth;<br />

Use the special relation found together with the values of log g p1,...,log g pk<br />

found in Step [Linear algebra] to find log g t;<br />

This brief description raises several questions:<br />

(1) How does one determine whether a number is B-smooth?<br />

(2) How does one do linear algebra modulo the composite number p − 1?<br />

(3) Are B relations an appropriate number so that there is a reasonable chance<br />

of success in Step [Linear algebra]?<br />

(4) What is a good choice for B?<br />

(5) What is the complexity of this method, and is it really subexponential?<br />

On question (1), there are several options including trial division,<br />

the Pollard rho method (Algorithm 5.2.1), and the elliptic curve method<br />

(Algorithm 7.4.2). Which method one employs affects the overall complexity,<br />

but with any of these methods, the index-calculus method is subexponential.<br />

It is a bit tricky doing matrix algebra over Zn with n composite. In Step<br />

[Linear algebra] we are asked to do this with n = p − 1, which is composite<br />

for all primes p>3. As with solving polynomial congruences, one idea is to<br />

reduce the problem to prime moduli. Matrix algebra over Zq with q prime<br />

is just matrix algebra over a finite field, and the usual Gaussian methods<br />

work, as well as do various faster methods. As with polynomial congruences,<br />

one can also employ Hensel-type methods for matrix algebra modulo prime<br />

powers, and Chinese remainder methods for gluing powers of different primes.<br />

In addition, one does not have to work all that hard at the factorization. If<br />

some large factor of p − 1 is actually composite and difficult to factor further,<br />

one can proceed with the matrix algebra modulo this factor as if it were prime.<br />

If one is called to invert a nonzero residue, usually one will be successful, but<br />

if not, a factorization is found for free. So either one is successful in the matrix

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

Saved successfully!

Ooh no, something went wrong!