next up previous contents
Next: Encoding a Phrase in Up: How RSA works Previous: Sending Nikita an Encrypted   Contents

How Nikita Decrypts a Message

When Nikita receives an $ E(m_i)$, she finds $ m_i$ as follows:

$\displaystyle m_i = E^{-1}(E(m_i)) = E(m_i)^d = (m_i^{e})^{d}=m_i.
$

The following proposition proves that the last equality holds.

Proposition 1.1   Let $ n$ be a square-free integer and let $ d,e\in\mathbb{N}$ such that $ p-1\mid de-1$ for each prime $ p\mid n$. Then $ a^{de} \equiv a\pmod{n}$ for all $ a\in\mathbb{Z}$.

Proof. Since $ n\mid a^{de}-a$ if and only if $ p\mid a^{de}-a$ for each prime divisor of $ p$, it suffices to prove that $ a^{de}\equiv a\pmod{p}$ for each prime divisor $ p$ of $ n$. If $ \gcd(a,p)\neq 0$, then $ a\equiv 0\pmod{p}$, so $ a^{de}\equiv a\pmod{p}$. If $ \gcd(a,p)=1$, then Fermat's Little Theorem asserts that $ a^{p-1}\equiv 1\pmod{p}$. Since $ p-1\mid de-1$, we have $ a^{de-1} \equiv 1\pmod{p}$ as well. Multiplying both sides by $ a$ shows that $ a^{de}\equiv a\pmod{p}$. $ \qedsymbol$



William A Stein 2001-10-01