![]() |
ndn-lite
|
Functions | |
static void | arrInc (uint8_t arr[], unsigned int len) |
Array incrementer Treats the supplied array as one contiguous number (MSB in arr[0]), and increments it by one. More... | |
static void | tc_ctr_prng_update (TCCtrPrng_t *const ctx, uint8_t const *const providedData) |
CTR PRNG update Updates the internal state of supplied the CTR PRNG context increments it by one. More... | |
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 (if any) More... | |
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. More... | |
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. More... | |
void | tc_ctr_prng_uninstantiate (TCCtrPrng_t *const ctx) |
CTR-PRNG uninstantiate procedure Zeroes the internal state of the supplied prng context. More... | |
|
static |
Array incrementer Treats the supplied array as one contiguous number (MSB in arr[0]), and increments it by one.
arr | IN/OUT – array to be incremented |
len | IN – size of arr in bytes |
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.
ctx | IN/OUT – the PRNG context |
additional_input | IN – additional input to the prng (may be null) |
additionallen | IN – additional input length in bytes |
out | IN/OUT – buffer to receive output |
outlen | IN – size of out buffer in bytes |
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 (if any)
ctx | IN/OUT – the PRNG context to initialize |
entropy | IN – entropy used to seed the PRNG |
entropyLen | IN – entropy length in bytes |
personalization | IN – personalization string used to seed the PRNG (may be null) |
plen | IN – personalization length in bytes |
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.
ctx | IN/OUT – the PRNG state |
entropy | IN – entropy to mix into the prng |
entropylen | IN – length of entropy in bytes |
additional_input | IN – additional input to the prng (may be null) |
additionallen | IN – additional input length in bytes |
void tc_ctr_prng_uninstantiate | ( | TCCtrPrng_t *const | ctx | ) |
CTR-PRNG uninstantiate procedure Zeroes the internal state of the supplied prng context.
ctx | IN/OUT – the PRNG context |
|
static |
CTR PRNG update Updates the internal state of supplied the CTR PRNG context increments it by one.
ctx | IN/OUT – CTR PRNG state |
providedData | IN – data used when updating the internal state |