/openssl-master/crypto/bn/ |
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];
|
A D | bn_prime.c | 297 BN_ULONG mod = BN_mod_word(w, primes[i]); in bn_is_prime_int() 301 return BN_is_word(w, primes[i]); in bn_is_prime_int() 483 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; in probable_prime() 493 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime() 509 && square(primes[i]) > BN_get_word(rnd) + delta) in probable_prime() 511 if (safe ? (mods[i] + delta) % primes[i] <= 1 in probable_prime() 512 : (mods[i] + delta) % primes[i] == 0) { in probable_prime() 543 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; in probable_prime_dh() 578 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime_dh() 591 if (safe ? (mods[i] + delta) % primes[i] <= 1 in probable_prime_dh() [all …]
|
A D | bn_prime.h | 16 static const prime_t primes[2048] = { variable
|
/openssl-master/test/recipes/ |
A D | 15-test_mp_rsa.t | 23 primes => '3', 28 primes => '4', 33 primes => '5', 53 my $primes = $param->{primes}; 55 my $name = ($evp ? "evp" : "") . "${bits}p${primes}"; 60 '-pkeyopt', "rsa_keygen_primes:$primes", 76 '-primes', $primes, $bits])), "genrsa $name");
|
/openssl-master/crypto/rsa/ |
A D | rsa_gen.c | 65 if (primes == 2) in RSA_generate_multi_prime_key() 100 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) { in rsa_multiprime_keygen() 117 quo = bits / primes; in rsa_multiprime_keygen() 118 rmd = bits % primes; in rsa_multiprime_keygen() 120 for (i = 0; i < primes; i++) in rsa_multiprime_keygen() 163 for (i = 2; i < primes; i++) { in rsa_multiprime_keygen() 175 for (i = 0; i < primes; i++) { in rsa_multiprime_keygen() 287 if (primes > 4) { in rsa_multiprime_keygen() 332 for (i = 2; i < primes; i++) { in rsa_multiprime_keygen() 372 for (i = 2; i < primes; i++) { in rsa_multiprime_keygen() [all …]
|
A D | rsa_lib.c | 504 pinfo->r = primes[i]; in RSA_set0_multi_prime_params() 589 primes[i] = pinfo->r; in RSA_get0_multi_prime_factors() 752 if (primes == NULL || exps == NULL || coeffs == NULL) in DEFINE_STACK_OF() 755 pnum = sk_BIGNUM_num(primes); in DEFINE_STACK_OF() 761 if (!RSA_set0_factors(r, sk_BIGNUM_value(primes, 0), in DEFINE_STACK_OF() 762 sk_BIGNUM_value(primes, 1)) in DEFINE_STACK_OF() 781 BIGNUM *prime = sk_BIGNUM_value(primes, i); in DEFINE_STACK_OF() 857 sk_BIGNUM_const_push(primes, RSA_get0_p(r)); in DEFINE_SPECIAL_STACK_OF_CONST() 858 sk_BIGNUM_const_push(primes, RSA_get0_q(r)); in DEFINE_SPECIAL_STACK_OF_CONST() 867 sk_BIGNUM_const_push(primes, pinfo->r); in DEFINE_SPECIAL_STACK_OF_CONST() [all …]
|
A D | rsa_meth.c | 281 (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb) in RSA_meth_get_multi_prime_keygen() 288 int primes, BIGNUM *e, in RSA_meth_set_multi_prime_keygen() argument
|
A D | rsa_pmeth.c | 37 int primes; member 67 rctx->primes = RSA_DEFAULT_PRIME_NUM; in pkey_rsa_init() 513 rctx->primes = p1; in pkey_rsa_ctrl() 768 ret = RSA_generate_multi_prime_key(rsa, rctx->nbits, rctx->primes, in pkey_rsa_keygen()
|
/openssl-master/doc/internal/man3/ |
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-master/test/ |
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()
|
A D | bn_internal_test.c | 77 prime_t p = primes[i]; in test_bn_small_factors()
|
/openssl-master/doc/man3/ |
A D | RSA_generate_key.pod | 20 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); 39 it in the B<RSA> structure provided in I<rsa>. The number of primes is given by 40 the I<primes> parameter. 44 The modulus size will be of length I<bits>, the number of primes to form the 45 modulus will be I<primes>, and the public exponent will be I<e>. Key sizes 50 I<primes> depends on modulus bit length: 84 The process is then repeated for prime q and other primes (if any)
|
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
|
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.
|
A D | BN_generate_prime.pod | 8 BN_is_prime, BN_is_prime_fasttest - generate primes and test for primality 68 2^-648 for a 2048 bit prime, and lower than 2^-882 for primes larger 130 The test performed on B<p> are trial division by a number of small primes
|
/openssl-master/doc/man7/ |
A D | EVP_PKEY-RSA.pod | 118 =item "primes" (B<OSSL_PKEY_PARAM_RSA_PRIMES>) <unsigned integer> 120 The value should be the number of primes for the generated B<RSA> key. The 121 default is 2. It isn't permitted to specify a larger number of primes than 122 10. Additionally, the number of primes is limited by the length of the key 178 The auxiliary probable primes. 221 unsigned int primes = 3; 230 params[1] = OSSL_PARAM_construct_uint("primes", &primes);
|
/openssl-master/apps/ |
A D | genrsa.c | 86 int ret = 1, num = DEFBITS, private = 0, primes = DEFPRIMES; in genrsa_main() local 137 primes = opt_int_arg(); in genrsa_main() 200 if (EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) <= 0) { in genrsa_main()
|
/openssl-master/doc/man1/ |
A D | openssl-genrsa.pod.in | 29 [B<-primes> I<num>] 73 =item B<-primes> I<num> 75 Specify the number of primes to use while generating the RSA key. The I<num> 112 may vary somewhat. But in general, more primes lead to less generation time
|
A D | openssl-speed.pod.in | 22 [B<-primes> I<num>] 92 =item B<-primes> I<num>
|
A D | openssl-prime.pod.in | 25 be used to generate primes according to the requirements specified by the
|
/openssl-master/include/openssl/ |
A D | rsa.h | 127 int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes); 213 BIGNUM *primes[], 224 const BIGNUM *primes[]); 264 int primes, BIGNUM *e, 591 int primes, 597 int primes, BIGNUM *e,
|
/openssl-master/test/recipes/30-test_evp_pkey_provided/ |
A D | RSA.priv.txt | 1 Private-Key: (32 bit, 2 primes)
|
/openssl-master/include/crypto/ |
A D | rsa.h | 59 int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, 62 int ossl_rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes,
|
/openssl-master/providers/implementations/keymgmt/ |
A D | rsa_kmgmt.c | 395 size_t primes; member 442 gctx->primes = RSA_DEFAULT_PRIME_NUM; in gen_init() 486 && !OSSL_PARAM_get_size_t(p, &gctx->primes)) in rsa_gen_set_params() 586 (int)gctx->nbits, (int)gctx->primes, in rsa_gen()
|
/openssl-master/providers/implementations/encode_decode/ |
A D | encode_key2text.c | 642 int primes; in rsa_to_text() local 672 primes = sk_BIGNUM_const_num(factors); in rsa_to_text() 676 type_label, BN_num_bits(rsa_n), primes) <= 0) in rsa_to_text()
|