2
$\begingroup$

I have a question involving how this line of the RSA proof from Wikipedia is simplified. Proof

I know that $m^{p-1} \equiv 1(mod p)$ but how does $m^{p-1}$ simplify to 1 from the image?

$\endgroup$

1 Answer 1

2
$\begingroup$

Modular arithmetic is useful in large part because it respects arithmetic operations like multiplication. As implied here and here on the Wikipedia page for modular arithmetic, if $a\equiv b\pmod p$ then $ac\equiv bc\pmod p$.

In this case, we have $m^{p-1}\equiv1\pmod p$. Therefore, $\left(m^{p-1}\right)^2\equiv 1*m^{p-1}\equiv 1^2\pmod p$. Similarly, $\left(m^{p-1}\right)^3\equiv 1*\left(m^{p-1}\right)^2\equiv 1^3\pmod p$. Assuming $h$ is a nonnegative integer, we can repeat this sort of step until we arrive at $\left(m^{p-1}\right)^h\equiv 1^h\pmod p$. Then we can use the multiplicative property of modular arithmetic one more time to learn that $\left(m^{p-1}\right)^hm\equiv 1^hm\pmod p$.

The general idea is that when doing operations modulo some integer, you can replace numbers with congruent ones in any operations like addition, subtraction, multiplication (and therefore positive integer exponentiation), etc. That's why there was no extra comment in the line you quoted.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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