# Tag Info

Now I noticed that no matter which generator I use, when I use power-mod such that g^(q-1) mod q the result always 1 Congratulations, you just rediscovered Fermat's Little Theorem which says that for all primes $p$ and all non-zero integers $a$ which are not multiples of $p$, it holds that $a^{p-1}\bmod p=1$. So if I have the group order set to 8009 minus ...