A pseudoprime is a probable prime (an integer that shares a property common to all prime numbers) that is not actually prime. Pseudoprimes are classified according to which property of primes they satisfy.
Some sources use the term pseudoprime to describe all probable primes, both composite numbers and actual primes.
Pseudoprimes are of primary importance in public-key cryptography, which makes use of the difficulty of factoring large numbers into their prime factors. Carl Pomerance estimated in 1988 that it would cost $10 million to factor a number with 144 digits, and $100 billion to factor a 200-digit number (the cost today is dramatically lower but still prohibitively high).[1] [2] But finding two large prime numbers as needed for this use is also expensive, so various probabilistic primality tests are used, some of which in rare cases inappropriately deliver composite numbers instead of primes. On the other hand, deterministic primality tests, such as the AKS primality test, do not give false positives; because of this, there are no pseudoprimes with respect to them.
See main article: Fermat pseudoprime.
Fermat's little theorem states that if is prime and is coprime to, then is divisible by . For an integer, if a composite integer divides, then is called a Fermat pseudoprime to base . It follows that if is a Fermat pseudoprime to base, then is coprime to . Some sources use variations of this definition, for example to allow only odd numbers to be pseudoprimes.
An integer that is a Fermat pseudoprime to all values of that are coprime to is called a Carmichael number.