59#ifndef __TC_CTR_PRNG_H__
60#define __TC_CTR_PRNG_H__
64#define TC_CTR_PRNG_RESEED_REQ -1
72 uint8_t V[TC_AES_BLOCK_SIZE];
75 struct tc_aes_key_sched_struct key;
102 uint8_t
const *
const entropy,
103 unsigned int entropyLen,
104 uint8_t
const *
const personalization,
127 uint8_t
const *
const entropy,
128 unsigned int entropyLen,
129 uint8_t
const *
const additional_input,
130 unsigned int additionallen);
149 uint8_t
const *
const additional_input,
150 unsigned int additionallen,
152 unsigned int outlen);
– Interface to an AES-128 implementation.
int tc_ctr_prng_init(TCCtrPrng_t *const ctx, uint8_t const *const entropy, unsigned int entropyLen, uint8_t const *const personalization, unsigned int pLen)
CTR-PRNG initialization procedure Initializes prng context with entropy and personalization string (i...
Definition ctr_prng.c:117
int tc_ctr_prng_generate(TCCtrPrng_t *const ctx, uint8_t const *const additional_input, unsigned int additionallen, uint8_t *const out, unsigned int outlen)
CTR-PRNG generate procedure Generates outlen pseudo-random bytes into out buffer, updates prng.
Definition ctr_prng.c:205
void tc_ctr_prng_uninstantiate(TCCtrPrng_t *const ctx)
CTR-PRNG uninstantiate procedure Zeroes the internal state of the supplied prng context.
Definition ctr_prng.c:272
int tc_ctr_prng_reseed(TCCtrPrng_t *const ctx, uint8_t const *const entropy, unsigned int entropyLen, uint8_t const *const additional_input, unsigned int additionallen)
CTR-PRNG reseed procedure Mixes entropy and additional_input into the prng context.
Definition ctr_prng.c:164