Leancrypto 0.12.0
Post-Quantum Cryptographic Library
Loading...
Searching...
No Matches
lc_rng.h File Reference
+ Include dependency graph for lc_rng.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static void lc_rng_check (struct lc_rng_ctx **ctx)
 Get the default leancrypto RNG.
 
static void lc_rng_zero (struct lc_rng_ctx *ctx)
 Zeroize RNG context.
 
static void lc_rng_zero_free (struct lc_rng_ctx *ctx)
 Zeroize and free RNG context.
 
static int lc_rng_generate (struct lc_rng_ctx *ctx, const uint8_t *addtl_input, size_t addtl_input_len, uint8_t *out, size_t outlen)
 Obtain random numbers.
 
static int lc_rng_seed (struct lc_rng_ctx *ctx, const uint8_t *seed, size_t seedlen, const uint8_t *persbuf, size_t perslen)
 (Re)Seed the RNG
 

Variables

struct lc_rng_ctx * lc_seeded_rng
 One common instance of a seeded DRNG. The caller does not need to consider the seeding and reseeding - it is automatically and transparently handled. Thus, this structure can be directly used for the lc_rng API by a caller and have a properly seeded DRNG.