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.

4.3 The finite field primality test 191<br />

Attempt to find c ∗ ≡ c −1 (mod n) by Algorithm 2.1.4, but if this attempt<br />

produces a nontrivial factorization of n, then return this factorization;<br />

f = c ∗ f; // Multiplication is modulo n; the polynomial f is now monic.<br />

r = g mod f; // Divide with remainder is possible since f is monic.<br />

(f,g) =(r, f);<br />

goto [Zero polynomial check];<br />

The next theorem is the basis of the finite field primality test.<br />

Theorem 4.3.3 (Lenstra). Suppose that n, I, F are positive integers with<br />

n>1 and F |n I − 1. Suppose f,g ∈ Zn[x] are such that<br />

(1) g nI −1 − 1 is a multiple of f in Zn[x],<br />

(2) g (nI −1)/q − 1 and f are coprime in Zn[x] for all primes q|F ,<br />

(3) each of the I elementary symmetric polynomials in g, gn ,...,gnI−1 congruent (mod f) to an element of Zn.<br />

is<br />

Then for each prime factor p of n there is some integer j ∈ [0,I − 1] with<br />

p ≡ n j (mod F ).<br />

We remark that if we show that the hypotheses of Theorem 4.3.3 hold and if<br />

we also show that n has no proper divisors in the residue classes n j (mod F )<br />

for j =0, 1,...,I− 1, then we have proved that n is prime. This idea will be<br />

developed shortly.<br />

Proof. Let p be a prime factor of n. Thinking of f now in Zp[x], let f1 ∈ Zp[x]<br />

be an irreducible factor, so that Zp[x]/(f1) =K is a finite field extension of<br />

Zp.Let¯g be the image of g in K. The hypotheses (1), (2) imply that ¯g nI −1 =1<br />

and ¯g (nI −1)/q = 1 for all primes q|F . So the order of ¯g in K ∗ (the multiplicative<br />

group of the finite field K) is a multiple of F . Hypothesis (3) implies that the<br />

polynomial h(T )=(T−¯g)(T − ¯g n ) ···(T − ¯g nI−1)<br />

∈ K[T ] is actually in Zp[T ].<br />

Now, for any polynomial in Zp[T ], if α is a root, so is α p .Thush(¯g p )=0.<br />

But we have the factorization of h(T ), and we see that the only roots are<br />

¯g, ¯g n ,...,¯g nI−1,<br />

so that we must have ¯g p ≡ ¯g nj for some j =0, 1,...,I − 1.<br />

Since the order of ¯g is a multiple of F ,wehavep≡nj (mod F ). ✷<br />

A number of questions naturally present themselves: If n is prime, will f,g<br />

as described in Theorem 4.3.3 exist? If f,g exist, is it easy to find examples?<br />

Can (1), (2), (3) in Theorem 4.3.3 be verified quickly?<br />

Thefirstquestioniseasy.Ifn is prime, then any polynomial f ∈ Zn[x]<br />

that is irreducible with deg f = I, and any polynomial g ∈ Zn[x] thatisnot<br />

a multiple of f will together satisfy (1) and (3). Indeed, if f is irreducible of<br />

degree I, thenK = Zn[x]/(f) will be a finite field of order nI , and so (1)<br />

just expresses the Lagrange theorem (a group element raised to the order of<br />

the group is the group identity) for the multiplicative group K∗ . To see (3)<br />

note that the Galois group of K is generated by the Frobenius automorphism:<br />

raising to the n-th power. That is, the Galois group consists of the I functions<br />

from K to K, where the j-th function takes α ∈ K and sends it to αnj for

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

Saved successfully!

Ooh no, something went wrong!