Skip to main content

find_generator

Function find_generator 

Source
pub fn find_generator(p: u64) -> u64
Expand description

Find the smallest primitive root of prime p.

§Panics

Panics if no primitive root is found below p (impossible for actual primes — every prime has a primitive root by the theory of cyclic groups).