A probable-prime test with a proven per-input error bound from anchored roots of unity
Abstract
We describe A4, a probabilistic primality test with one-sided error. A prime is never rejected. For every composite the answer "probable prime" has probability at most over the random choices of the test (independent, uniform and unknown to whoever chose ), where is computed from before any random choice and printed with the answer. The test takes roots of unity from the small prime factors of and that trial division finds, verifies with one or two fixed exponentiations that their orders are exact modulo every prime divisor of , and requires random elements of and of a quadratic extension to project into the cyclic groups that these roots generate. From about 1000 bits on (for ), one Frobenius condition settles composites with at most four prime factors, by the estimates of Damgård and Frandsen; for five or more, the logarithms of the verified orders, summed over the rounds, must reach . On 424 random primes of 512 to 8192 bits, drawn after the planner of version 1 was tuned, a decision with the proven bound cost 5.4 to 7.7 Miller-Rabin rounds on average, against 19 to 26 for Seysen's SQFT3 in the same arithmetic and 64 for Miller-Rabin itself; A4 was faster than SQFT3 on 423 of the 424 primes. Baillie-PSW, which has no proven bound, was 2 to 3 times faster than A4, and SQFT3 rejected products of two random primes slightly faster. Inputs whose has few small prime factors gain nothing. The ingredients are published; the contributions are their combination under one exponent proved for each input from the orders verified on both sides of , three refinements, their proofs, and measurements. The counting lemmas and the acceptance sets of the program were checked by exhaustive enumeration on small moduli.
Create a lesson
Metadata
- Categories
- math.NT, math.CO
- Comments
- 19 pages, 2 tables. Code, data, proof notes and ECPP certificates of the test inputs: https://github.com/AlperTheKing/fast-primality (tag paper-v1)
Related papers
Weighted error terms in lower bounds for totally p-adic integers
Shared title terminologymath.NTLukas Pottmeyer
Explicit error bounds for fixed Möbius coefficients in Nyman--Beurling sums
Shared title terminologymath.NTAhmadreza Azimifard
Large-prime residue bounds for reciprocal fractional-part sums
Shared title terminologymath.NTAhmadreza Azimifard
Iterated block sorting and a maximum over primes
Shared title terminologymath.NTIslam Mederov
A bound related to the abc conjecture
Shared title terminologymath.NTHector Pasten
On some Sublattices of the Niemeier Lattice with Root System A_1^{24} and their Theta Functions
Shared title terminologymath.NTTitus Pavlovic