Suppose that $p$ and $q$ are distinct primes and that $m$ is an integer satisfying $\gcd(m, pq) = 1$. Suppose that $T$ is the smallest positive integer satisfying $m^{T}\equiv \pmod {pq}$. Prove that $T\mid(p-1)(q-1)$.
I know that this is RSA encryption, but how do I go about proving this?
Thanks!
By the Euler's theorem, if $\gcd(x,n)=1$, then $$ x^{\varphi(n)}\equiv 1\ (\text{mod}\,n) $$ Therefore, $\text{ord}_n(x)\mid \varphi(n)$. In particular, for $n=pq$, $x=m$ and $T=\text{ord}_n(m)$ we obtain $$ T\mid \varphi(pq)=(p-1)(q-1) $$
as required.