/mbedtls-3.5.0/tests/suites/ |
D | test_suite_ctr_drbg.function | 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], 76 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len], 137 void ctr_drbg_validate_no_reseed(data_t *add_init, data_t *entropy, 143 entropy->len, entropy, 151 void ctr_drbg_validate_pr(data_t *add_init, data_t *entropy, [all …]
|
D | test_suite_random.function | 8 #include "mbedtls/entropy.h" 24 mbedtls_entropy_context entropy; 30 mbedtls_entropy_init(&entropy); 33 mbedtls_entropy_func, &entropy, 38 mbedtls_entropy_free(&entropy); 41 mbedtls_entropy_init(&entropy); 44 mbedtls_entropy_func, &entropy, 49 mbedtls_entropy_free(&entropy); 56 mbedtls_entropy_free(&entropy); 63 mbedtls_entropy_context entropy; [all …]
|
D | test_suite_hmac_drbg.function | 39 entropy_ctx entropy; 48 entropy.len = sizeof(buf); 49 entropy.p = buf; 64 /* Init must use entropy */ 65 TEST_ASSERT(mbedtls_hmac_drbg_seed(&ctx, md_info, mbedtls_test_entropy_func, &entropy, 67 /* default_entropy_len of entropy, plus half as much for the nonce */ 69 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy); 72 * 2 * reps so the next few calls should not use entropy */ 78 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy); 89 TEST_EQUAL(sizeof(buf) - entropy.len, expected_consumed_entropy); [all …]
|
D | test_suite_psa_crypto_init.data | 25 Custom entropy sources: all standard 28 Custom entropy sources: none 31 Fake entropy: never returns anything 34 Fake entropy: less than the block size 37 Fake entropy: not enough for a nonce 41 Fake entropy: one block eventually 45 Fake entropy: one block in two steps 49 Fake entropy: more than one block in two steps 53 Fake entropy: two blocks eventually
|
D | test_suite_psa_crypto_entropy.data | 28 PSA validate entropy injection: good, minimum size 31 PSA validate entropy injection: good, max size 34 PSA validate entropy injection: bad, too big 37 PSA validate entropy injection: bad, too small using MBEDTLS_ENTROPY_MIN_PLATFORM 40 PSA validate entropy injection: bad, too small using MBEDTLS_ENTROPY_BLOCK_SIZE 43 PSA validate entropy injection: before and after crypto_init
|
D | test_suite_entropy.function | 2 #include "mbedtls/entropy.h" 20 * Dummy entropy source 47 * Ability to clear entropy sources to allow testing with just predefined 48 * entropy sources. This function or tests depending on it might break if there 49 * are internal changes to how entropy sources are registered. 332 /* If the NV seed functionality is enabled, there are two entropy 377 /* If the NV seed functionality is enabled, there are two entropy 442 #error "Unsupported entropy accumulator" 452 unsigned char entropy[MBEDTLS_ENTROPY_BLOCK_SIZE]; 458 memset(entropy, 0, MBEDTLS_ENTROPY_BLOCK_SIZE); [all …]
|
D | test_suite_psa_crypto_init.function | 4 /* Some tests in this module configure entropy sources. */ 7 #include "mbedtls/entropy.h" 15 /* PSA crypto uses the HMAC_DRBG module. It reads from the entropy source twice: 16 * once for the initial entropy and once for a nonce. The nonce length is 17 * half the entropy length. For SHA-256, SHA-384 or SHA-512, the 18 * entropy length is 256 per the documentation of mbedtls_hmac_drbg_seed(), 23 * to read from the entropy source twice: once for the initial entropy 65 /* This is a modified version of mbedtls_entropy_init() from entropy.c 66 * which chooses entropy sources dynamically. */
|
D | test_suite_hmac_drbg.misc.data | 1 HMAC_DRBG entropy usage SHA-1 5 HMAC_DRBG entropy usage SHA-224 9 HMAC_DRBG entropy usage SHA-256 13 HMAC_DRBG entropy usage SHA-384 17 HMAC_DRBG entropy usage SHA-512
|
/mbedtls-3.5.0/programs/random/ |
D | gen_entropy.c | 44 mbedtls_entropy_context entropy; in main() local 57 mbedtls_entropy_init(&entropy); in main() 60 ret = mbedtls_entropy_func(&entropy, buf, sizeof(buf)); in main() 83 mbedtls_entropy_free(&entropy); in main()
|
D | gen_random_ctr_drbg.c | 48 mbedtls_entropy_context entropy; in main() local 63 mbedtls_entropy_init(&entropy); in main() 66 &entropy, in main() 115 mbedtls_entropy_free(&entropy); in main()
|
/mbedtls-3.5.0/library/ |
D | psa_crypto_random_impl.h | 122 mbedtls_entropy_context entropy; member 183 mbedtls_entropy_context *entropy, in mbedtls_psa_drbg_seed() argument 189 entropy, in mbedtls_psa_drbg_seed() 197 entropy, in mbedtls_psa_drbg_seed()
|
/mbedtls-3.5.0/programs/pkey/ |
D | pk_encrypt.c | 56 mbedtls_entropy_context entropy; in main() local 63 mbedtls_entropy_init(&entropy); in main() 80 &entropy, (const unsigned char *) pers, in main() 141 mbedtls_entropy_free(&entropy); in main()
|
D | pk_decrypt.c | 57 mbedtls_entropy_context entropy; in main() local 65 mbedtls_entropy_init(&entropy); in main() 84 &entropy, (const unsigned char *) pers, in main() 140 mbedtls_entropy_free(&entropy); in main()
|
D | pk_sign.c | 53 mbedtls_entropy_context entropy; in main() local 61 mbedtls_entropy_init(&entropy); in main() 78 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 141 mbedtls_entropy_free(&entropy); in main()
|
D | rsa_sign_pss.c | 54 mbedtls_entropy_context entropy; in main() local 62 mbedtls_entropy_init(&entropy); in main() 79 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 154 mbedtls_entropy_free(&entropy); in main()
|
D | rsa_encrypt.c | 54 mbedtls_entropy_context entropy; in main() local 77 mbedtls_entropy_init(&entropy); in main() 80 &entropy, (const unsigned char *) pers, in main() 155 mbedtls_entropy_free(&entropy); in main()
|
D | dh_genprime.c | 62 mbedtls_entropy_context entropy; in main() local 72 mbedtls_entropy_init(&entropy); in main() 107 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 168 mbedtls_entropy_free(&entropy); in main()
|
D | ecdh_curve25519.c | 49 mbedtls_entropy_context entropy; in main() local 73 mbedtls_entropy_init(&entropy); in main() 75 &entropy, in main() 196 mbedtls_entropy_free(&entropy); in main()
|
D | rsa_genkey.c | 57 mbedtls_entropy_context entropy; in main() local 73 mbedtls_entropy_init(&entropy); in main() 74 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 148 mbedtls_entropy_free(&entropy); in main()
|
D | rsa_decrypt.c | 57 mbedtls_entropy_context entropy; in main() local 81 mbedtls_entropy_init(&entropy); in main() 87 &entropy, (const unsigned char *) pers, in main() 176 mbedtls_entropy_free(&entropy); in main()
|
/mbedtls-3.5.0/programs/fuzz/ |
D | fuzz_dtlsclient.c | 41 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local 62 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput() 65 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput() 118 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
|
D | fuzz_client.c | 45 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local 79 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput() 81 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput() 174 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
|
D | fuzz_dtlsserver.c | 46 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local 53 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput() 55 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput() 157 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
|
D | fuzz_server.c | 45 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local 60 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput() 62 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput() 193 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
|
/mbedtls-3.5.0/programs/ssl/ |
D | mini_client.c | 163 mbedtls_entropy_context entropy; in main() local 179 mbedtls_entropy_init(&entropy); in main() 180 if (mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 269 mbedtls_entropy_free(&entropy); in main()
|