23 #ifndef LWCRYPTO_GRAIN_PRNG_H
24 #define LWCRYPTO_GRAIN_PRNG_H
43 unsigned char state[32];
unsigned long long align
Definition: grain-prng.h:48
int grain_prng_generate(unsigned char *data, size_t size)
Fetches random data using a Grain-128 based PRNG.
Definition: grain-prng.c:304
int grain_prng_init(grain_prng_state_t *state)
Initializes a Grain-128 based PRNG.
Definition: grain-prng.c:239
int grain_prng_reseed(grain_prng_state_t *state)
Forces a Grain-128 based PRNG to re-seed from the system TRNG.
Definition: grain-prng.c:265
size_t rekeys
Definition: grain-prng.h:44
size_t count
Definition: grain-prng.h:45
void grain_prng_free(grain_prng_state_t *state)
Frees a Grain-128 based PRNG and destroys all sensitive information.
Definition: grain-prng.c:260
void grain_prng_add_ident(const unsigned char *data, size_t size)
Adds unique identification information for this device to the global pool.
Definition: grain-prng.c:213
int grain_prng_fetch(grain_prng_state_t *state, unsigned char *data, size_t size)
Fetches data from a Grain-128 based PRNG state.
Definition: grain-prng.c:294
void grain_prng_feed(grain_prng_state_t *state, const unsigned char *data, size_t size)
Feeds data into a Grain-128 based PRNG state to seed it from other sources besides the system TRNG...
Definition: grain-prng.c:284
State information for a Grain-128 based PRNG.
Definition: grain-prng.h:40
size_t limit
Definition: grain-prng.h:46