Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Functions | Variables
lc_rng.h File Reference
#include "lc_memory_support.h"
#include "lc_status.h"
+ 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. More...
 
void lc_rng_zero (struct lc_rng_ctx *ctx)
 Zeroize RNG context. More...
 
void lc_rng_zero_free (struct lc_rng_ctx *ctx)
 Zeroize and free RNG context. More...
 
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. More...
 
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 More...
 
int lc_rng_set_seeded (struct lc_rng_ctx *new_ctx)
 Set an externally defined RNG as the seeded RNG. More...
 
enum lc_alg_status_val lc_rng_alg_status (const struct lc_rng *rng)
 Obtain algorithm status. More...
 
enum lc_alg_status_val lc_rng_ctx_alg_status (const struct lc_rng_ctx *ctx)
 Obtain algorithm status. More...
 

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. More...