How is the formula $Y^D\mod N=X$ used for decryption derived?

83 Views Asked by At

This is a passage introducing basic cryptology. It basically says:

  1. Find two large primes, $P$ and $Q$, and let $N=PQ$, $M=(P-1)(Q-1)$.
  2. $E$ is an integer s.t. $E$ and $M$ are coprimes.
  3. $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

1

There are 1 best solutions below

0
On

$\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.$