Step-by-step derivation of the RSA property from Euler’s Theorem, assuming:

  • , where are distinct primes
  • for some integer
  • (i.e. is invertible mod )

We aim to prove:


🔶 Step 1: Euler’s Theorem

For any integer aa such that gcd⁡(a,n)=1\gcd(a, n) = 1,


🔶 Step 2: Use the key equation ed=1+kϕ(n)ed = 1 + k\phi(n)

Suppose Then:


🔶 Step 3: Apply Euler’s Theorem to mϕ(n)m^{\phi(n)}

Since gcd⁡(m,n)=1\gcd(m, n) = 1, Euler’s theorem applies:


🔶 Step 4: Plug back in

Now we substitute:

✅ Therefore:

This proves the RSA encryption/decryption identity, assuming , and that .


🔍 Notes:

  1. Why does matter?
    1. Because Euler’s Theorem only holds when the base is invertible mod nn.
  2. What if mm is not coprime to nn?
    1. Technically, the identity can fail (e.g., if ). For practical deployment of RSA, padding schemes ensure this doesn’t happen.
    2. this is fixed via PKCS standards like PKCS 11 - Wikipedia!
  3. Alternative view via CRT (Chinese Remainder Theorem):
    1. You can also prove this result by reducing mod p and mod q separately and applying Fermat’s Little Theorem.