Decryption for RSAThe decryption illustrated on the previous page is possible because r and s have a very special relationship. With p = 29, and q = 37, we compute: and then we have chosen r and s so that: Let's see how this explains why ys = x (mod n). We have ys = (xr)s = xr*s (mod n). Now r*s is 1 + some multiple of m: so that: ys = xL(p-1)(q-1)+1 (mod n).
By the same principle (but with q in place of p), we have xM(q-1)+1 = x (mod q) for all x and all M. Thus From the last two boldfaced congruences, we know that xL(p-1)(q-1)+1-x is divisible both by p and by q. These are two distinct primes, so xL(p-1)(q-1)+1-x is divisible by pq=n, i.e.,
|