Number Theory / Deeper structure
Primality Testing
How computers certify 600-digit primes in milliseconds without ever factoring anything.
Contents 2 sections
By the end you can
- Explain the Fermat test and its weakness
- Describe the Miller–Rabin test
- Distinguish testing primality from factoring
Helps to know: Fermat, Euler and the Chinese Remainder Theorem
§1Testing with Fermat
If for some , then is certainly composite, and we learn this without finding a factor. The trouble is Carmichael numbers such as , which pass for every coprime to them.
Check yourself
- Q1If , then is…