Home
last modified time | relevance | path

Searched refs:entropy_len (Results 1 – 5 of 5) sorted by relevance

/optee_os/lib/libmbedtls/mbedtls/library/
H A Dhmac_drbg.c146 total_entropy_len = ctx->entropy_len; in hmac_drbg_reseed_core()
148 total_entropy_len = ctx->entropy_len * 3 / 2; in hmac_drbg_reseed_core()
162 seed, ctx->entropy_len)) != 0) { in hmac_drbg_reseed_core()
165 seedlen += ctx->entropy_len; in hmac_drbg_reseed_core()
179 ctx->entropy_len / 2)) != 0) { in hmac_drbg_reseed_core()
183 seedlen += ctx->entropy_len / 2; in hmac_drbg_reseed_core()
256 if (ctx->entropy_len == 0) { in mbedtls_hmac_drbg_seed()
264 ctx->entropy_len = md_size <= 20 ? 16 : /* 160-bits hash -> 128 bits */ in mbedtls_hmac_drbg_seed()
291 ctx->entropy_len = len; in mbedtls_hmac_drbg_set_entropy_len()
H A Dctr_drbg.c124 ctx->entropy_len = len; in mbedtls_ctr_drbg_set_entropy_len()
456 if (ctx->entropy_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT) { in mbedtls_ctr_drbg_reseed_internal()
459 if (nonce_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len) { in mbedtls_ctr_drbg_reseed_internal()
462 if (len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len - nonce_len) { in mbedtls_ctr_drbg_reseed_internal()
469 if (0 != ctx->f_entropy(ctx->p_entropy, seed, ctx->entropy_len)) { in mbedtls_ctr_drbg_reseed_internal()
472 seedlen += ctx->entropy_len; in mbedtls_ctr_drbg_reseed_internal()
515 static size_t good_nonce_len(size_t entropy_len) in good_nonce_len() argument
517 if (entropy_len >= MBEDTLS_CTR_DRBG_KEYSIZE * 3 / 2) { in good_nonce_len()
520 return (entropy_len + 1) / 2; in good_nonce_len()
555 if (ctx->entropy_len == 0) { in mbedtls_ctr_drbg_seed()
[all …]
H A Dentropy.c502 size_t entropy_len = 0; in mbedtls_entropy_source_self_test_gather() local
506 while (attempts > 0 && entropy_len < buf_len) { in mbedtls_entropy_source_self_test_gather()
507 if ((ret = mbedtls_hardware_poll(NULL, buf + entropy_len, in mbedtls_entropy_source_self_test_gather()
508 buf_len - entropy_len, &olen)) != 0) { in mbedtls_entropy_source_self_test_gather()
512 entropy_len += olen; in mbedtls_entropy_source_self_test_gather()
516 if (entropy_len < buf_len) { in mbedtls_entropy_source_self_test_gather()
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Dhmac_drbg.h82 size_t MBEDTLS_PRIVATE(entropy_len); /*!< entropy bytes grabbed on each (re)seed */
H A Dctr_drbg.h201 size_t MBEDTLS_PRIVATE(entropy_len); /*!< The amount of entropy grabbed on each