/openssl/crypto/bn/ |
H A D | bn_rand.c | 24 unsigned int strength, BN_CTX *ctx) in bnrand() argument 61 if (RAND_bytes_ex(libctx, &c, 1, strength) <= 0) in bnrand() 101 unsigned int strength, BN_CTX *ctx) in BN_rand_ex() argument 103 return bnrand(NORMAL, rnd, bits, top, bottom, strength, ctx); in BN_rand_ex() 118 unsigned int strength, BN_CTX *ctx) in BN_priv_rand_ex() argument 132 unsigned int strength, BN_CTX *ctx) in bnrand_range() argument 160 strength, ctx)) in bnrand_range() 188 strength, ctx)) in bnrand_range() 206 return bnrand_range(NORMAL, r, range, strength, ctx); in BN_rand_range_ex() 219 return bnrand_range(PRIVATE, r, range, strength, ctx); in BN_priv_rand_range_ex() [all …]
|
/openssl/providers/implementations/rands/ |
H A D | test_rng.c | 46 unsigned int strength; member 81 static int test_rng_instantiate(void *vtest, unsigned int strength, in test_rng_instantiate() argument 88 if (!test_rng_set_ctx_params(t, params) || strength > t->strength) in test_rng_instantiate() 128 unsigned int strength, int prediction_resistance, in test_rng_generate() argument 134 if (strength > t->strength) in test_rng_generate() 160 unsigned int strength, size_t min_noncelen, in test_rng_nonce() argument 166 if (strength > t->strength) in test_rng_nonce() 192 if (p != NULL && !OSSL_PARAM_set_int(p, t->strength)) in test_rng_get_ctx_params() 236 if (p != NULL && !OSSL_PARAM_get_uint(p, &t->strength)) in test_rng_set_ctx_params()
|
H A D | drbg.c | 175 drbg->strength, prediction_resistance, in ossl_drbg_get_seed() 213 if (drbg->strength > p_str) { in get_entropy() 238 bytes = drbg->parent_get_seed(drbg->parent, pout, drbg->strength, in get_entropy() 356 if (strength > drbg->strength) { in ossl_prov_drbg_instantiate() 360 min_entropy = drbg->strength; in ossl_prov_drbg_instantiate() 398 drbg->strength, in ossl_prov_drbg_instantiate() 414 min_entropy += drbg->strength / 2; in ossl_prov_drbg_instantiate() 562 entropylen = get_entropy(drbg, &entropy, drbg->strength, in ossl_prov_drbg_reseed_unlocked() 650 if (strength > drbg->strength) { in ossl_prov_drbg_generate() 847 if (drbg->strength > p_str) { in ossl_rand_drbg_new() [all …]
|
H A D | drbg_hmac.c | 141 static int drbg_hmac_instantiate_wrapper(void *vdrbg, unsigned int strength, in drbg_hmac_instantiate_wrapper() argument 156 ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance, in drbg_hmac_instantiate_wrapper() 258 unsigned char *out, size_t outlen, unsigned int strength, in drbg_hmac_generate_wrapper() argument 263 return ossl_prov_drbg_generate(drbg, out, outlen, strength, in drbg_hmac_generate_wrapper() 440 ctx->strength = 64 * (int)(hmac->blocklen >> 3); in drbg_hmac_set_ctx_params_locked() 441 if (ctx->strength > 256) in drbg_hmac_set_ctx_params_locked() 442 ctx->strength = 256; in drbg_hmac_set_ctx_params_locked() 444 ctx->min_entropylen = ctx->strength / 8; in drbg_hmac_set_ctx_params_locked()
|
H A D | drbg_hash.c | 268 static int drbg_hash_instantiate_wrapper(void *vdrbg, unsigned int strength, in drbg_hash_instantiate_wrapper() argument 283 ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance, in drbg_hash_instantiate_wrapper() 364 (void *vdrbg, unsigned char *out, size_t outlen, unsigned int strength, in drbg_hash_generate_wrapper() argument 369 return ossl_prov_drbg_generate(drbg, out, outlen, strength, in drbg_hash_generate_wrapper() 533 ctx->strength = 64 * (hash->blocklen >> 3); in drbg_hash_set_ctx_params_locked() 534 if (ctx->strength > 256) in drbg_hash_set_ctx_params_locked() 535 ctx->strength = 256; in drbg_hash_set_ctx_params_locked() 541 ctx->min_entropylen = ctx->strength / 8; in drbg_hash_set_ctx_params_locked()
|
H A D | drbg_local.h | 123 unsigned int strength; member 192 int ossl_prov_drbg_instantiate(PROV_DRBG *drbg, unsigned int strength, 203 unsigned int strength, int prediction_resistance,
|
H A D | seed_src.c | 69 static int seed_src_instantiate(void *vseed, unsigned int strength, in seed_src_instantiate() argument 89 unsigned int strength, in seed_src_generate() argument 105 pool = ossl_rand_pool_new(strength, 1, outlen, outlen); in seed_src_generate()
|
H A D | seed_src_jitter.c | 146 static int jitter_instantiate(void *vseed, unsigned int strength, in jitter_instantiate() argument 175 unsigned int strength, in jitter_generate() argument 191 pool = ossl_rand_pool_new(strength, 1, outlen, outlen); in jitter_generate()
|
/openssl/doc/man7/ |
H A D | EVP_RAND-SEED-SRC.pod | 29 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 50 unsigned int strength = 128; 55 EVP_RAND_instantiate(seed, strength, 0, NULL, 0, NULL); 67 EVP_RAND_instantiate(rctx, strength, 0, NULL, 0, params); 69 EVP_RAND_generate(rctx, bytes, sizeof(bytes), strength, 0, NULL, 0);
|
H A D | EVP_RAND-JITTER.pod | 32 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 64 unsigned int strength = 128; 69 EVP_RAND_instantiate(seed, strength, 0, NULL, 0, NULL); 81 EVP_RAND_instantiate(rctx, strength, 0, NULL, 0, params); 83 EVP_RAND_generate(rctx, bytes, sizeof(bytes), strength, 0, NULL, 0);
|
H A D | EVP_RAND-TEST-RAND.pod | 29 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 89 unsigned int strength = 48; 95 *p++ = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, &strength); 101 EVP_RAND_instantiate(rctx, strength, 0, NULL, 0, params); 103 EVP_RAND_generate(rctx, bytes, sizeof(bytes), strength, 0, NULL, 0);
|
H A D | EVP_RAND-CTR-DRBG.pod | 25 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 74 unsigned int strength = 128; 83 EVP_RAND_instantiate(rctx, strength, 0, NULL, 0, params); 85 EVP_RAND_generate(rctx, bytes, sizeof(bytes), strength, 0, NULL, 0);
|
H A D | EVP_RAND-HASH-DRBG.pod | 25 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 92 unsigned int strength = 128; 100 EVP_RAND_instantiate(rctx, strength, 0, NULL, 0, params); 102 EVP_RAND_generate(rctx, bytes, sizeof(bytes), strength, 0, NULL, 0);
|
H A D | EVP_RAND-HMAC-DRBG.pod | 25 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 93 unsigned int strength = 128; 102 EVP_RAND_instantiate(rctx, strength, 0, NULL, 0, params); 104 EVP_RAND_generate(rctx, bytes, sizeof(bytes), strength, 0, NULL, 0);
|
H A D | provider-rand.pod | 27 int OSSL_FUNC_rand_instantiate(void *ctx, unsigned int strength, 33 unsigned int strength, int prediction_resistance, 41 int strength, size_t min_noncelen, 99 security I<strength>. In addition, I<prediction_resistance> can be requested. 110 I<out>. The generated bytes will meet the specified security I<strength> and, 117 OSSL_FUNC_rand_nonce() is used to generate a nonce of the given I<strength> with a 190 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 192 Returns the bit strength of the random number generator.
|
/openssl/doc/man3/ |
H A D | BN_rand.pod | 15 unsigned int strength, BN_CTX *ctx); 19 unsigned int strength, BN_CTX *ctx); 22 int BN_rand_range_ex(BIGNUM *rnd, const BIGNUM *range, unsigned int strength, 26 int BN_priv_rand_range_ex(BIGNUM *rnd, const BIGNUM *range, unsigned int strength, 40 number of I<bits> in length and security strength at least I<strength> bits 62 number I<rnd>, of security strength at least I<strength> bits,
|
H A D | RAND_bytes.pod | 16 unsigned int strength); 18 unsigned int strength); 39 RAND_priv_bytes() except that they both take additional I<strength> and 40 I<ctx> parameters. The bytes generated will have a security strength of at 41 least I<strength> bits.
|
H A D | EVP_RAND.pod | 54 int EVP_RAND_instantiate(EVP_RAND_CTX *ctx, unsigned int strength, 60 unsigned int strength, int prediction_resistance, 131 then instantiates the RAND I<ctx> with a minimum security strength 132 of <strength> and personalisation string I<pstr> of length <pstr_len>. 142 produced will meet the security I<strength>. 210 EVP_RAND_get_strength() returns the security strength of the RAND I<ctx>. 266 =item "strength" (B<OSSL_RAND_PARAM_STRENGTH>) <unsigned integer> 268 Returns the bit strength of the random number generator. 390 EVP_RAND_get_strength() returns the strength of the random number generator
|
/openssl/providers/fips/ |
H A D | self_test_kats.c | 264 unsigned int strength = 256; in self_test_drbg() local 282 &strength); in self_test_drbg() 295 strength = EVP_RAND_get_strength(drbg); in self_test_drbg() 312 if (!EVP_RAND_instantiate(test, strength, 0, NULL, 0, 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() 661 unsigned int strength = 256; in set_kat_drbg() local 681 &strength); in set_kat_drbg() 753 unsigned int strength = 256, generate = 1; in setup_main_random() local [all …]
|
/openssl/crypto/evp/ |
H A D | evp_rand.c | 514 (EVP_RAND_CTX *ctx, unsigned int strength, int prediction_resistance, in evp_rand_instantiate_locked() argument 517 return ctx->meth->instantiate(ctx->algctx, strength, prediction_resistance, in evp_rand_instantiate_locked() 521 int EVP_RAND_instantiate(EVP_RAND_CTX *ctx, unsigned int strength, in EVP_RAND_instantiate() argument 530 res = evp_rand_instantiate_locked(ctx, strength, prediction_resistance, in EVP_RAND_instantiate() 553 size_t outlen, unsigned int strength, in evp_rand_generate_locked() argument 570 if (!ctx->meth->generate(ctx->algctx, out, chunk, strength, in evp_rand_generate_locked() 585 unsigned int strength, int prediction_resistance, in EVP_RAND_generate() argument 592 res = evp_rand_generate_locked(ctx, out, outlen, strength, in EVP_RAND_generate() 625 unsigned int strength = 0; in evp_rand_strength_locked() local 627 params[0] = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, &strength); in evp_rand_strength_locked() [all …]
|
/openssl/providers/common/ |
H A D | securitycheck.c | 127 int strength = EC_GROUP_order_bits(group) / 2; in ossl_ec_check_security_strength() local 129 if (strength < 80) in ossl_ec_check_security_strength() 135 if (protect && strength < OSSL_FIPS_MIN_SECURITY_STRENGTH_BITS) in ossl_ec_check_security_strength()
|
/openssl/ssl/ |
H A D | tls_srp.c | 47 ctx->srp_ctx.strength = SRP_MINIMAL_N; in ssl_ctx_srp_ctx_free_intern() 75 s->srp_ctx.strength = SRP_MINIMAL_N; in ssl_srp_ctx_free_intern() 111 s->srp_ctx.strength = ctx->srp_ctx.strength; in ssl_srp_ctx_init_intern() 178 ctx->srp_ctx.strength = SRP_MINIMAL_N; in ssl_ctx_srp_ctx_init_intern() 423 if (BN_num_bits(srp->N) < srp->strength) { in srp_verify_server_param() 534 int SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength) in SSL_CTX_set_srp_strength() argument 536 return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH, strength, in SSL_CTX_set_srp_strength()
|
/openssl/include/openssl/ |
H A D | rand.h | 69 unsigned int strength); 76 unsigned int strength);
|
/openssl/fuzz/ |
H A D | fuzz_rand.c | 41 ossl_unused unsigned int strength, in fuzz_rand_instantiate() argument 59 ossl_unused unsigned int strength, in fuzz_rand_generate() argument
|
/openssl/test/ |
H A D | provfetchtest.c | 99 static int dummy_rand_instantiate(void *vdrbg, unsigned int strength, in dummy_rand_instantiate() argument 113 unsigned int strength, int prediction_resistance, in dummy_rand_generate() argument
|