Book contents
- Frontmatter
- Contents
- Preface
- Introduction
- 1 Divisibility
- 2 Arithmetical functions
- 3 Congruences
- 4 Quadratic residues
- 5 Quadratic forms
- 6 Diophantine approximation
- 7 Quadratic fields
- 8 Diophantine equations
- 9 Factorization and primality testing
- 10 Number fields
- 11 Ideals
- 12 Units and ideal classes
- 13 Analytic number theory
- 14 On the zeros of the zeta-function
- 15 On the distribution of the primes
- 16 The sieve and circle methods
- 17 Elliptic curves
- Bibliography
- Index
9 - Factorization and primality testing
Published online by Cambridge University Press: 05 November 2012
- Frontmatter
- Contents
- Preface
- Introduction
- 1 Divisibility
- 2 Arithmetical functions
- 3 Congruences
- 4 Quadratic residues
- 5 Quadratic forms
- 6 Diophantine approximation
- 7 Quadratic fields
- 8 Diophantine equations
- 9 Factorization and primality testing
- 10 Number fields
- 11 Ideals
- 12 Units and ideal classes
- 13 Analytic number theory
- 14 On the zeros of the zeta-function
- 15 On the distribution of the primes
- 16 The sieve and circle methods
- 17 Elliptic curves
- Bibliography
- Index
Summary
Fermat pseudoprimes
By a primality test we mean a criterion which, if it is not satisfied, guarantees that a natural number n is composite. If the number passes several of these tests – that is, if it satisfies the criterion in each case – then it is likely, though in general not certain, that it is a prime. It turns out that in cryptography it is often enough to know that a number is ‘probably’ a prime and this is where the concept originates. A method which definitely establishes that a number is a prime is called deterministic; otherwise it is called probabilistic. The simplest example of a deterministic method is based on the criterion that n be not divisible by any integer between 2 and √n; if n passes the test for each possible divisor then it is, without doubt, a prime. But verifying in a particular instance is a very time-consuming process.
Suppose now that n is composite and odd. If there exists an integer b, with (b, n) = 1, such that bn−1 ≡ 1 (modn) then n is called a pseudoprime (or Fermat pseudoprime) to the base b. Thus a pseudoprime is a number that has a property analogous to that in Fermat's theorem (see Section 3.3) but is not a prime. For example, since the order of 2 (mod21) is 6, we obtain 820 ≡ 1 (mod21) and so 21 is a pseudoprime to the base 8; but 220 ≡ 4 (mod21), whence 21 is not a pseudoprime to the base 2.
- Type
- Chapter
- Information
- A Comprehensive Course in Number Theory , pp. 90 - 98Publisher: Cambridge University PressPrint publication year: 2012