3.6 Fermat’s Theorem and Euler’s Theorem
Two of the most basic results in number theory are Fermat’s and Euler’s theorems. Originally admired for their theoretical value, they have more recently proved to have important cryptographic applications and will be used repeatedly throughout this book.
Fermat’s Theorem
If is a prime and does not divide then
Proof. Let
Consider the map defined by For example, when and the map takes a number multiplies it by 2, then reduces the result mod 7.
We need to check that if then is actually in that is, Suppose Then Since we can divide this congruence by to obtain
Get Introduction to Cryptography with Coding Theory, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.