Home
last modified time | relevance | path

Searched refs:drbg (Results 1 – 23 of 23) sorted by relevance

/openssl/providers/implementations/rands/
H A Ddrbg.c238 bytes = drbg->parent_get_seed(drbg->parent, pout, drbg->strength, in get_entropy()
252 drbg->parent_clear_seed(drbg->parent, out, outlen); in cleanup_entropy()
315 if (drbg->parent != NULL && drbg->parent_nonce != NULL) { in prov_drbg_get_nonce()
316 n = drbg->parent_nonce(drbg->parent, NULL, 0, drbg->min_noncelen, in prov_drbg_get_nonce()
319 ret = drbg->parent_nonce(drbg->parent, buf, 0, in prov_drbg_get_nonce()
331 data.drbg = drbg; in prov_drbg_get_nonce()
385 noncelen = drbg->parent_nonce(drbg->parent, NULL, drbg->strength, in ossl_prov_drbg_instantiate()
546 if (!drbg->reseed(drbg, NULL, 0, ent, ent_len)) { in ossl_prov_drbg_reseed_unlocked()
732 drbg->uninstantiate(drbg); in rand_drbg_restart()
759 if (drbg != NULL && drbg->lock == NULL) { in ossl_drbg_enable_locking()
[all …]
H A Ddrbg_hash.c154 assert(drbg->seedlen >= 1 && inlen >= 1 && inlen <= drbg->seedlen); in add_bytes()
265 && hash_df1(drbg, hash->C, 0x00, hash->V, drbg->seedlen); in drbg_hash_instantiate()
277 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hash_instantiate_wrapper()
307 if (!hash_df(drbg, hash->C, 0x01, hash->V, drbg->seedlen, ent, ent_len, in drbg_hash_reseed()
312 return hash_df1(drbg, hash->C, 0x00, hash->V, drbg->seedlen); in drbg_hash_reseed()
358 && add_bytes(drbg, hash->V, hash->C, drbg->seedlen) in drbg_hash_generate()
388 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hash_uninstantiate_wrapper()
405 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hash_verify_zeroization()
455 if (drbg != NULL && (hash = (PROV_DRBG_HASH *)drbg->data) != NULL) { in drbg_hash_free()
477 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hash_get_ctx_params()
[all …]
H A Ddrbg_hmac.c150 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hmac_instantiate_wrapper()
159 if (drbg->lock != NULL) in drbg_hmac_instantiate_wrapper()
281 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hmac_uninstantiate_wrapper()
286 if (drbg->lock != NULL) in drbg_hmac_uninstantiate_wrapper()
298 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hmac_verify_zeroization()
306 if (drbg->lock != NULL) in drbg_hmac_verify_zeroization()
321 drbg->data = hmac; in drbg_hmac_new()
347 if (drbg != NULL && (hmac = (PROV_DRBG_HMAC *)drbg->data) != NULL) { in drbg_hmac_free()
370 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hmac_get_ctx_params()
391 if (drbg->lock != NULL) in drbg_hmac_get_ctx_params()
[all …]
H A Ddrbg_ctr.c337 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_ctr_instantiate_wrapper()
346 if (drbg->lock != NULL) in drbg_ctr_instantiate_wrapper()
490 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_ctr_uninstantiate_wrapper()
495 if (drbg->lock != NULL) in drbg_ctr_uninstantiate_wrapper()
507 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_ctr_verify_zeroization()
519 if (drbg->lock != NULL) in drbg_ctr_verify_zeroization()
541 drbg->min_noncelen = drbg->min_entropylen / 2; in drbg_ctr_init_lengths()
627 drbg->data = ctr; in drbg_ctr_new()
646 if (drbg != NULL && (ctr = (PROV_DRBG_CTR *)drbg->data) != NULL) { in drbg_ctr_free()
671 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_ctr_get_ctx_params()
[all …]
H A Ddrbg_local.h74 int (*instantiate)(PROV_DRBG *drbg,
79 int (*reseed)(PROV_DRBG *drbg, const unsigned char *ent, size_t ent_len,
181 int (*instantiate)(PROV_DRBG *drbg,
190 void ossl_rand_drbg_free(PROV_DRBG *drbg);
192 int ossl_prov_drbg_instantiate(PROV_DRBG *drbg, unsigned int strength,
196 int ossl_prov_drbg_uninstantiate(PROV_DRBG *drbg);
198 int ossl_prov_drbg_reseed(PROV_DRBG *drbg, int prediction_resistance,
226 int ossl_drbg_get_ctx_params(PROV_DRBG *drbg, OSSL_PARAM params[]);
229 int ossl_drbg_set_ctx_params(PROV_DRBG *drbg, const OSSL_PARAM params[]);
251 size_t ossl_crngt_get_entropy(PROV_DRBG *drbg,
[all …]
H A Dbuild.info5 SOURCE[$RANDS_GOAL]=drbg.c test_rng.c drbg_ctr.c drbg_hash.c drbg_hmac.c
/openssl/crypto/rand/
H A Drand_meth.c17 EVP_RAND_CTX *drbg = RAND_get0_primary(NULL); in drbg_add() local
19 if (drbg == NULL || num <= 0) in drbg_add()
22 return EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); in drbg_add()
34 EVP_RAND_CTX *drbg = RAND_get0_primary(NULL); in drbg_status() local
36 if (drbg == NULL) in drbg_status()
39 return EVP_RAND_get_state(drbg) == EVP_RAND_STATE_READY ? 1 : 0; in drbg_status()
45 EVP_RAND_CTX *drbg = RAND_get0_public(NULL); in drbg_bytes() local
47 if (drbg == NULL) in drbg_bytes()
50 return EVP_RAND_generate(drbg, out, count, 0, 0, NULL, 0); in drbg_bytes()
H A Drand_lib.c260 EVP_RAND_CTX *drbg; in RAND_seed() local
270 drbg = RAND_get0_primary(NULL); in RAND_seed()
271 if (drbg != NULL && num > 0) in RAND_seed()
272 EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); in RAND_seed()
277 EVP_RAND_CTX *drbg; in RAND_add() local
286 drbg = RAND_get0_primary(NULL); in RAND_add()
287 if (drbg != NULL && num > 0) in RAND_add()
290 EVP_RAND_reseed(drbg, 0, buf, num, NULL, 0); in RAND_add()
293 EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); in RAND_add()
988 int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq, in RAND_set_DRBG_type() argument
[all …]
/openssl/providers/implementations/kdfs/
H A Dhmacdrbg_kdf.c59 PROV_DRBG_HMAC *drbg = &ctx->base; in hmac_drbg_kdf_reset() local
62 EVP_MAC_CTX_free(drbg->ctx); in hmac_drbg_kdf_reset()
63 ossl_prov_digest_reset(&drbg->digest); in hmac_drbg_kdf_reset()
120 PROV_DRBG_HMAC *drbg = &ctx->base; in hmac_drbg_kdf_derive() local
136 return ossl_drbg_hmac_generate(drbg, out, outlen, NULL, 0); in hmac_drbg_kdf_derive()
142 PROV_DRBG_HMAC *drbg = &hmac->base; in hmac_drbg_kdf_get_ctx_params() local
149 if (drbg->ctx == NULL) in hmac_drbg_kdf_get_ctx_params()
158 md = ossl_prov_digest_md(&drbg->digest); in hmac_drbg_kdf_get_ctx_params()
180 PROV_DRBG_HMAC *drbg = &hmac->base; in hmac_drbg_kdf_set_ctx_params() local
218 md = ossl_prov_digest_md(&drbg->digest); in hmac_drbg_kdf_set_ctx_params()
[all …]
/openssl/test/
H A Ddrbgtest.c54 if (drbg != NULL) in gen_bytes()
76 static int state(EVP_RAND_CTX *drbg) in state() argument
78 return EVP_RAND_get_state(drbg); in state()
101 return (PROV_DRBG *)drbg->algctx; in DRBG_UINT()
106 PROV_DRBG *p = prov_rand(drbg); in set_reseed_counter()
113 set_reseed_counter(drbg, reseed_counter(drbg) + 1); in inc_reseed_counter()
154 static int disable_crngt(EVP_RAND_CTX *drbg) in disable_crngt() argument
786 EVP_RAND_CTX *drbg = NULL; in new_drbg() local
795 EVP_RAND_CTX_free(drbg); in new_drbg()
796 drbg = NULL; in new_drbg()
[all …]
/openssl/test/recipes/
H A D20-test_rand_config.t19 { drbg => 'HASH-DRBG',
25 { drbg => 'HASH-DRBG',
31 { drbg => 'HMAC-DRBG',
45 { drbg => 'CTR-DRBG',
51 { drbg => 'CTR-DRBG',
75 if ($_->{drbg}) {
/openssl/crypto/
H A Dcontext.c31 void *drbg; member
113 ctx->drbg = ossl_rand_ctx_new(ctx); in context_init()
114 if (ctx->drbg == NULL) in context_init()
235 if (ctx->drbg != NULL) { in context_deinit_objs()
236 ossl_rand_ctx_free(ctx->drbg); in context_deinit_objs()
237 ctx->drbg = NULL; in context_deinit_objs()
527 if (default_context_int.drbg != NULL) { in ossl_release_default_drbg_ctx()
528 ossl_rand_ctx_free(default_context_int.drbg); in ossl_release_default_drbg_ctx()
529 default_context_int.drbg = NULL; in ossl_release_default_drbg_ctx()
581 return ctx->drbg; in ossl_lib_ctx_get_data()
/openssl/providers/fips/
H A Dself_test_kats.c263 EVP_RAND_CTX *test = NULL, *drbg = NULL; in self_test_drbg() local
290 drbg = EVP_RAND_CTX_new(rand, test); in self_test_drbg()
292 if (drbg == NULL) in self_test_drbg()
295 strength = EVP_RAND_get_strength(drbg); in self_test_drbg()
302 if (!EVP_RAND_CTX_set_params(drbg, drbg_params)) in self_test_drbg()
314 if (!EVP_RAND_instantiate(drbg, strength, 0, t->persstr, t->persstrlen, in self_test_drbg()
325 if (!EVP_RAND_generate(drbg, out, t->expectedlen, strength, in self_test_drbg()
341 if (!EVP_RAND_generate(drbg, out, t->expectedlen, strength, in self_test_drbg()
351 if (!EVP_RAND_uninstantiate(drbg)) in self_test_drbg()
357 if (!EVP_RAND_verify_zeroization(drbg)) in self_test_drbg()
[all …]
H A Dself_test_data.inc666 * https://csrc.nist.rip/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
/openssl/providers/implementations/include/prov/
H A Dhmac_drbg.h25 int ossl_drbg_hmac_init(PROV_DRBG_HMAC *drbg,
/openssl/doc/man3/
H A DRAND_set_DRBG_type.pod13 int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
21 used within the library context I<ctx>. A generator of name I<drbg>
/openssl/include/openssl/
H A Drand.h88 int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
/openssl/crypto/err/
H A Dopenssl.txt1047 PROV_R_ERROR_INSTANTIATING_DRBG:188:error instantiating drbg
1066 PROV_R_INSUFFICIENT_DRBG_STRENGTH:181:insufficient drbg strength
1144 PROV_R_REQUEST_TOO_LARGE_FOR_DRBG:196:request too large for drbg
1179 RAND_R_DRBG_ALREADY_INITIALIZED:129:drbg already initialized
1180 RAND_R_DRBG_NOT_INITIALISED:104:drbg not initialised
1184 RAND_R_ERROR_INITIALISING_DRBG:107:error initialising drbg
1185 RAND_R_ERROR_INSTANTIATING_DRBG:108:error instantiating drbg
1213 RAND_R_UNABLE_TO_CREATE_DRBG:143:unable to create drbg
1214 RAND_R_UNABLE_TO_FETCH_DRBG:144:unable to fetch drbg
1219 RAND_R_UNSUPPORTED_DRBG_FLAGS:132:unsupported drbg flags
[all …]
/openssl/apps/
H A Dlist.c432 static void display_random(const char *name, EVP_RAND_CTX *drbg) in display_random() argument
442 if (drbg != NULL) { in display_random()
443 rand = EVP_RAND_CTX_get0_rand(drbg); in display_random()
449 switch (EVP_RAND_get_state(drbg)) { in display_random()
487 if (EVP_RAND_CTX_get_params(drbg, params)) in display_random()
/openssl/doc/man5/
H A Dfips_config.pod105 =item B<drbg-no-trunc-md>
/openssl/providers/
H A Dfips.module.sources653 providers/implementations/rands/drbg.c
H A Dfips-sources.checksums653 …13d5704700c8ed8858b6d4d0f437e9a20e5ac6e680254bc661c3cd5d72b providers/implementations/rands/drbg.c
/openssl/test/recipes/30-test_evp_data/
H A Devprand.txt32 …v/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/drbg/drbgtestvectors.zip

Completed in 313 milliseconds