I haven't been able to find a clear explanation on this (and I'm probably just confused in general). I have the following parameters of ElGamal signatures:
- $p$ = safe prime
- $q = (p-1)/2$
- $g$ = an element of $F_p$ with order $q$.
- $r$ = random $1 < r < q $
- $s$ = private key
- $Y$ = public key, $Y = g^s$
My question is, is there an easy way to generate a $g$ value, or should I just generate a random value, then check that it is in the group?