07.01.2013 Views

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru

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.

6. The Solovay-Strassen Test<br />

The primality test of Solovay and Strassen [39] is similar <strong>in</strong> flavor to the<br />

Miller-Rab<strong>in</strong> test. Historically, it predates the Miller-Rab<strong>in</strong> test. Like the<br />

Miller-Rab<strong>in</strong> test it is a randomized procedure; it is capable of recogniz<strong>in</strong>g<br />

composite numbers with a probability of at least 1<br />

2 . To expla<strong>in</strong> how the<br />

test works, we must def<strong>in</strong>e quadratic residues and <strong>in</strong>troduce the Legendre<br />

symbol and the Jacobi symbol. For efficient evaluation of these quantities<br />

the Quadratic Reciprocity Law is central.<br />

6.1 Quadratic Residues<br />

For reasons of convention, we <strong>in</strong>troduce special notation for the squares <strong>in</strong><br />

the multiplicative group Z ∗ m.<br />

Def<strong>in</strong>ition 6.1.1. For m ≥ 2 and a ∈ Z with gcd(a, m) =1we say that a<br />

is a quadratic residue modulo m if a ≡ x 2 (mod m) for some x ∈ Z. Ifa<br />

satisfies gcd(a, m) =1and is not a quadratic residue modulo m, itiscalled<br />

a (quadratic) nonresidue.<br />

It is clear that be<strong>in</strong>g a quadratic residue or not is a property of the cong<strong>ru</strong>ence<br />

class of a. Often, but not always, we restrict our attention to the group Z ∗ m<br />

that conta<strong>in</strong>s one representative from each cong<strong>ru</strong>ence class <strong>in</strong> question. In<br />

this context, −1 always stands for the additive <strong>in</strong>verse of 1, i.e., for m − 1.<br />

Note that numbers a with gcd(a, m) > 1 are considered neither quadratic<br />

residues nor nonresidues.<br />

Example 6.1.2. For m = 13, the squares modulo 13 of 1, 2,...,12 are<br />

1, 4, 9, 3, 12, 10, 10, 12, 3, 9, 4, 1, i.e., the quadratic residues are 1, 3, 4, 9, 10, 12.<br />

For m = 26, the quadratic residues are 1, 3, 9, 17, 23, 25; for m = 27, they are<br />

1, 4, 7, 10, 13, 16, 19, 22, 25.<br />

We observe that <strong>in</strong> the case m = 13 there are 6 residues and 6 nonresidues.<br />

This behavior is typical for m = p a prime number. If we square the numbers<br />

1,...,p− 1, we obta<strong>in</strong> at most 1<br />

2 (p − 1) dist<strong>in</strong>ct values, s<strong>in</strong>ce x2 ≡ (p − x) 2<br />

(mod p). On the other hand, the squares of 1,..., 1<br />

2 (p − 1) are all dist<strong>in</strong>ct: if<br />

x2 ≡ y2 (mod p) for1≤x≤ y< 1<br />

2p,thenpdivides y2 − x2 =(x + y)(y − x);<br />

M. <strong>Dietzfelb<strong>in</strong>ger</strong>: <strong>Primality</strong> Test<strong>in</strong>g <strong>in</strong> Polynomial Time, LNCS 3000, pp. 85-94, 2004.<br />

© Spr<strong>in</strong>ger-Verlag Berl<strong>in</strong> Heidelberg 2004

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

Saved successfully!

Ooh no, something went wrong!