/openssl/crypto/bn/ |
H A D | bn_prime.pl | 32 my @primes = ( 2 ); 34 loop: while ($#primes < $num-1) { 38 for (my $i = 0; defined($primes[$i]) && $primes[$i] <= $s; $i++) { 39 next loop if ($p % $primes[$i]) == 0; 41 push(@primes, $p); 48 for (my $i = 0; $i <= $#primes; $i++) { 50 printf " %5d,", $primes[$i];
|
H A D | bn_prime.c | 306 BN_ULONG mod = BN_mod_word(w, primes[i]); in bn_is_prime_int() 310 return BN_is_word(w, primes[i]); in bn_is_prime_int() 493 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; in probable_prime() 503 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime() 519 && square(primes[i]) > BN_get_word(rnd) + delta) in probable_prime() 521 if (safe ? (mods[i] + delta) % primes[i] <= 1 in probable_prime() 522 : (mods[i] + delta) % primes[i] == 0) { in probable_prime() 553 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; in probable_prime_dh() 588 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime_dh() 601 if (safe ? (mods[i] + delta) % primes[i] <= 1 in probable_prime_dh() [all …]
|
H A D | bn_prime.h | 16 static const prime_t primes[2048] = { variable
|
/openssl/test/recipes/ |
H A D | 15-test_mp_rsa.t | 23 primes => '3', 28 primes => '4', 33 primes => '5', 56 my $primes = $param->{primes}; 58 my $name = ($evp ? "evp" : "") . "${bits}p${primes}"; 63 '-pkeyopt', "rsa_keygen_primes:$primes", 79 '-primes', $primes, $bits])), "genrsa $name");
|
/openssl/doc/internal/man3/ |
H A D | ossl_rsa_get0_all_params.pod | 12 int ossl_rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes, 15 int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, 21 ossl_rsa_set0_all_params() sets all primes, CRT exponents and CRT coefficients 22 in the B<RSA> object I<r> to the contents of the stacks of BIGNUMs I<primes>, 26 ossl_rsa_get0_all_params() gets all primes, CRT exponents and CRT coefficients 28 I<primes>, I<exps> and I<coeffs>. The B<RSA> object retains ownership of the 39 the I<primes> stack contains I<p>, I<q>, and then the rest of the primes 54 The number of primes must always be equal to the number of exponents, and 55 the number of coefficients must be one less than the number of primes.
|
/openssl/crypto/rsa/ |
H A D | rsa_gen.c | 65 if (primes == 2) in RSA_generate_multi_prime_key() 288 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) { in rsa_multiprime_keygen() 316 quo = bits / primes; in rsa_multiprime_keygen() 317 rmd = bits % primes; in rsa_multiprime_keygen() 319 for (i = 0; i < primes; i++) in rsa_multiprime_keygen() 353 for (i = 2; i < primes; i++) { in rsa_multiprime_keygen() 365 for (i = 0; i < primes; i++) { in rsa_multiprime_keygen() 483 if (primes > 4) { in rsa_multiprime_keygen() 540 for (i = 2; i < primes; i++) { in rsa_multiprime_keygen() 573 for (i = 2; i < primes; i++) { in rsa_multiprime_keygen() [all …]
|
H A D | rsa_lib.c | 513 pinfo->r = primes[i]; in RSA_set0_multi_prime_params() 598 primes[i] = pinfo->r; in RSA_get0_multi_prime_factors() 768 pnum = sk_BIGNUM_num(primes); in DEFINE_STACK_OF() 775 sk_BIGNUM_value(primes, 1))) in DEFINE_STACK_OF() 786 sk_BIGNUM_delete(primes, 0); in DEFINE_STACK_OF() 787 sk_BIGNUM_delete(primes, 0); in DEFINE_STACK_OF() 816 BIGNUM *prime = sk_BIGNUM_pop(primes); in DEFINE_STACK_OF() 890 sk_BIGNUM_const_push(primes, RSA_get0_p(r)); in DEFINE_SPECIAL_STACK_OF_CONST() 891 sk_BIGNUM_const_push(primes, RSA_get0_q(r)); in DEFINE_SPECIAL_STACK_OF_CONST() 900 sk_BIGNUM_const_push(primes, pinfo->r); in DEFINE_SPECIAL_STACK_OF_CONST() [all …]
|
H A D | rsa_local.h | 146 int (*rsa_multi_prime_keygen) (RSA *rsa, int bits, int primes, 153 int ossl_rsa_multiprime_derive(RSA *rsa, int bits, int primes,
|
H A D | rsa_meth.c | 277 (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb) in RSA_meth_get_multi_prime_keygen() 284 int primes, BIGNUM *e, in RSA_meth_set_multi_prime_keygen() argument
|
H A D | rsa_pmeth.c | 37 int primes; member 69 rctx->primes = RSA_DEFAULT_PRIME_NUM; in pkey_rsa_init() 540 rctx->primes = p1; in pkey_rsa_ctrl() 807 ret = RSA_generate_multi_prime_key(rsa, rctx->nbits, rctx->primes, in pkey_rsa_keygen()
|
/openssl/test/ |
H A D | rsa_mp_test.c | 202 STACK_OF(BIGNUM) *primes = NULL, *exps = NULL, *coeffs = NULL; in key2048p3_v2() 206 if (!TEST_ptr(primes = sk_BIGNUM_new_null()) in key2048p3_v2() 212 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0) in key2048p3_v2() 214 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0) in key2048p3_v2() 216 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0)) in key2048p3_v2() 233 if (!TEST_true(ossl_rsa_set0_all_params(key, primes, exps, coeffs))) in key2048p3_v2() 237 sk_BIGNUM_free(primes); in key2048p3_v2() 242 sk_BIGNUM_pop_free(primes, BN_free); in key2048p3_v2() 245 primes = exps = coeffs = NULL; in key2048p3_v2()
|
H A D | bn_internal_test.c | 77 prime_t p = primes[i]; in test_bn_small_factors()
|
/openssl/doc/man3/ |
H A D | RSA_generate_key.pod | 20 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); 41 it in the B<RSA> structure provided in I<rsa>. The number of primes is given by 42 the I<primes> parameter. 46 The modulus size will be of length I<bits>, the number of primes to form the 47 modulus will be I<primes>, and the public exponent will be I<e>. Key sizes 52 I<primes> depends on modulus bit length: 86 The process is then repeated for prime q and other primes (if any)
|
H A D | RSA_get0_key.pod | 46 int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]); 49 int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], 100 can be used to obtain other primes and related CRT parameters. The 156 RSA_get_multi_prime_extra_count() returns two less than the number of primes 157 in use, which is 0 for traditional RSA and the number of extra primes for
|
H A D | DSA_generate_parameters.pod | 34 DSA_generate_parameters_ex() generates primes p and q and a generator g 41 If B<seed> is NULL, the primes will be generated at random.
|
/openssl/doc/man7/ |
H A D | EVP_PKEY-RSA.pod | 121 =item "primes" (B<OSSL_PKEY_PARAM_RSA_PRIMES>) <unsigned integer> 123 The value should be the number of primes for the generated B<RSA> key. The 124 default is 2. It isn't permitted to specify a larger number of primes than 125 10. Additionally, the number of primes is limited by the length of the key 190 The auxiliary probable primes. 212 OpenSSL default provider allows testing of the validity of multi-primes. 253 unsigned int primes = 3; 262 params[1] = OSSL_PARAM_construct_uint("primes", &primes);
|
/openssl/apps/ |
H A D | genrsa.c | 85 int ret = 1, num = DEFBITS, private = 0, primes = DEFPRIMES; in genrsa_main() local 137 primes = opt_int_arg(); in genrsa_main() 202 if (EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) <= 0) { in genrsa_main()
|
/openssl/doc/man1/ |
H A D | openssl-genrsa.pod.in | 29 [B<-primes> I<num>] 71 =item B<-primes> I<num> 73 Specify the number of primes to use while generating the RSA key. The I<num> 115 may vary somewhat. But in general, more primes lead to less generation time
|
H A D | openssl-prime.pod.in | 25 be used to generate primes according to the requirements specified by the
|
H A D | openssl-speed.pod.in | 25 [B<-primes> I<num>] 111 =item B<-primes> I<num>
|
/openssl/include/openssl/ |
H A D | rsa.h | 130 int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes); 224 BIGNUM *primes[], 235 const BIGNUM *primes[]); 275 int primes, BIGNUM *e, 602 int primes, 608 int primes, BIGNUM *e,
|
/openssl/test/recipes/30-test_evp_pkey_provided/ |
H A D | RSA.priv.txt | 1 Private-Key: (32 bit, 2 primes)
|
/openssl/demos/pkey/ |
H A D | EVP_PKEY_RSA_keygen.c | 39 unsigned int primes = 2; in generate_rsa_key_long() local 71 if (EVP_PKEY_CTX_set_rsa_keygen_primes(genctx, primes) <= 0) { in generate_rsa_key_long()
|
/openssl/include/crypto/ |
H A D | rsa.h | 65 int ossl_rsa_set0_all_params(RSA *r, STACK_OF(BIGNUM) *primes, 68 int ossl_rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes,
|
/openssl/providers/implementations/keymgmt/ |
H A D | rsa_kmgmt.c | 424 size_t primes; member 469 gctx->primes = RSA_DEFAULT_PRIME_NUM; in gen_init() 520 && !OSSL_PARAM_get_size_t(p, &gctx->primes)) in rsa_gen_set_params() 620 (int)gctx->nbits, (int)gctx->primes, in rsa_gen()
|