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.

4.5 The primality test of Agrawal, Kayal, and Saxena (AKS test) 203<br />

Proof. We may assume that n has a prime factor p> ϕ(r)lgn. Let<br />

G = {g(x) ∈ Zp[x] : g(x) n ≡ g(x n )(modx r − 1)}.<br />

It follows from (4.26) that, for each integer a with 0 ≤ a ≤ ϕ(r)lgn,<br />

the polynomial x + a is in G. SinceGis closed under multiplication, every<br />

monomial expression<br />

<br />

(x + a) ɛa ,<br />

0≤a≤ √ ϕ(r)lgn<br />

where each ɛa is a nonnegative integer, is in G. Note too that since p ><br />

ϕ(r)lgn, these polynomials are all distinct and nonzero in Zp[x], so that G<br />

has many members. We shall make good use of this observation shortly.<br />

We now show that G is a union of residue classes modulo x r − 1. That is,<br />

if g1(x) ∈ G, g2(x) ∈ Zp[x], and g2(x) ≡ g1(x) (modx r − 1), then g2(x) ∈ G.<br />

Indeed, by replacing each x with x n ,wehaveg1(x n ) ≡ g2(x n )(modx nr − 1),<br />

and since x r − 1 divides x nr − 1, this congruence holds modulo x r − 1 as well.<br />

Thus,<br />

g2(x) n ≡ g1(x) n ≡ g1(x n ) ≡ g2(x n )(modx r − 1),<br />

so that g2(x) ∈ G as claimed. Summarizing:<br />

• The set G is closed under multiplication, each monomial x + a is in G for<br />

0 ≤ a ≤ ϕ(r)lgn, andG is a union of residue classes modulo x r − 1.<br />

Let<br />

J = {j ∈ Z : j>0, g(x) j ≡ g(x j )(modx r − 1) for each g(x) ∈ G}.<br />

By the definition of G, wehaven ∈ J, and trivially 1 ∈ J. Wealsohavep ∈ J.<br />

Indeed, for every polynomial g(x) ∈ Zp[x] wehaveg(x) p = g(x p ), so certainly<br />

this relation holds modulo x r − 1 for every g ∈ G. It is easy to see that J<br />

is closed under multiplication. Indeed, let j1,j2 ∈ J and g(x) ∈ G. Wehave<br />

g(x) j1 ∈ G, sinceG is closed under multiplication, and since g(x) j1 ≡ g(x j1 )<br />

(mod x r − 1), it follows by the preceding paragraph that g(x j1 ) ∈ G. So, since<br />

j2 ∈ J,<br />

g(x) j1j2 ≡ g(x j1 ) j2 ≡ g((x j2 ) j1 )=g(x j1j2 )(modx r − 1),<br />

and so j1j2 ∈ J. ThusJ also has many members. Summarizing:<br />

• The set J contains 1,n,p and is closed under multiplication.<br />

Let K be the splitting field for x r − 1 over the finite field Fp. Thus,K<br />

is a finite field of characteristic p and is the smallest one that contains all of<br />

the r-th roots of unity. In particular, let ζ ∈ K be a primitive r-th root of<br />

1, and let h(x) ∈ Fp[x] be the minimum polynomial for ζ, sothath(x) isan<br />

irreducible factor of x r − 1. Thus, K = Fp(ζ) ∼ = Fp[x]/(h(x)). The degree k<br />

of h(x) is the multiplicative order of p in Z ∗ r, but we will not be needing this

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

Saved successfully!

Ooh no, something went wrong!