Home
last modified time | relevance | path

Searched refs:primes (Results 1 - 25 of 45) sorted by relevance

12

/third_party/node/deps/openssl/openssl/crypto/rsa/
H A Drsa_gen.c31 static int rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes,
50 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, in RSA_generate_multi_prime_key() argument
56 return rsa->meth->rsa_multi_prime_keygen(rsa, bits, primes, in RSA_generate_multi_prime_key()
65 if (primes == 2) in RSA_generate_multi_prime_key()
71 return rsa_keygen(rsa->libctx, rsa, bits, primes, e_value, cb, 0); in RSA_generate_multi_prime_key()
75 static int rsa_multiprime_keygen(RSA *rsa, int bits, int primes, in rsa_multiprime_keygen() argument
100 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) { in rsa_multiprime_keygen()
116 /* divide bits into 'primes' pieces evenly */ in rsa_multiprime_keygen()
117 quo = bits / primes; in rsa_multiprime_keygen()
424 rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes, BIGNUM *e_value, BN_GENCB *cb, int pairwise_test) rsa_keygen() argument
[all...]
H A Drsa_lib.c479 int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], in RSA_set0_multi_prime_params() argument
486 if (primes == NULL || exps == NULL || coeffs == NULL || pnum == 0) in RSA_set0_multi_prime_params()
500 if (primes[i] != NULL && exps[i] != NULL && coeffs[i] != NULL) { in RSA_set0_multi_prime_params()
504 pinfo->r = primes[i]; in RSA_set0_multi_prime_params()
575 int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]) in RSA_get0_multi_prime_factors() argument
584 * return other primes in RSA_get0_multi_prime_factors()
589 primes[i] = pinfo->r; in RSA_get0_multi_prime_factors()
617 /* return other primes */ in RSA_get0_multi_prime_crt_params()
743 int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, in DEFINE_STACK_OF()
752 if (primes in DEFINE_STACK_OF()
1283 EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes) EVP_PKEY_CTX_set_rsa_keygen_primes() argument
[all...]
/third_party/openssl/crypto/rsa/
H A Drsa_gen.c31 static int rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes,
50 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, in RSA_generate_multi_prime_key() argument
56 return rsa->meth->rsa_multi_prime_keygen(rsa, bits, primes, in RSA_generate_multi_prime_key()
65 if (primes == 2) in RSA_generate_multi_prime_key()
71 return rsa_keygen(rsa->libctx, rsa, bits, primes, e_value, cb, 0); in RSA_generate_multi_prime_key()
75 static int rsa_multiprime_keygen(RSA *rsa, int bits, int primes, in rsa_multiprime_keygen() argument
100 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) { in rsa_multiprime_keygen()
116 /* divide bits into 'primes' pieces evenly */ in rsa_multiprime_keygen()
117 quo = bits / primes; in rsa_multiprime_keygen()
424 rsa_keygen(OSSL_LIB_CTX *libctx, RSA *rsa, int bits, int primes, BIGNUM *e_value, BN_GENCB *cb, int pairwise_test) rsa_keygen() argument
[all...]
H A Drsa_lib.c479 int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], in RSA_set0_multi_prime_params() argument
486 if (primes == NULL || exps == NULL || coeffs == NULL || pnum == 0) in RSA_set0_multi_prime_params()
500 if (primes[i] != NULL && exps[i] != NULL && coeffs[i] != NULL) { in RSA_set0_multi_prime_params()
504 pinfo->r = primes[i]; in RSA_set0_multi_prime_params()
575 int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]) in RSA_get0_multi_prime_factors() argument
584 * return other primes in RSA_get0_multi_prime_factors()
589 primes[i] = pinfo->r; in RSA_get0_multi_prime_factors()
617 /* return other primes */ in RSA_get0_multi_prime_crt_params()
743 int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, in DEFINE_STACK_OF()
752 if (primes in DEFINE_STACK_OF()
1261 EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes) EVP_PKEY_CTX_set_rsa_keygen_primes() argument
[all...]
/third_party/node/deps/openssl/openssl/crypto/bn/
H 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);
47 printf "static const prime_t primes[%d] = {", $num;
48 for (my $i = 0; $i <= $#primes; $i++) {
50 printf " %5d,", $primes[$i];
H A Dbn_prime.c16 * The quick sieve algorithm approach to weeding out primes is Philip
40 * The product of the set of primes ranging from 3 to 751
140 * But the following two safe primes with less than 6 bits (11, 23) in BN_generate_prime_ex2()
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()
484 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; in probable_prime()
494 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime()
504 * gcd(rnd-1,primes) == 1 (except for 2) in probable_prime()
505 * do the second check only if we are interested in safe primes in probable_prime()
507 * we check only the primes u in probable_prime()
[all...]
H A Dbn_prime.h16 static const prime_t primes[2048] = { variable
/third_party/openssl/crypto/bn/
H 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);
47 printf "static const prime_t primes[%d] = {", $num;
48 for (my $i = 0; $i <= $#primes; $i++) {
50 printf " %5d,", $primes[$i];
H A Dbn_prime.c16 * The quick sieve algorithm approach to weeding out primes is Philip
40 * The product of the set of primes ranging from 3 to 751
140 * But the following two safe primes with less than 6 bits (11, 23) in BN_generate_prime_ex2()
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()
484 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; in probable_prime()
494 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime()
504 * gcd(rnd-1,primes) == 1 (except for 2) in probable_prime()
505 * do the second check only if we are interested in safe primes in probable_prime()
507 * we check only the primes u in probable_prime()
[all...]
H A Dbn_prime.h16 static const prime_t primes[2048] = { variable
/third_party/openssl/test/
H 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()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
H A DCalendarCache.java77 if (pIndex < primes.length - 1) { in rehash()
78 arraySize = primes[++pIndex]; in rehash()
111 static private final int primes[] = { // 5, 17, 31, 47, // for testing field in CalendarCache
118 private int arraySize = primes[pIndex];
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/
H A DCalendarCache.java79 if (pIndex < primes.length - 1) { in rehash()
80 arraySize = primes[++pIndex]; in rehash()
113 static private final int primes[] = { // 5, 17, 31, 47, // for testing field in CalendarCache
120 private int arraySize = primes[pIndex];
/third_party/skia/third_party/externals/swiftshader/third_party/marl/examples/
H A Dprimes.cpp27 // searchMax defines the upper limit on primes to find.
30 // searchChunkSize is the number of numbers searched, per task, for primes.
51 // Create a ticket queue. This will be used to ensure that the primes are in main()
63 // Find all the primes in [searchBase, searchBase+searchChunkSize-1]. in main()
65 std::vector<int> primes; in main()
68 primes.push_back(i); in main()
72 // Wait until the ticket is called. This ensures that the primes are in main()
77 // Print the primes. in main()
78 for (auto prime : primes) { in main()
82 // Call the next ticket so that those primes ca in main()
[all...]
/third_party/openssl/ohos_lite/include/openssl/
H A Drsa.h129 # define EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) \
131 EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES, primes, NULL)
207 int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[],
213 int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]);
242 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes,
503 (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb);
506 int primes, BIGNUM *e,
/third_party/mbedtls/library/
H A Drsa_alt_helpers.c64 const unsigned char primes[] = { 2, in mbedtls_rsa_deduce_primes() local
73 const size_t num_primes = sizeof(primes) / sizeof(*primes); in mbedtls_rsa_deduce_primes()
117 MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&K, primes[attempt])); in mbedtls_rsa_deduce_primes()
159 * we reached 1, or K holds primes[attempt]^(DE - 1) mod N, which must in mbedtls_rsa_deduce_primes()
/third_party/node/deps/openssl/openssl/apps/
H A Dgenrsa.c63 {"primes", OPT_PRIMES, 'p', "Specify number of primes"},
86 int ret = 1, num = DEFBITS, private = 0, primes = DEFPRIMES; in genrsa_main() local
137 primes = opt_int_arg(); in genrsa_main()
201 if (EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) <= 0) { in genrsa_main()
202 BIO_printf(bio_err, "Error setting number of primes\n"); in genrsa_main()
/third_party/openssl/apps/
H A Dgenrsa.c63 {"primes", OPT_PRIMES, 'p', "Specify number of primes"},
86 int ret = 1, num = DEFBITS, private = 0, primes = DEFPRIMES; in genrsa_main() local
137 primes = opt_int_arg(); in genrsa_main()
201 if (EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) <= 0) { in genrsa_main()
202 BIO_printf(bio_err, "Error setting number of primes\n"); in genrsa_main()
/third_party/node/deps/openssl/openssl/include/openssl/
H 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,
/third_party/openssl/include/openssl/
H 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,
/third_party/skia/third_party/externals/swiftshader/third_party/marl/kokoro/macos/
H A Dbuild.sh96 ./primes > /dev/null
160 "${BAZEL}" run //examples:primes > /dev/null
/third_party/skia/third_party/externals/swiftshader/third_party/marl/kokoro/ubuntu/
H A Ddocker.sh116 ./primes > /dev/null
175 bazel run //examples:primes > /dev/null
/third_party/node/deps/openssl/openssl/include/crypto/
H 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,
/third_party/openssl/demos/pkey/
H A DEVP_PKEY_RSA_keygen.c39 unsigned int primes = 2; in generate_rsa_key_long() local
64 * It is possible to create an RSA key using more than two primes. in generate_rsa_key_long()
71 if (EVP_PKEY_CTX_set_rsa_keygen_primes(genctx, primes) <= 0) { in generate_rsa_key_long()
173 * If you are creating an RSA key with more than two primes for special in dump_key()
174 * applications, you can retrieve these primes with in dump_key()
/third_party/openssl/include/crypto/
H 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,

Completed in 13 milliseconds

12