13
#include "rand_source.h" /* for rand_source_func_t definition */
14
#include "aes.h" /* for aes */
15
#include "aes_icm.h" /* for aes ctr */
17
#define MAX_PRNG_OUT_LEN 0xffffffffU
20
* x917_prng is an ANSI X9.17-like AES-based PRNG
24
v128_t state; /* state data */
25
aes_expanded_key_t key; /* secret key */
26
uint32_t octet_count; /* number of octets output since last init */
27
rand_source_func_t rand; /* random source for re-initialization */
31
x917_prng_init(rand_source_func_t random_source);
34
x917_prng_get_octet_string(uint8_t *dest, uint32_t len);
38
* ctr_prng is an AES-CTR based PRNG
42
uint32_t octet_count; /* number of octets output since last init */
43
aes_icm_ctx_t state; /* state data */
44
rand_source_func_t rand; /* random source for re-initialization */
48
ctr_prng_init(rand_source_func_t random_source);
51
ctr_prng_get_octet_string(void *dest, uint32_t len);