Congruences - Main Theorem
Fermat's Little Theorem and its generalization, Euler's Theorem, are cornerstones of modern number theory and cryptography. These results describe the behavior of powers in modular arithmetic and form the mathematical foundation of the RSA encryption system.
Let be a prime number, and let be an integer not divisible by . Then:
Equivalently, for any integer :
Fermat's Little Theorem, first stated by Pierre de Fermat in 1640, provides a simple yet powerful relationship between exponentiation and prime moduli. It has numerous applications, from primality testing to cryptographic protocols.
Let and . Then , and:
For :
Using the second form, .
Let be a positive integer, and let be an integer with . Then: where is Euler's totient function.
Euler's Theorem generalizes Fermat's Little Theorem to arbitrary moduli. When is prime, we have , recovering Fermat's result.
Consider . We have .
For (with ):
For :
This explains why the last digit of cycles with period :
Euler's Theorem provides the basis for the RSA cryptosystem. In RSA, we choose distinct primes and , set , and use the fact that: to construct encryption and decryption exponents and satisfying . The security relies on the difficulty of factoring .
Let be a prime number. Then:
Conversely, if for some integer , then is prime.
Wilson's Theorem provides a characterization of prime numbers, though it is not practical for primality testing due to the computational cost of computing large factorials.
For :
For :
For the composite number :
This confirms that is not prime.
These classical theorems illuminate the deep arithmetic structure underlying modular exponentiation and continue to find new applications in modern mathematics and computer science.