I probably have this doubt due to poor understanding of modular arithmetic, so an explanation would be greatly appreciated.
In any standard explanation of RSA, the following is present:
c = m^e mod n
(where, c is the cipher text, m is the message, e the public key exponent, and n is the modulus)
And for decryption:
m = c^d mod n
To prove this, I've seen that the next step normally shown is :
m^(e.d) = m mod n
My question is, when c is raised to the private key exponent, why is the exponent not distributed over both m
and mod n
? I.E why is it not m^(e.d) mod n^(e.d)