Function esp_idf_sys::mbedtls_ctr_drbg_set_entropy_len

source ยท
pub unsafe extern "C" fn mbedtls_ctr_drbg_set_entropy_len(
    ctx: *mut mbedtls_ctr_drbg_context,
    len: usize,
)
Expand description

\brief This function sets the amount of entropy grabbed on each seed or reseed.

The default value is #MBEDTLS_CTR_DRBG_ENTROPY_LEN.

\note 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.

\param ctx The CTR_DRBG context. \param 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.