tc_hmac_prng_reseed() function
HMAC-PRNG reseed procedure Mixes seed into prng, enables tc_hmac_prng_generate
Arguments
prng
IN/OUT -- the PRNG state
seed
IN -- entropy to mix into the prng
seedlen
IN -- length of seed in bytes
additional_input
IN -- additional input to the prng
additionallen
IN -- additional input length in bytes
Return value
returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: prng == NULL, seed == NULL, seedlen < MIN_SLEN, seendlen > MAX_SLEN, additional_input != (const uint8_t *) 0 && additionallen == 0, additional_input != (const uint8_t *) 0 && additionallen > MAX_ALEN
Notes
Assumes:- tc_hmac_prng_init has been called for prng - seed has sufficient entropy.
tc_hmac_prng_reseed() calls 2 functions:
![]()
tc_hmac_prng_reseed()
tc_hmac_prng_reseed() reads 8 variables and writes 1 variable:
![]()
tc_hmac_prng_reseed()