Sampling random elements from a cyclic group

85 Views Asked by At

I have a basic question about cyclic groups. Let $G=\langle g \rangle$ a cyclic group with prime order $Q$. Can I sample a random group element of $G$ by sampling $r \leftarrow \mathbb{Z}_Q$ and compute $g^r$?

1

There are 1 best solutions below

0
On

Yes, you can do this.

Each element of $G$ can be written as $g^r$ for some $r\in\Bbb Z$, and $r$ is uniquely determined up to multiples of $Q$. In fact, $G\cong\Bbb Z_Q$.