Lines Matching refs:entropy
2 #include "mbedtls/entropy.h"
28 int entropy_len_arg, data_t * entropy,
43 test_max_idx = entropy->len;
45 /* CTR_DRBG_Instantiate(entropy[:entropy->len], nonce, perso, <ignored>)
51 mbedtls_test_entropy_func, entropy->x,
60 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
77 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
138 void ctr_drbg_validate_no_reseed( data_t * add_init, data_t * entropy,
144 entropy->len, entropy,
152 void ctr_drbg_validate_pr( data_t * add_init, data_t * entropy,
158 entropy->len / 3, entropy,
166 void ctr_drbg_validate_reseed_between( data_t * add_init, data_t * entropy,
171 entropy->len / 2, entropy,
179 void ctr_drbg_validate_reseed_first( data_t * add_init, data_t * entropy,
184 entropy->len / 2, entropy,
194 unsigned char entropy[/*initial entropy*/ MBEDTLS_CTR_DRBG_ENTROPY_LEN +
203 test_max_idx = sizeof( entropy );
204 memset( entropy, 0, sizeof( entropy ) );
206 /* The initial seeding must grab at least byte_strength bytes of entropy
207 * for the entropy input and byte_strength/2 bytes for a nonce. */
209 mbedtls_test_entropy_func, entropy,
214 /* A reseed must grab at least byte_strength bytes of entropy. */
228 unsigned char entropy[1024];
235 test_max_idx = sizeof( entropy );
236 memset( entropy, 0, sizeof( entropy ) );
246 /* Init must use entropy */
247 TEST_ASSERT( mbedtls_ctr_drbg_seed( &ctx, mbedtls_test_entropy_func, entropy, NULL, 0 ) == 0 );
256 * 2 * reps so the next few calls should not use entropy */
288 /* Call update with too much data (sizeof entropy > MAX(_SEED)_INPUT).
292 &ctx, entropy, sizeof( entropy ) ) != 0 );