Leancrypto 1.6.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

void lc_rng_check (struct lc_rng_ctx **ctx)
 Get the default leancrypto RNG.
void lc_rng_zero (struct lc_rng_ctx *ctx)
 Zeroize RNG context.
void lc_rng_zero_free (struct lc_rng_ctx *ctx)
 Zeroize and free RNG context.
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.
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
int lc_rng_set_seeded (struct lc_rng_ctx *new_ctx)
 Set an externally defined RNG as the seeded RNG.
uint64_t lc_rng_algorithm_type (const struct lc_rng *rng)
 Obtain algorithm type usable with lc_alg_status.
uint64_t lc_rng_ctx_algorithm_type (const struct lc_rng_ctx *ctx)
 Obtain algorithm type usable with lc_alg_status.

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.