Frobenius pseudoprime

Last updated

In number theory, a Frobenius pseudoprime is a pseudoprime, whose definition was inspired by the quadratic Frobenius test described by Jon Grantham in a 1998 preprint and published in 2000. [1] [2] Frobenius pseudoprimes can be defined with respect to polynomials of degree at least 2, but they have been most extensively studied in the case of quadratic polynomials. [3] [4]

Contents

Frobenius pseudoprimes w.r.t. quadratic polynomials

The definition of Frobenius pseudoprimes with respect to a monic quadratic polynomial , where the discriminant is not a square, can be expressed in terms of Lucas sequences and as follows.

A composite number n is a Frobenius pseudoprime if and only if

and

where is the Jacobi symbol.

When condition (2) is satisfied, condition (3) becomes equivalent to

Therefore, a Frobenius pseudoprime n can be equivalently defined by conditions (1-2) and (3), or by conditions (1-2) and (3′).

Since conditions (2) and (3) hold for all primes which satisfy the simple condition (1), they can be used as a probable primality test. (If condition (1) fails, then either the greatest common divisor is less than n, in which case it is a non-trivial factor and n is composite, or the GCD equals n, in which case one should try different parameters P and Q which are not multiples of n.)

Relations to other pseudoprimes

Every Frobenius pseudoprime is also

The converse of none of these statements is true, making the Frobenius pseudoprimes a proper subset of each of the sets of Lucas pseudoprimes and Dickson pseudoprimes with parameters , and Fermat pseudoprimes to base when . Furthermore, it follows that for the same parameters , a composite number is a Frobenius pseudoprime if and only if it is both a Lucas and Dickson pseudoprime. In other words, for every fixed pair of parameters , the set of Frobenius pseudoprimes equals the intersection of the sets of Lucas and Dickson pseudoprimes.

While each Frobenius pseudoprime is a Lucas pseudoprime, it is not necessarily a strong Lucas pseudoprime. For example, 6721 is the first Frobenius pseudoprime for , which is not a strong Lucas pseudoprime.

Every Frobenius pseudoprime to is also a restricted Perrin pseudoprime. Analogous statements hold for other cubic polynomials of the form . [2]

Examples

Frobenius pseudoprimes with respect to the Fibonacci polynomial are determined in terms of the Fibonacci numbers and Lucas numbers . Such Frobenius pseudoprimes form the sequence:

4181, 5777, 6721, 10877, 13201, 15251, 34561, 51841, 64079, 64681, 67861, 68251, 75077, 90061, 96049, 97921, 100127, 113573, 118441, 146611, 161027, 162133, 163081, 186961, 197209, 219781, 231703, 252601, 254321, 257761, 268801, 272611, 283361, 302101, 303101, 330929, 399001, 430127, 433621, 438751, 489601, ... (sequence A212424 in the OEIS ).

While 323 is the first Lucas pseudoprime with respect to the Fibonacci polynomial , the first Frobenius pseudoprime with respect to the same polynomial is 4181 (Grantham stated it as 5777 [2] but multiple authors have noted this is incorrect and is instead the first pseudoprime with for this polynomial [3] ).

Another case, Frobenius pseudoprimes with respect to the quadratic polynomial can be determined using the Lucas sequence and are:

119, 649, 1189, 4187, 12871, 14041, 16109, 23479, 24769, 28421, 31631, 34997, 38503, 41441, 48577, 50545, 56279, 58081, 59081, 61447, 75077, 91187, 95761, 96139, 116821, 127937, 146329, 148943, 150281, 157693, 170039, 180517, 188501, 207761, 208349, 244649, 281017, 311579, 316409, 349441, 350173, 363091, 371399, 397927, 423721, 440833, 459191, 473801, 479119, 493697, ... (sequence A327655 in the OEIS )

In this case, the first Frobenius pseudoprime with respect to the quadratic polynomial is 119, which is also the first Lucas pseudoprime with respect to the same polynomial. Besides, .

The quadratic polynomial , i.e. , has sparser pseudoprimes as compared to many other simple quadratics. Using the same process as above, we get the sequence:

13333, 44801, 486157, 1615681, 3125281, 4219129, 9006401, 12589081, 13404751, 15576571, 16719781, ….

Notice there are only 3 such pseudoprimes below 500,000, while there are many Frobenius (1, −1) and (3, −1) pseudoprimes below 500,000.

Every entry in this sequence is a Fermat pseudoprime to base 5 as well as a Lucas (3, −5) pseudoprime, but the converse is not true: 642,001 is both a psp-5 and a Lucas (3,-5) pseudoprime, but is not a Frobenius (3, −5) pseudoprime. (Note that Lucas pseudoprime for a (P, Q) pair need not to be a Fermat pseudoprime for base |Q|, e.g. 14209 is a Lucas (1, −3) pseudoprime, but not a Fermat pseudoprime for base 3.)

Strong Frobenius pseudoprimes

Strong Frobenius pseudoprimes are also defined. [2] Details on implementation for quadratic polynomials can be found in Crandall and Pomerance. [3]

