Lines Matching refs:entropy
39 entropy_ctx entropy;
50 entropy.len = sizeof(buf);
51 entropy.p = buf;
66 /* Init must use entropy */
67 TEST_ASSERT(mbedtls_hmac_drbg_seed(&ctx, md_info, mbedtls_test_entropy_func, &entropy,
69 /* default_entropy_len of entropy, plus half as much for the nonce */
71 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
74 * 2 * reps so the next few calls should not use entropy */
80 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
91 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
102 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
108 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
114 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
119 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy);
187 void hmac_drbg_no_reseed(int md_alg, data_t *entropy,
201 p_entropy.p = entropy->x;
202 p_entropy.len = entropy->len;
208 memcpy(data, entropy->x, p_entropy.len);
222 /* And now the normal entropy-based variant */
238 void hmac_drbg_nopr(int md_alg, data_t *entropy, data_t *custom,
251 p_entropy.p = entropy->x;
252 p_entropy.len = entropy->len;
274 void hmac_drbg_pr(int md_alg, data_t *entropy, data_t *custom,
286 p_entropy.p = entropy->x;
287 p_entropy.len = entropy->len;