mbedtls_hmac_drbg_reseed() function
This function reseeds the HMAC_DRBG context, that is extracts data from the entropy source.
Arguments
ctx
The HMAC_DRBG context.
additional
Additional data to add to the state. If this is \c NULL, there is no additional data and \p len should be \c 0.
len
The length of the additional data. This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT and also at most #MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT - \c entropy_len where \c entropy_len is the entropy length (see mbedtls_hmac_drbg_set_entropy_len()).
Return value
\c 0 if successful. #MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED if a call to the entropy function failed.
Notes
This function is not thread-safe. It is not safe to call this function if another thread might be concurrently obtaining random numbers from the same context or updating or reseeding the same context.
![]()
CHK(mbedtls_hmac_drbg_reseed(&ctx, NULL, 0));
mbedtls_hmac_drbg_reseed() is called by 2 functions and calls 1 function:
![]()
mbedtls_hmac_drbg_reseed()
mbedtls_hmac_drbg_reseed():
![]()
mbedtls_hmac_drbg_reseed()