Closed Federico2014 closed 1 year ago
The entire multiplicative group is $\mathbb{F}_p^ = \mathbb{F}_p \backslash \lbrace 0 \rbrace$. A generator for it is a single element $g$ such that $\langle g \rangle = \lbrace g^i | i \in \mathbb{Z} \rbrace = \mathbb{F}_p^$. The order of $g$ is always $p-1$ so in fact it is also correct to say $\langle g \rangle = \lbrace g^i | 0 \leq i < p-1 \rbrace$ because the powers of $g$ outside this range fold onto powers of $g$ inside this range.
The function generator
returns not a generator for the entire multiplicative group but only for the subgroup of order $2^{119}$.
Ok, I see, thanks so much. It makes me quite confused when I read it the first time.
I have a question about the generator and primitive _nth_root, it says the code also needs to supply the user with a generator for the entire multiplicative group, What is the entire multiplicative group, is it Fp? If the
root
is the generator of Fp, how to derive theprimitive_nth_root
? why is the 407 omitted in the primitive_nth_root function? Can you tell me, thanks