Home
last modified time | relevance | path

Searched refs:entropy (Results 1 – 25 of 73) sorted by relevance

123

/lib/mbedtls/external/mbedtls/tests/suites/
A Dtest_suite_ctr_drbg.function2 #include "mbedtls/entropy.h"
48 /* CTR_DRBG_Instantiate(entropy[:entropy->len], nonce, perso, <ignored>)
63 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
79 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
160 entropy->len, entropy,
176 entropy->len / 3, entropy,
191 entropy->len / 2, entropy,
206 entropy->len / 2, entropy,
229 memset(entropy, 0, sizeof(entropy));
265 memset(entropy, 0, sizeof(entropy));
[all …]
A Dtest_suite_random.function8 #include "mbedtls/entropy.h"
24 mbedtls_entropy_context entropy;
37 mbedtls_entropy_init(&entropy);
45 mbedtls_entropy_free(&entropy);
48 mbedtls_entropy_init(&entropy);
56 mbedtls_entropy_free(&entropy);
63 mbedtls_entropy_free(&entropy);
84 mbedtls_entropy_init(&entropy);
92 mbedtls_entropy_free(&entropy);
95 mbedtls_entropy_init(&entropy);
[all …]
A Dtest_suite_hmac_drbg.function39 entropy_ctx entropy;
50 entropy.len = sizeof(buf);
51 entropy.p = buf;
66 /* Init must use entropy */
201 p_entropy.p = entropy->x;
202 p_entropy.len = entropy->len;
208 memcpy(data, entropy->x, p_entropy.len);
251 p_entropy.p = entropy->x;
252 p_entropy.len = entropy->len;
286 p_entropy.p = entropy->x;
[all …]
A Dtest_suite_psa_crypto_init.data28 Custom entropy sources: all standard
31 # MBEDTLS_PSA_INJECT_ENTROPY means that a source of entropy (the seed file)
33 Custom entropy sources: none
37 Fake entropy: never returns anything
40 Fake entropy: less than the block size
43 Fake entropy: not enough for a nonce
47 Fake entropy: one block eventually
51 Fake entropy: one block in two steps
55 Fake entropy: more than one block in two steps
59 Fake entropy: two blocks eventually
A Dtest_suite_hmac_drbg.misc.data1 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
21 HMAC_DRBG entropy usage SHA3-224
25 HMAC_DRBG entropy usage SHA3-256
29 HMAC_DRBG entropy usage SHA3-384
33 HMAC_DRBG entropy usage SHA3-512
A Dtest_suite_psa_crypto_entropy.data28 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
A Dtest_suite_entropy.function2 #include "mbedtls/entropy.h"
20 * Dummy entropy source
47 * Ability to clear entropy sources to allow testing with just predefined
49 * are internal changes to how entropy sources are registered.
346 /* If the NV seed functionality is enabled, there are two entropy
394 /* If the NV seed functionality is enabled, there are two entropy
460 #error "Unsupported entropy accumulator"
470 unsigned char entropy[MBEDTLS_ENTROPY_BLOCK_SIZE];
476 memset(entropy, 0, MBEDTLS_ENTROPY_BLOCK_SIZE);
499 // Do an entropy run
[all …]
A Dtest_suite_psa_crypto_init.function5 /* Some tests in this module configure entropy sources. */
8 #include "mbedtls/entropy.h"
16 /* PSA crypto uses the HMAC_DRBG module. It reads from the entropy source twice:
17 * once for the initial entropy and once for a nonce. The nonce length is
18 * half the entropy length. For SHA-256, SHA-384 or SHA-512, the
19 * entropy length is 256 per the documentation of mbedtls_hmac_drbg_seed(),
24 * to read from the entropy source twice: once for the initial entropy
66 /* This is a modified version of mbedtls_entropy_init() from entropy.c
67 * which chooses entropy sources dynamically. */
151 /* Bad state due to entropy sources already being setup in
/lib/zstd/decompress/
A Dzstd_ddict.c34 ZSTD_entropyDTables_t entropy; member
69 dctx->LLTptr = ddict->entropy.LLTable; in ZSTD_copyDDictParameters()
70 dctx->MLTptr = ddict->entropy.MLTable; in ZSTD_copyDDictParameters()
71 dctx->OFTptr = ddict->entropy.OFTable; in ZSTD_copyDDictParameters()
72 dctx->HUFptr = ddict->entropy.hufTable; in ZSTD_copyDDictParameters()
73 dctx->entropy.rep[0] = ddict->entropy.rep[0]; in ZSTD_copyDDictParameters()
74 dctx->entropy.rep[1] = ddict->entropy.rep[1]; in ZSTD_copyDDictParameters()
75 dctx->entropy.rep[2] = ddict->entropy.rep[2]; in ZSTD_copyDDictParameters()
106 &ddict->entropy, ddict->dictContent, ddict->dictSize)), in ZSTD_loadEntropy_intoDDict()
129 …ddict->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endia… in ZSTD_initDDict_internal()
/lib/mbedtls/external/mbedtls/programs/random/
A Dgen_entropy.c32 mbedtls_entropy_context entropy; in main() local
45 mbedtls_entropy_init(&entropy); in main()
48 ret = mbedtls_entropy_func(&entropy, buf, sizeof(buf)); in main()
71 mbedtls_entropy_free(&entropy); in main()
A Dgen_random_ctr_drbg.c36 mbedtls_entropy_context entropy; in main() local
51 mbedtls_entropy_init(&entropy); in main()
54 &entropy, in main()
103 mbedtls_entropy_free(&entropy); in main()
/lib/mbedtls/external/mbedtls/library/
A Dpsa_crypto_random_impl.h80 mbedtls_entropy_context entropy; member
122 mbedtls_entropy_context *entropy, in mbedtls_psa_drbg_seed() argument
126 return mbedtls_ctr_drbg_seed(drbg_ctx, mbedtls_entropy_func, entropy, custom, len); in mbedtls_psa_drbg_seed()
129 return mbedtls_hmac_drbg_seed(drbg_ctx, md_info, mbedtls_entropy_func, entropy, custom, len); in mbedtls_psa_drbg_seed()
/lib/mbedtls/external/mbedtls/programs/fuzz/
A Dfuzz_dtlsclient.c39 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local
60 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput()
70 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput()
123 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
A Dfuzz_privkey.c22 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local
30 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput()
40 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput()
92 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
A Dfuzz_client.c43 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local
77 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput()
86 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput()
179 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
A Dfuzz_dtlsserver.c43 mbedtls_entropy_context entropy; in LLVMFuzzerTestOneInput() local
50 mbedtls_entropy_init(&entropy); in LLVMFuzzerTestOneInput()
66 if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, in LLVMFuzzerTestOneInput()
164 mbedtls_entropy_free(&entropy); in LLVMFuzzerTestOneInput()
/lib/mbedtls/external/mbedtls/programs/pkey/
A Dpk_decrypt.c45 mbedtls_entropy_context entropy; in main() local
53 mbedtls_entropy_init(&entropy); in main()
81 &entropy, (const unsigned char *) pers, in main()
137 mbedtls_entropy_free(&entropy); in main()
A Dpk_encrypt.c44 mbedtls_entropy_context entropy; in main() local
51 mbedtls_entropy_init(&entropy); in main()
77 &entropy, (const unsigned char *) pers, in main()
138 mbedtls_entropy_free(&entropy); in main()
A Dpk_sign.c42 mbedtls_entropy_context entropy; in main() local
50 mbedtls_entropy_init(&entropy); in main()
76 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
139 mbedtls_entropy_free(&entropy); in main()
A Drsa_encrypt.c42 mbedtls_entropy_context entropy; in main() local
65 mbedtls_entropy_init(&entropy); in main()
68 &entropy, (const unsigned char *) pers, in main()
143 mbedtls_entropy_free(&entropy); in main()
A Drsa_sign_pss.c43 mbedtls_entropy_context entropy; in main() local
51 mbedtls_entropy_init(&entropy); in main()
77 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
152 mbedtls_entropy_free(&entropy); in main()
A Ddh_genprime.c50 mbedtls_entropy_context entropy; in main() local
60 mbedtls_entropy_init(&entropy); in main()
95 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
156 mbedtls_entropy_free(&entropy); in main()
A Decdh_curve25519.c37 mbedtls_entropy_context entropy; in main() local
61 mbedtls_entropy_init(&entropy); in main()
63 &entropy, in main()
184 mbedtls_entropy_free(&entropy); in main()
A Drsa_genkey.c45 mbedtls_entropy_context entropy; in main() local
61 mbedtls_entropy_init(&entropy); in main()
62 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
136 mbedtls_entropy_free(&entropy); in main()
/lib/mbedtls/external/mbedtls/programs/ssl/
A Dmini_client.c151 mbedtls_entropy_context entropy; in main() local
166 mbedtls_entropy_init(&entropy); in main()
176 if (mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
264 mbedtls_entropy_free(&entropy); in main()

Completed in 37 milliseconds

123