0
$\begingroup$

From what I have learned about RSA encryption, the message M and the modulo n must be coprime because Euler's theorem only holds for coprime numbers? for example, what happens if I choose p = 3, q = 11, n = p*q = 33, ϕ(n) = 20, e = 7, d = 3, and I choose the message M to be 66? when I try to encrypt the message : m^e mod n, i get 66^7 mod 33 which equals 0? Am i doing something wrong here, or does RSA not work when M happens to be a multiple of n?

$\endgroup$
  • 1
    $\begingroup$ Well, $66\bmod 33$ also equals $0$. ;) $\endgroup$ – fkraiem Aug 3 '15 at 0:51
  • 5
    $\begingroup$ $M$ must be less than $n$. $\endgroup$ – mikeazo Aug 3 '15 at 1:38