-3

I understand the theoretical part of RSA (the concept of public and private keys), but I don't understand the mathematical part. Can anyone please explain it to me in simple terms? Thanks.

1 Answers1

0

Assuming you've understood the "theoretical part", I try to explain the mathematical one.

Plaintext and ciphertext are integers between 0 and n-1 for some n.
Encryption and decryption are of the following form, for some plaintext M and ciphertext C:

C = $M^e$ (mod n)
M = $C^d$ (mod n) = ($M^e)^d$ (mod n) = $M^{ed}$ (mod n)

Each communicating entity has one public/private key pair PU={e,n} e PR={d,n}, where e and d are each the multiplicative inverse (mod $\Phi$(n)) of the other.

e and d are inverses (mod $\Phi$(n)), or ed $\equiv$ 1 (mod $\Phi$(n)), or equivalently ed = 1 + k$\Phi$(n).

Therefore, to decrypt a ciphertext C = $M^{ed}$ (mod n), we only need to calculate $C^d$ (mod n) because $C^d$ (mod n) = $M^{ed}$ (mod n) = $M^{1 + k\Phi(n)}$ (mod n) = $M^1$ x ($M^{\Phi(n)})^k$ (mod $\Phi$(n)) = $M^1$ x $1^k$ (mod n) = M.

Note that the function $\Phi$(n) is the Euler's totient function and that $M^{\Phi(n)}$ (mod n) = 1 is true for the Euler's theorem.

I know my English isn't the best but, I hope I was helpful.

ssh3ll
  • 128
  • 8