Quadratic Frobenius test explained

The quadratic Frobenius test (QFT) is a probabilistic primality test to determine whether a number is a probable prime. It is named after Ferdinand Georg Frobenius. The test uses the concepts of quadratic polynomials and the Frobenius automorphism. It should not be confused with the more general Frobenius test using a quadratic polynomial – the QFT restricts the polynomials allowed based on the input, and also has other conditions that must be met. A composite passing this test is a Frobenius pseudoprime, but the converse is not necessarily true.

Concept

Grantham's stated goal when developing the algorithm was to provide a test that primes would always pass and composites would pass with a probability of less than 1/7710.[1]

The test was later extended by Damgård and Frandsen to a test called extended quadratic Frobenius test (EQFT).[2]

Algorithm

Let be a positive integer such that is odd, and let b and c be integers such that

\left(b2+4c
n

\right)=-1

and
\left(-c
n

\right)=1

, where
\left(

\right)

denotes the Jacobi symbol. Set

B=50000

. Then a QFT on with parameters works as follows:

(1) Test whether one of the primes less than or equal to the lower of the two values

B

and

\sqrt{n}

divides . If yes, then stop: is composite.

(2) Test whether

\sqrt{n}\inZ

. If yes, then stop: is composite.

(3) Compute

xn+1\bmod(n,x2-bx-c)

. If

xn+1\notinZ /nZ

, then stop: is composite.

(4) Compute

xn+1\bmod(n,x2-bx-c)

. If

xn+1\not\equiv-c

, then stop: is composite.

(5) Let

n2-1=2rs

with odd. If

xs\not\equiv1\bmod(n,x2-bx-c)

, and
2js
x

\not\equiv-1\bmod(n,x2-bx-c)

for all

0\leqj\leqr-2

, then stop: is composite.

If the QFT does not stop in steps (1)–(5), then is a probable prime.

(The notation

A\equivB\bmod(n,f(x))

means that

A-B=H(x)n+K(x)f(x)

, where H and K are polynomials.)

See also

Notes and References

  1. Grantham . J. . A Probable Prime Test With High Confidence . Journal of Number Theory . 72 . 1 . 32–47 . 1998 . 10.1006/jnth.1998.2247. 10.1.1.56.8827 . 119640473 .
  2. Book: Damgård . Ivan Bjerre . Ivan Damgård . Frandsen . Gudmund Skovbjerg . Fundamentals of Computation Theory . An Extended Quadratic Frobenius Primality Test with Average and Worst Case Error Estimates . Lecture Notes in Computer Science . 2003 . 2751 . 118–131 . Springer Berlin Heidelberg . 978-3-540-45077-1 . 1611-3349 . 10.1007/978-3-540-45077-1_12 .