Lines Matching refs:entropy_len
124 ctx->entropy_len = len;
443 * for (ctx->entropy_len + nonce_len) bytes
456 if (ctx->entropy_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT) {
459 if (nonce_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len) {
462 if (len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len - nonce_len) {
468 /* Gather entropy_len bytes of entropy to seed state. */
469 if (0 != ctx->f_entropy(ctx->p_entropy, seed, ctx->entropy_len)) {
472 seedlen += ctx->entropy_len;
515 static size_t good_nonce_len(size_t entropy_len)
517 if (entropy_len >= MBEDTLS_CTR_DRBG_KEYSIZE * 3 / 2) {
520 return (entropy_len + 1) / 2;
531 * where entropy_input comes from f_entropy for ctx->entropy_len bytes
555 if (ctx->entropy_len == 0) {
556 ctx->entropy_len = MBEDTLS_CTR_DRBG_ENTROPY_LEN;
564 good_nonce_len(ctx->entropy_len));