tc_ctr_prng_reseed() function
CTR-PRNG reseed procedure Mixes entropy and additional_input into the prng context
Arguments
ctx
IN/OUT -- the PRNG state
entropy
IN -- entropy to mix into the prng
additional_input
IN -- additional input to the prng (may be null)
additionallen
IN -- additional input length in bytes
Return value
returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: ctx == NULL, entropy == NULL, entropylen < (TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE)
Notes
It is better to reseed an existing prng context rather than re-initialise, so that any existing entropy in the context is presereved. This offers some protection against undetected failures of the entropy source. Assumes tc_ctr_prng_init has been called for ctx