Four primality testing algorithms

From MaRDI portal



Abstract: In this expository paper we describe four primality tests. The first test is very efficient, but is only capable of proving that a given number is either composite or 'very probably' prime. The second test is a deterministic polynomial time algorithm to prove that a given numer is either prime or composite. The third and fourth primality tests are at present most widely used in practice. Both tests are capable of proving that a given number is prime or composite, but neither algorithm is deterministic. The third algorithm exploits the arithmetic of cyclotomic fields. Its running time is almost, but not quite polynomial time. The fourth algorithm exploits elliptic curves. Its running time is difficult to estimate, but it behaves well in practice.


In this expository paper the author analyzes the four more representative tests for proving the primality of an odd number \(n\). The first test is the well known Miller-Rabin primality test, usually employed in cryptographic applications. This test is very fast and easy to implementing but has the drawback that it does not prove the primality of \(n\), however if \(n\) fails the test it is certainly composite. On the other hand if \(n\) passes the test we can assure that it is prime with a probability as accurate as wanted (more precisely if \(n\) passes the basic test \(k\) times, with \(k\) random different \textit{bases}, the probability that \(n\) is composite is at most \(1/4^k\). As the paper points out the probabilistic Miller-Rabin test could be turned into an effective deterministic test assuming the Generalized Riemann Hypothesis. However the only deterministic primality test known today with unconditional polynomial complexity is the AKS algorithm made public in 2002 by \textit{M. Agrawal, N. Kayal} and \textit{N. Saxena} [Ann. Math. (2) 160, No. 2, 781--793 (2004; Zbl 1071.11070)]. This test, described in Section 3, has a great theoretical interest but presents implementation problems and in spite of later improvements is far from being a practical test. Then Sections 4 and 5 discuss two tests which are polynomial \textit{in practice} and are widely used for proving the primality of \(n\). The cyclotomic test which uses Gauss and Jacobi sums was proposed in 1981 by \textit{L. M. Adleman, C. Pomerance} and \textit{R. S. Rumely} [Ann. Math. (2) 117, 173--206 (1983; Zbl 0526.10004)] and later improved by Cohen and Lenstra and has an almost polynomial complexity: it runs in time \(O((\log n)^{C\log\log\log n})\) for some constant \(C\). Finally Section 5 describes the elliptic curve primality test. After presenting the test of Pocklington (which uses the group \((\mathbb Z/n\mathbb Z)^*\)) and the generalization to the group of points of an elliptic curve defined over \((\mathbb Z/n\mathbb Z)^*\)\, the paper describes the test of Goldwasser-Kilian which reduces the primality of \(n\) to the primality of a chain of smaller numbers using appropriate elliptic curves. For so doing elliptic curves are selected at random until finding a convenient one (with a good cardinal). A variant due to Atkin [see \textit{A. O. L. Atkin} and \textit{F. Morain} [Math. Comput. 61, No. 203, 29--68 (1993; Zbl 0792.11056)] proposes, using techniques of complex multiplication, to select elliptic curves with preset cardinal. Although it is difficult to analyze the complexity of the elliptic test, assuming a conjecture on the distribution of prime (or near-prime) numbers in the Hasse interval, the test is expected to run in time polynomial in \(\log(n)\). For the entire collection see [Zbl 1154.11002].











This page was built for publication: Four primality testing algorithms

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q3615921)