Lines Matching refs:entropy
38 entropy_ctx entropy;
45 entropy.len = sizeof( buf );
46 entropy.p = buf;
51 /* Init must use entropy */
52 last_len = entropy.len;
53 TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_entropy_func, &entropy,
55 TEST_ASSERT( entropy.len < last_len );
58 * so the next few calls should not use entropy */
59 last_len = entropy.len;
66 TEST_ASSERT( entropy.len == last_len );
78 TEST_ASSERT( entropy.len < last_len );
81 last_len = entropy.len;
88 TEST_ASSERT( entropy.len == last_len );
93 TEST_ASSERT( entropy.len < last_len );
97 last_len = entropy.len;
99 TEST_ASSERT( (int) last_len - entropy.len == 42 );
102 last_len = entropy.len;
104 TEST_ASSERT( (int) last_len - entropy.len == 13 );
169 unsigned char entropy[512];
187 p_entropy.len = unhexify( entropy, entropy_hex );
188 p_entropy.p = entropy;
194 memcpy( data, entropy, p_entropy.len );
208 /* And now the normal entropy-based variant */
228 unsigned char entropy[512];
248 p_entropy.len = unhexify( entropy, entropy_hex );
249 p_entropy.p = entropy;
275 unsigned char entropy[512];
293 p_entropy.len = unhexify( entropy, entropy_hex );
294 p_entropy.p = entropy;