11 - Euler's Theorem
11 - Euler's Theorem
number theory, particularly in cryptography (like the RSA algorithm). Euler’s Theorem provides a
relationship between an integer a and a modulus n, where a and n are coprime.
aϕ(n) ≡ 1 mod n
Where ϕ(n) is Euler’s totient function, which counts the number of integers less than or equal to n
that are coprime with n.
Key Points:
The theorem holds only when gcd(a, n) = 1.
ϕ(n) is the totient function of n, which gives the number of integers between 1 and n that are
coprime with n.
ap−1 ≡ 1 mod p
In this case, since ϕ(p) = p − 1 for prime p, Fermat’s Little Theorem is a direct consequence of
Euler's Theorem.
81 ÷ 10 = 8 remainder 1
Using Euler’s Theorem, we know that if gcd(a, 55) = 1, then a40 ≡ 1 mod 55.
Now, this property is used in RSA to encode and decode messages, as it guarantees that
exponentiation by powers related to ϕ(n) brings us back to the original number modulo n.