How we can solve this equation and get the value of M?

$$8 = M^{13} \mod 33$$

not a computer program, but a mathematical operation.

  • $\begingroup$ Welcome to crypto! Your question was migrated here as it is more on topic here than on SO. Plus we have TeX! If you want to register your question will be associated with your account and you can receive notifications about it and reputation from it as normal, and be able to comment on it. $\endgroup$
    – user46
    Commented Dec 13, 2011 at 14:42

2 Answers 2


Factor the modulus, $n$ which was given as 33, to yield $p = 3$ and $q = 11$.

The totient, $\phi$ is $(p - 1)(q - 1) = 20$.

The public exponent, $e$ is given as $13$.

Now compute the private exponent $d$ as the multiplicative inverse of $e \mod \phi$, so $e^{-1}\mod \phi \equiv 17$.

The cipher text, $c$ is given as 8.

Finally compute the message, $M$ as $c^d \mod n \equiv 2$.

No algorithm has been published for factoring large numbers quickly, so the first step is what makes breaking RSA "computationally infeasible." Fast algorithms are known for all of the other operations.


Since we're working modulo 33, we only need to look at values of M between 0 and 32. (Since $a^k \mod b \equiv (a \mod b)^k \mod b)$.

If we examine these 33 values, we get that it holds for M = 2.

However, this in fact holds for any $M = 2 + 33k$, where k is an integer, as per the argument outlined in the beginning.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.