mbedtls_ctr_drbg_reseed() function
This function reseeds the CTR_DRBG context, that is extracts data from the entropy source.
Arguments
additional
Additional data to add to the state. Can be \c NULL.
len
The length of the additional data. This must be less than #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - \c entropy_len where \c entropy_len is the entropy length configured for the context.
Return value
\c 0 on success. #MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED on failure.
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_ctr_drbg_reseed(&ctx, NULL, 0));
mbedtls_ctr_drbg_reseed() is called by 2 functions and calls 1 function:
![]()
mbedtls_ctr_drbg_reseed()
mbedtls_ctr_drbg_reseed():
![]()
mbedtls_ctr_drbg_reseed()