tc_hmac_prng_init() function
HMAC-PRNG initialization procedure Initializes prng with personalization, disables tc_hmac_prng_generate
Arguments
prng
IN/OUT -- the PRNG state to initialize
personalization
IN -- personalization string
plen
IN -- personalization length in bytes
Return value
returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: prng == NULL, personalization == NULL, plen > MAX_PLEN
Notes
Assumes: - personalization != NULL. The personalization is a platform unique string (e.g., the host name) and is the last line of defense against failure of the entropy source @warning NIST SP 800-90A specifies 3 items as seed material during initialization: entropy seed, personalization, and an optional nonce. TinyCrypts requires instead a non-null personalization (which is easily computed) and indirectly requires an entropy seed (since the reseed function is mandatorily called after init)
tc_hmac_prng_init() calls 4 functions:
![]()
tc_hmac_prng_init()
tc_hmac_prng_init() reads 4 variables and writes 1 variable:
![]()
tc_hmac_prng_init()