mbedtls_ctr_drbg_set_entropy_len() function
This function sets the amount of entropy grabbed on each seed or reseed. The default value is #MBEDTLS_CTR_DRBG_ENTROPY_LEN.
Arguments
len
The amount of entropy to grab, in bytes. This must be at most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT and at most the maximum length accepted by the entropy function that is set in the context.
Notes
The security strength of CTR_DRBG is bounded by the entropy length. Thus: - When using AES-256 (\c MBEDTLS_CTR_DRBG_USE_128_BIT_KEY is disabled, which is the default), \p len must be at least 32 (in bytes) to achieve a 256-bit strength. - When using AES-128 (\c MBEDTLS_CTR_DRBG_USE_128_BIT_KEY is enabled) \p len must be at least 16 (in bytes) to achieve a 128-bit strength.
mbedtls_ctr_drbg_set_entropy_len() is called by 1 function:
![]()
mbedtls_ctr_drbg_set_entropy_len()
mbedtls_ctr_drbg_set_entropy_len() writes 1 variable:
![]()
mbedtls_ctr_drbg_set_entropy_len()