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.

214 Chapter 4 PRIMALITY PROVING<br />

for all nonnegative integers i, j. Thusforsuchi, j,<br />

(x − 1) pi (n/p) j<br />

≡ A j(1−k)+ik x − 1(modx r − b, p), (4.34)<br />

sincebothsideshavethesamep j -th power (mod x r − b, p), and raising to<br />

the p j -th power is one-to-one in Zp[x]/(x r − b). This last assertion follows<br />

because raising to the p-th power is one-to-one in any Zp[x]/(f(x)) where<br />

f(x) does not have any repeated irreducible factors modulo p, noting that<br />

since gcd(x r − b, rx r−1 )=1inZp[x], the polynomial x r − b indeed does not<br />

have any repeated factors.<br />

Note that x − 1 is a unit in Zp[x]/(x r − b). Indeed, in Zp[x], we have<br />

gcd(x − 1,x r − b) =gcd(x − 1, 1 − b) = 1, provided that p does not divide<br />

b − 1. But since A = b (n−1)/r modulo p has order r>lg 2 n ≥ 1, we do indeed<br />

have p not dividing b − 1. Let E denote the multiplicative order of x − 1in<br />

Zp[x]/(x r − b). Note that<br />

E ≥ 2 r − 1,<br />

since the polynomials <br />

(A j x − 1),<br />

j∈S<br />

where S runs over the proper subsets of {0, 1,...,r− 1}, are not only distinct<br />

in Zp[x]/(x r − b), but each is a power of x − 1, by (4.32).<br />

Consider integers i, j with 0 ≤ i, j ≤ √ r.Itmustbethattherearetwo<br />

distinct pairs (i1,j1), (i2,j2) with<br />

j1(1 − k)+i1k ≡ j2(1 − k)+i2k (mod r),<br />

so that if u1 = p i1 (n/p) j1 ,u2 = p i2 (n/p) j2 ,then<br />

(x − 1) u1 ≡ A j1(1−k)+i1k x − 1 ≡ A j2(1−k)+i2k x − 1 ≡ (x − 1) u2 (mod x r − b, p).<br />

Hence<br />

u1 ≡ u2 (mod E).<br />

But u1,u2 ∈ [1,n √ r ]andE>2 r − 1 >n √ r − 1, the last inequality holding<br />

by our hypothesis that r>lg 2 n.Thus,u1 = u2, and as we saw in the proof<br />

of Theorem 4.5.2, this immediately leads to n beingapowerofp. ✷<br />

This theorem may be essentially found in [Bernstein 2003] and (independently)<br />

[Mihăilescu and Avanzi 2003]. It was originally proved in the case of<br />

r a power of 2 by Berrizbeitia and in the case of r aprimeorprimepowerby<br />

Cheng.<br />

Note that using fast polynomial and integer arithmetic, the congruence<br />

(4.30) can be checked in Õ(r ln2 n) bit operations, the notation Õ having been<br />

introduced in Section 4.5.2. So if r can be chosen such that r = O(ln 2 n), we<br />

thus would have the basis for a primality test of complexity Õ(ln4 n). There<br />

are two problems with this. First, not every prime n has a divisor r of n − 1<br />

with lg 2 n

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

Saved successfully!

Ooh no, something went wrong!