Skip to main content
4 of 4
replaced http://crypto.stackexchange.com/ with https://crypto.stackexchange.com/

Modular exponentiation with Chinese Remainder Theorem

I'm learning modular exponentiation with Chinese remainder theorem.

I found a great answer from below How can I use eulers totient and the chinese remainder theorem for modular exponentiation?

But I can't understand the last step of construction from $C_p$ and $C_q$ very well. Can someone explain it to me? Moreover, if I make $N = 55 = 11 \times 5$ instead of $5 \times 11$, that last step fails to give correct answer.

The last step: $$M^e \bmod{pq}= C_q+q((C_p−C_q) \bmod p)$$