The RSA round trip rests on one modular inverse identity. The key table makes that identity visible before the lesson names the theorem.

highlighted = computed this step

Why the exponents undo each other

The key table already proved that e times d is one modulo phi. That congruence is the arithmetic reason decryption reverses encryption.

edmodϕ=1ed\bmod\phi=1
Why RSA decryption worksRSA key derivation recomputed from the toy primes and public exponent.Why RSA decryption works - n=55quantityvaluep5q11n=p*q55phi=(p-1)(q-1)40e3d=e^-1 mod phi27e*d mod phi1

Pin the inverse identity

Here e times d is 81, which is 2 times phi plus 1.

327=81=2ϕ+13\cdot27=81=2\phi+1
Why RSA decryption worksRSA key derivation recomputed from the toy primes and public exponent.Why RSA decryption works - n=55quantityvaluep5q11n=p*q55phi=(p-1)(q-1)40e3d=e^-1 mod phi27e*d mod phi1

Why that reverses encryption

Euler's theorem says raising by one plus a whole multiple of phi lands back on the same residue for invertible messages. Euler's theorem covers messages coprime to n. RSA in fact recovers every message below n - even 5, 11, or 0, which share a factor with 55 - but the argument for those uses the Chinese Remainder Theorem, beyond this toy.

(me)d=mone+kϕm(modn)(m^e)^d=m^{\text{one}+k\phi}\equiv m\pmod n
Why RSA decryption worksRSA key derivation recomputed from the toy primes and public exponent.Why RSA decryption works - n=55quantityvaluep5q11n=p*q55phi=(p-1)(q-1)40e3d=e^-1 mod phi27e*d mod phi1

What this toy example leaves out

These toy values are intentionally checkable, not secure. Real RSA also needs padding such as OAEP before the arithmetic is used safely.

toy arithmetic, not deployed security\text{toy arithmetic, not deployed security}
Why RSA decryption worksRSA key derivation recomputed from the toy primes and public exponent.Why RSA decryption works - n=55quantityvaluep5q11n=p*q55phi=(p-1)(q-1)40e3d=e^-1 mod phi27e*d mod phi1

Summary

Because e times d is congruent to 1 modulo phi, decryption inverts encryption in this toy setting. Exact arithmetic on deliberately tiny toy keys; real RSA uses 2048+ bit primes with padding, and timing/side-channels are not modeled here.

ed1(modϕ)ed\equiv1\pmod{\phi}
Why RSA decryption worksRSA key derivation recomputed from the toy primes and public exponent.Why RSA decryption works - n=55quantityvaluep5q11n=p*q55phi=(p-1)(q-1)40e3d=e^-1 mod phi27e*d mod phi1