By imposing the restrictions that and , the authors of [6] show how to choose and such that there are only five odd, composite numbers less than for which (3) holds, that is, for which .

Pseudoprimality tests

The conditions defining Frobenius pseudoprime can be used for testing a given number n for probable primality. Often such tests do not rely on fixed parameters , but rather select them in a certain way depending on the input number n in order to decrease the proportion of false positives, i.e., composite numbers that pass the test. Sometimes such composite numbers are commonly called Frobenius pseudoprimes, although they may correspond to different parameters.

Using parameter selection ideas first laid out in Baillie and Wagstaff (1980) [7] as part of the Baillie–PSW primality test and used by Grantham in his quadratic Frobenius test, [8] one can create even better quadratic tests. In particular, it was shown that choosing parameters from quadratic non-residues modulo n (based on the Jacobi symbol) makes far stronger tests, and is one reason for the success of the Baillie–PSW primality test. For instance, for the parameters (P,2), where P is the first odd integer that satisfies , there are no pseudoprimes below 264.

Yet another test is proposed by Khashin. [9] For a given non-square number n, it first computes a parameter c as the smallest odd prime having Jacobi symbol , and then verifies the congruence:

.

While all prime n pass this test, a composite n passes it if and only if n is a Frobenius pseudoprime for . Similar to the above example, Khashin notes that no pseudoprime has been found for his test. He further shows that any that exist under 260 must have a factor less than 19 or have c > 128.

Properties

The computational cost of the Frobenius pseudoprimality test with respect to quadratic polynomials is roughly three times the cost of a strong pseudoprimality test (i.e. a single round of the Miller–Rabin primality test), 1.5 times that of a Lucas pseudoprimality test, and slightly more than a Baillie–PSW primality test.

Note that the quadratic Frobenius test is stronger than the Lucas test. For example, 1763 is a Lucas pseudoprime to (P, Q) = (3, –1) since U1764(3,–1) ≡ 0 (mod 1763) (U(3,–1) is given in OEIS:  A006190 ), and it also passes the Jacobi step since , but it fails the Frobenius test to x2 – 3x – 1. This property can be clearly seen when the algorithm is formulated as shown in Crandall and Pomerance Algorithm 3.6.9 [3] or as shown by Loebenberger, [4] as the algorithm does a Lucas test followed by an additional check for the Frobenius condition.

While the quadratic Frobenius test does not have formal error bounds beyond that of the Lucas test, it can be used as the basis for methods with much smaller error bounds. Note that these have more steps, additional requirements, and non-negligible additional computation beyond what is described on this page. It is important to note that the error bounds for these methods do not apply to the standard or strong Frobenius tests with fixed values of (P,Q) described on this page.

Based on this idea of pseudoprimes, algorithms with strong worst-case error bounds can be built. The quadratic Frobenius test, [8] using a quadratic Frobenius test plus other conditions, has a bound of . Müller in 2001 proposed the MQFT test with bounds of essentially . [10] Damgård and Frandsen in 2003 proposed the EQFT with a bound of essentially . [11] Seysen in 2005 proposed the SQFT test with a bound of and a SQFT3 test with a bound of . [12]

Given the same computational effort, these offer better worst-case bounds than the commonly used Miller–Rabin primality test.

See also

Related Research Articles

<span class="mw-page-title-main">Carmichael number</span> Composite number in number theory

In number theory, a Carmichael number is a composite number , which in modular arithmetic satisfies the congruence relation:

In number theory, the Legendre symbol is a multiplicative function with values 1, −1, 0 that is a quadratic character modulo of an odd prime number p: its value at a (nonzero) quadratic residue mod p is 1 and at a non-quadratic residue (non-residue) is −1. Its value at zero is 0.

In number theory, the Fermat pseudoprimes make up the most important class of pseudoprimes that come from Fermat's little theorem.

In number theory, Fermat's little theorem states that if p is a prime number, then for any integer a, the number apa is an integer multiple of p. In the notation of modular arithmetic, this is expressed as

The Jacobi symbol is a generalization of the Legendre symbol. Introduced by Jacobi in 1837, it is of theoretical interest in modular arithmetic and other branches of number theory, but its main use is in computational number theory, especially primality testing and integer factorization; these in turn are important in cryptography.

In number theory, Euler's criterion is a formula for determining whether an integer is a quadratic residue modulo a prime. Precisely,

The Fermat primality test is a probabilistic test to determine whether a number is a probable prime.

In number theory, a probable prime (PRP) is an integer that satisfies a specific condition that is satisfied by all prime numbers, but which is not satisfied by most composite numbers. Different types of probable primes have different specific conditions. While there may be probable primes that are composite (called pseudoprimes), the condition is generally chosen in order to make such exceptions rare.

A primality test is an algorithm for determining whether an input number is prime. Among other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating whether the input number is prime or not. Factorization is thought to be a computationally difficult problem, whereas primality testing is comparatively easy. Some primality tests prove that a number is prime, while others like Miller–Rabin prove that a number is composite. Therefore, the latter might more accurately be called compositeness tests instead of primality tests.

