Template Function lbcrypto::FindGenerator

Function Documentation

template<typename IntType>
static IntType lbcrypto::FindGenerator(const IntType &q)

A helper function to RootOfUnity function. This finds a generator of the multiplicative group of a given prime q by random trials against the prime factors of q-1.

Parameters

q – a prime

Returns

a generator of Z_q^*