65#ifdef CSPRNG_CONF_ENABLED
66#define CSPRNG_ENABLED CSPRNG_CONF_ENABLED
68#define CSPRNG_ENABLED 0
71#define CSPRNG_KEY_LEN AES_128_KEY_LENGTH
72#define CSPRNG_STATE_LEN AES_128_BLOCK_SIZE
73#define CSPRNG_SEED_LEN (CSPRNG_KEY_LEN + CSPRNG_STATE_LEN)
79 uint8_t
key[CSPRNG_KEY_LEN];
80 uint8_t
state[CSPRNG_STATE_LEN];
83 uint8_t
u8[CSPRNG_SEED_LEN];
void csprng_feed(struct csprng_seed *new_seed)
Mixes a new seed with the current one.
bool csprng_rand(uint8_t *result, unsigned len)
Generates a cryptographic random number.
This is the structure of a seed.
uint8_t state[CSPRNG_STATE_LEN]
internal state of the CSPRNG
uint8_t key[CSPRNG_KEY_LEN]
AES-128 key of the CSPRNG.
uint8_t u8[CSPRNG_SEED_LEN]
for convenience