The first time PBC is asked to generate a random number, the
library will try to open the file /dev/urandom as a source of random bits. If
this fails, PBC falls back to a deterministic random number
generator (which is of course completely useless for
cryptography).
It is possible to change the file used for random bits. Also, explicitly selecting the deterministic random number generator will suppress the warning.
void random_set_file(char *filename)
Uses filename as a source of random bytes. For example, on Linux one might use
/dev/random.
void random_set_deterministic(void)
Use a determinstic random number generator.
void pbc_mpz_random(mpz_t z, mpz_t limit)
Use previously chosen random number generator to select a random z that is less than limit.
void pbc_mpz_randomb(mpz_t z, unsigned int bits)
Use previously chosen random number generator to select a random bits-bit integer z.