This is a passage introducing basic cryptology. It basically says:
- Find two large primes, $P$ and $Q$, and let $N=PQ$, $M=(P-1)(Q-1)$.
- $E$ is an integer s.t. $E$ and $M$ are coprimes.
- $D$ is an integer s.t. $ED\mod M=1$.
For a code X, let $X^E\mod N:=Y$. Then, by Fermat’s little theorem, if we know $D$, then $Y^D\mod N=X$ (17.4). I wonder how (17.4) is derived in detail.enter image description here
$\phi(N)=\phi(PQ)=\phi(P)\phi(Q)=(P-1)(Q-1)=M$.
Therefore, by Euler's theorem, $X^M\equiv1\bmod N$, assuming $X$ and $N$ are coprime.
Now if $ED\equiv1\bmod M$, then $ED=kM+1$, so $X^{ED}\equiv X^{kM+1}\equiv(X^M)^k X\equiv X\bmod N.$