The Miller–Rabin primality test or Rabin–Miller primality test is a probabilistic primality test: an algorithm which determines whether a given number is likely to be prime, similar to the Fermat primality test and the Solovay–Strassen primality test.

In arithmetic, an odd composite integer n is called an Euler pseudoprime to base a, if a and n are coprime, and

In number theory, a Wieferich prime is a prime number p such that p2 divides 2p − 1 − 1, therefore connecting these primes with Fermat's little theorem, which states that every odd prime p divides 2p − 1 − 1. Wieferich primes were first described by Arthur Wieferich in 1909 in works pertaining to Fermat's Last Theorem, at which time both of Fermat's theorems were already well known to mathematicians.

In mathematics, the Lucas–Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Édouard Lucas in 1878 and subsequently proved by Derrick Henry Lehmer in 1930.

In computational number theory, the Lucas test is a primality test for a natural number n; it requires that the prime factors of n − 1 be already known. It is the basis of the Pratt certificate that gives a concise verification that n is prime.

The Solovay–Strassen primality test, developed by Robert M. Solovay and Volker Strassen in 1977, is a probabilistic test to determine if a number is composite or probably prime. The idea behind the test was discovered by M. M. Artjuhov in 1967 (see Theorem E in the paper). This test has been largely superseded by the Baillie–PSW primality test and the Miller–Rabin primality test, but has great historical importance in showing the practical feasibility of the RSA cryptosystem. The Solovay–Strassen test is essentially an Euler–Jacobi probable prime test.

Lucas pseudoprimes and Fibonacci pseudoprimes are composite integers that pass certain tests which all primes and very few composite numbers pass: in this case, criteria relative to some Lucas sequence.

A strong pseudoprime is a composite number that passes the Miller–Rabin primality test. All prime numbers pass this test, but a small fraction of composites also pass, making them "pseudoprimes".

In mathematics, Pépin's test is a primality test, which can be used to determine whether a Fermat number is prime. It is a variant of Proth's test. The test is named for a French mathematician, Théophile Pépin.

The Baillie–PSW primality test is a probabilistic or possibly deterministic primality testing algorithm that determines whether a number is composite or is a probable prime. It is named after Robert Baillie, Carl Pomerance, John Selfridge, and Samuel Wagstaff.

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.

References

  1. Grantham, Jon (1998). Frobenius pseudoprimes (Report). preprint.
  2. 1 2 3 4 5 Grantham, Jon (2001). "Frobenius pseudoprimes". Mathematics of Computation. 70 (234): 873–891. arXiv: 1903.06820 . Bibcode:2001MaCom..70..873G. doi: 10.1090/S0025-5718-00-01197-2 .
  3. 1 2 3 4 5 Crandall, Richard; Pomerance, Carl (2005). Prime numbers: A computational perspective (2nd ed.). Springer-Verlag. ISBN   978-0-387-25282-7.
  4. 1 2 Loebenberger, Daniel (2008). "A Simple Derivation for the Frobenius Pseudoprime Test" (PDF). IACR Cryptology ePrint Archive. 2008.
  5. 1 2 Rotkiewicz, Andrzej (2003). "Lucas and Frobenius pseudoprimes" (PDF). Annales Mathematicae Silesianae. Wydawnictwo Uniwersytetu Śląskiego. 17: 17–39.
  6. Robert Baillie; Andrew Fiori; Samuel S. Wagstaff, Jr. (July 2021). "Strengthening the Baillie-PSW Primality Test". Mathematics of Computation. 90 (330): 1931–1955. arXiv: 2006.14425 . doi:10.1090/mcom/3616. ISSN   0025-5718. S2CID   220055722.
  7. Baillie, Robert; Wagstaff, Samuel S. Jr. (October 1980). "Lucas Pseudoprimes" (PDF). Mathematics of Computation. 35 (152): 1391–1417. doi: 10.1090/S0025-5718-1980-0583518-6 . MR   0583518.
  8. 1 2 Grantham, Jon (1998). "A Probable Prime Test With High Confidence". Journal of Number Theory. 72 (1): 32–47. arXiv: 1903.06823 . CiteSeerX   10.1.1.56.8827 . doi:10.1006/jnth.1998.2247. S2CID   119640473.
  9. Khashin, Sergey (July 2013). "Counterexamples for Frobenius primality test". arXiv: 1307.7920 [math.NT].
  10. Müller, Siguna (2001). "A Probable Prime Test with Very High Confidence for N Equiv 1 Mod 4". Proceedings of the 7th International Conference on the Theory and Application of Cryptology and Information Security: Advances in Cryptology. ASIACRYPT. pp. 87–106. doi: 10.1007/3-540-45682-1_6 . ISBN   3-540-42987-5.
  11. Damgård, Ivan Bjerre; Frandsen, Gudmund Skovbjerg (October 2006). "An Extended Quadratic Frobenius Primality Test with Average- and Worst-Case Error Estimate" (PDF). Journal of Cryptology. 19 (4): 489–520. doi:10.1007/s00145-006-0332-x. S2CID   34417193.
  12. Seysen, Martin. A Simplified Quadratic Frobenius Primality Test, 2005.