Class PseudoRandomNumberGenerator

Page Contents

Class Documentation

class lbcrypto::PseudoRandomNumberGenerator

PseudoRandomNumberGenerator provides the PRNG capability to all random distribution generators in OpenFHE. The security of Ring Learning With Errors (used for all crypto capabilities in OpenFHE) depends on the randomness of uniform, ternary, and Gaussian distributions, which derive their randomness from the PRNG.

Public Static Functions

static void InitPRNGEngine(const std::string &libPath = std::string())

InitPRNGEngine() initializes the PRNG generator.

Note

this function should be called at the beginning of main() if an external library to be used and prints a trace in this case. There is no trace for the built-in PRNG

Parameters

libPath – a string with the absolute path to an external PRNG library (“/path/to/libprng.so”). If the string is empty, then the default (OpenFHE’s built-in PRNG) library will be used.

static PRNG &GetPRNG()

Returns a reference to the PRNG engine.