Is modular multiplication under a prime modulus uniformly distributed?

698 Views Asked by At

Given a prime $p$ and $m \in Z_p^*$.

Assume we draw $a \stackrel{u}{\in} Z_p^*$ uniformly at random.

Will $a \cdot m \bmod p$ be distributed uniformly over $Z_p^*$?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, the $am$ will be distributed uniformly modulo $p$. For any $k \in \mathbb Z^*_p$, the chance of getting $k$ is $\frac1 {p-1}$, because it happens for only one value of $a$, namely when $a \equiv m^{-1}k \pmod p$.

Note that if $p$ is not prime, then the same result holds only when $\gcd(m,p)=1$.