Home
last modified time | relevance | path

Searched refs:primes (Results 1 – 25 of 37) sorted by relevance

12

/openssl-master/crypto/bn/
A Dbn_prime.pl32 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 Dbn_prime.c297 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 Dbn_prime.h16 static const prime_t primes[2048] = { variable
/openssl-master/test/recipes/
A D15-test_mp_rsa.t23 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 Drsa_gen.c65 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 Drsa_lib.c504 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 Drsa_meth.c281 (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 Drsa_pmeth.c37 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 Dossl_rsa_get0_all_params.pod12 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 Drsa_mp_test.c202 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 Dbn_internal_test.c77 prime_t p = primes[i]; in test_bn_small_factors()
/openssl-master/doc/man3/
A DRSA_generate_key.pod20 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 DRSA_get0_key.pod46 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 DDSA_generate_parameters.pod34 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 DBN_generate_prime.pod8 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 DEVP_PKEY-RSA.pod118 =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 Dgenrsa.c86 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 Dopenssl-genrsa.pod.in29 [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 Dopenssl-speed.pod.in22 [B<-primes> I<num>]
92 =item B<-primes> I<num>
A Dopenssl-prime.pod.in25 be used to generate primes according to the requirements specified by the
/openssl-master/include/openssl/
A Drsa.h127 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 DRSA.priv.txt1 Private-Key: (32 bit, 2 primes)
/openssl-master/include/crypto/
A Drsa.h59 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 Drsa_kmgmt.c395 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 Dencode_key2text.c642 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()

Completed in 35 milliseconds

12