Lines Matching refs:entropy

2 #include "mbedtls/entropy.h"
33 int entropy_len_arg, data_t *entropy,
46 test_max_idx = entropy->len;
48 /* CTR_DRBG_Instantiate(entropy[:entropy->len], nonce, perso, <ignored>)
54 mbedtls_test_entropy_func, entropy->x,
63 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
79 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
154 void ctr_drbg_validate_no_reseed(data_t *add_init, data_t *entropy,
161 entropy->len, entropy,
170 void ctr_drbg_validate_pr(data_t *add_init, data_t *entropy,
177 entropy->len / 3, entropy,
186 void ctr_drbg_validate_reseed_between(data_t *add_init, data_t *entropy,
192 entropy->len / 2, entropy,
201 void ctr_drbg_validate_reseed_first(data_t *add_init, data_t *entropy,
207 entropy->len / 2, entropy,
218 unsigned char entropy[/*initial entropy*/ MBEDTLS_CTR_DRBG_ENTROPY_LEN +
229 test_max_idx = sizeof(entropy);
230 memset(entropy, 0, sizeof(entropy));
232 /* The initial seeding must grab at least byte_strength bytes of entropy
233 * for the entropy input and byte_strength/2 bytes for a nonce. */
235 mbedtls_test_entropy_func, entropy,
240 /* A reseed must grab at least byte_strength bytes of entropy. */
255 unsigned char entropy[1024];
265 test_max_idx = sizeof(entropy);
266 memset(entropy, 0, sizeof(entropy));
277 /* Init must use entropy */
278 TEST_ASSERT(mbedtls_ctr_drbg_seed(&ctx, mbedtls_test_entropy_func, entropy, NULL, 0) == 0);
288 * 2 * reps so the next few calls should not use entropy */
318 /* Call update with too much data (sizeof(entropy) > MAX(_SEED)_INPUT).
322 &ctx, entropy, sizeof(entropy)) != 0);
354 unsigned char *entropy = NULL;
358 /* This is a known-answer test, and although tests use a mock entropy
359 * function the input entropy length will still affect the output.
360 * We therefore need to pick a fixed entropy length, rather than using the
361 * default entropy length (MBEDTLS_CTR_DRBG_ENTROPY_LEN). We've chosen to
376 /* Need to set a non-default fixed entropy len, to ensure same output across
384 TEST_CALLOC(entropy, entropy_len + MBEDTLS_CTR_DRBG_ENTROPY_NONCE_LEN);
392 TEST_CALLOC(entropy, entropy_size);
397 mbedtls_ctr_drbg_seed(&ctx, mbedtls_test_entropy_func, entropy, NULL, 0),
418 mbedtls_free(entropy);