[Paper Review] Four primality testing algorithms
This paper presents and analyzes four primality testing algorithms: the probabilistic Miller-Rabin test, the deterministic AKS primality test, the cyclotomic primality test, and the elliptic curve primality test (ECPP). It explains how each algorithm works, emphasizing their efficiency, probabilistic or deterministic nature, and practical applicability, with ECPP and the cyclotomic test being the most widely used in practice for proving primality of large numbers with thousands of digits.
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.
Motivation & Objective
- To provide a comprehensive overview of four major primality testing algorithms with distinct trade-offs between efficiency, determinism, and computational complexity.
- To clarify the theoretical and practical limitations of probabilistic tests like Miller-Rabin, especially under the Generalized Riemann Hypothesis (GRH).
- To explain the significance and implementation challenges of the deterministic AKS algorithm, which was a breakthrough in 2002 but not yet widely implemented at the time of writing.
- To detail the practical utility of the cyclotomic and elliptic curve primality tests, which are used to prove primality of numbers with thousands of digits.
- To bridge theoretical foundations with practical implementation, especially for ECPP and cyclotomic tests, which are not strictly polynomial time but behave well in practice.
Proposed method
- Uses the Miller-Rabin test as a probabilistic compositeness test, where a number is declared composite with high probability if it fails the test for random bases.
- Applies Theorem 1.1 to bound the fraction of false witnesses in the Miller-Rabin test, showing that for composite odd $ n > 9 $, at most $ 1/4 $ of the units modulo $ n $ satisfy the Miller-Rabin condition, enabling high-confidence primality evidence.
- Describes the AKS primality test as a deterministic polynomial-time algorithm based on the identity $ (X - a)^n ot ightarrow X^n - a ext{ in } bZ/nbZ[X] $, which holds if and only if $ n $ is prime.
- Employs the cyclotomic primality test using the arithmetic of cyclotomic fields, relying on the order of $ n $ modulo a cyclotomic polynomial to verify primality, though it is not strictly polynomial time.
- Utilizes the elliptic curve primality test (ECPP) by constructing elliptic curves with complex multiplication over $ bZ/nbZ $, using the Frobenius endomorphism and group order verification to prove primality.
- Applies lattice reduction techniques to test whether a prime ideal is principal in imaginary quadratic fields, enabling construction of suitable $ bZ $-integers $ heta $ with $ N( heta) = n $, which are used to define elliptic curves with known group orders.
Experimental results
Research questions
- RQ1How can a probabilistic test like Miller-Rabin be made deterministic under the Generalized Riemann Hypothesis, and what is the theoretical basis for this transformation?
- RQ2What are the theoretical and practical implications of the AKS primality test, and why was it not yet widely implemented at the time of writing?
- RQ3How does the cyclotomic primality test achieve near-polynomial time complexity, and what are the limitations that prevent it from being truly polynomial?
- RQ4Why does the elliptic curve primality test behave efficiently in practice despite having no proven polynomial-time bound?
- RQ5What role do class numbers and ideal class groups play in the construction of suitable elliptic curves for primality proofs using complex multiplication?
Key findings
- The Miller-Rabin test has a false witness probability of at most $ 1/4 $ per round, and repeating it $ k $ times reduces the error probability to $ (1/4)^k $, making it highly reliable for practical primality testing.
- Under the Generalized Riemann Hypothesis, the Miller-Rabin test becomes a deterministic polynomial-time primality test, as proven by G. Miller, though this remains conditional.
- The AKS primality test is the first deterministic polynomial-time algorithm for primality testing, but its practical inefficiency limited widespread adoption at the time of the paper.
- The cyclotomic primality test is deterministic and runs in almost polynomial time, but its theoretical time complexity is not strictly polynomial due to the need to factor the order of the multiplicative group.
- The elliptic curve primality test (ECPP) is not deterministic and lacks a proven polynomial-time bound, but in practice it runs efficiently and has been used to prove primality of numbers with several thousand digits.
- For ECPP, the construction of elliptic curves relies on finding imaginary quadratic fields with small class number where $ n $ splits and is a product of principal ideals, enabling the use of complex multiplication to compute curves with known group orders.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.