| /src/crypto/external/apache2/openssl/dist/crypto/bn/ |
| bn_prime.h | 16 static const prime_t primes[2048] = { variable
|
| 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); 47 printf "static const prime_t primes[%d] = {", $num; 48 for (my $i = 0; $i <= $#primes; $i++) { 50 printf " %5d,", $primes[$i];
|
| bn_prime.c | 16 * 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) 306 BN_ULONG mod = BN_mod_word(w, primes[i]); 310 return BN_is_word(w, primes[i]); 493 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; 503 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); 513 * gcd(rnd-1,primes) == 1 (except for 2) 514 * do the second check only if we are interested in safe primes 516 * we check only the primes up to sqrt(rnd [all...] |
| /src/crypto/external/bsd/openssl/dist/crypto/bn/ |
| bn_prime.h | 16 static const prime_t primes[2048] = { variable
|
| 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); 47 printf "static const prime_t primes[%d] = {", $num; 48 for (my $i = 0; $i <= $#primes; $i++) { 50 printf " %5d,", $primes[$i];
|
| bn_prime.c | 16 * 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) 297 BN_ULONG mod = BN_mod_word(w, primes[i]); 301 return BN_is_word(w, primes[i]); 484 BN_ULONG maxdelta = BN_MASK2 - primes[trial_divisions - 1]; 494 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); 504 * gcd(rnd-1,primes) == 1 (except for 2) 505 * do the second check only if we are interested in safe primes 507 * we check only the primes up to sqrt(rnd [all...] |
| /src/crypto/external/bsd/openssl.old/dist/crypto/bn/ |
| bn_prime.h | 16 static const prime_t primes[2048] = { variable
|
| bn_prime.pl | 31 my @primes = ( 2 ); 33 loop: while ($#primes < $num-1) { 37 for (my $i = 0; defined($primes[$i]) && $primes[$i] <= $s; $i++) { 38 next loop if ($p % $primes[$i]) == 0; 40 push(@primes, $p); 46 printf "static const prime_t primes[%d] = {", $num; 47 for (my $i = 0; $i <= $#primes; $i++) { 49 printf " %5d,", $primes[$i];
|
| bn_prime.c | 16 * The quick sieve algorithm approach to weeding out primes is Philip 71 * But the following two safe primes with less than 6 bits (11, 23) 160 /* Take care of the really small primes 2 & 3 */ 174 BN_ULONG mod = BN_mod_word(a, primes[i]); 178 return BN_is_word(a, primes[i]); 276 BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES - 1]; 279 /* TODO: Not all primes are private */ 286 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]); 296 * gcd(rnd-1,primes) == 1 (except for 2) 297 * do the second check only if we are interested in safe primes [all...] |
| /src/games/primes/ |
| Makefile | 4 PROG= primes 5 SRCS= pattern.c pr_tbl.c primes.c spsp.c 6 MAN= primes.6
|
| /src/usr.sbin/sysinst/ |
| factor.c | 40 * primes - prime table, built to include up to 46345 because 48 long primes[4800]; variable 62 * Initialise primes at run-time rather than compile time 65 primes[0] = 2; 66 primes[1] = 3; 68 for (pc = primes[num_primes-1]; pc < 46345 && pc*pc <= max; pc+=2) { 71 while (j < num_primes && primes[j] * primes[j] <= pc) { 72 if ((rem = pc % primes[j]) == 0) 77 primes[num_primes++] = pc [all...] |
| /src/crypto/external/bsd/openssl.old/dist/test/recipes/ |
| 15-test_mp_rsa.t | 27 # 3 primes, 2048-bit 29 primes => '3', 32 # 4 primes, 4096-bit 34 primes => '4', 37 # 5 primes, 8192-bit 39 primes => '5', 53 my $primes = $param->{primes}; 55 my $name = ($evp ? "evp" : "") . "${bits}p${primes}"; 59 '-algorithm', 'RSA', '-pkeyopt', "rsa_keygen_primes:$primes", [all...] |
| /src/crypto/external/apache2/openssl/dist/test/recipes/ |
| 15-test_mp_rsa.t | 21 # 3 primes, 2048-bit 23 primes => '3', 26 # 4 primes, 4096-bit 28 primes => '4', 31 # 5 primes, 8192-bit 33 primes => '5', 56 my $primes = $param->{primes}; 58 my $name = ($evp ? "evp" : "") . "${bits}p${primes}"; 63 '-pkeyopt', "rsa_keygen_primes:$primes", [all...] |
| /src/crypto/external/bsd/openssl/dist/test/recipes/ |
| 15-test_mp_rsa.t | 21 # 3 primes, 2048-bit 23 primes => '3', 26 # 4 primes, 4096-bit 28 primes => '4', 31 # 5 primes, 8192-bit 33 primes => '5', 56 my $primes = $param->{primes}; 58 my $name = ($evp ? "evp" : "") . "${bits}p${primes}"; 63 '-pkeyopt', "rsa_keygen_primes:$primes", [all...] |
| /src/external/lgpl3/gmp/dist/demos/ |
| Makefile.am | 33 EXTRA_DIST = perl primes.h 44 EXTRA_PROGRAMS = factorize isprime pexpr primes qcn
|
| primes.c | 1 /* List and count primes. 26 * Do not fill primes[] with real primes when the range [fr,to] is small, 27 when fr,to are relatively large. Fill primes[] with odd numbers instead. 28 [Probably a bad idea, since the primes[] array would become very large.] 29 * Separate small primes and large primes when sieving. Either the Montgomery 31 separate loops for primes <= S and primes > S. The latter primes do no 55 struct primes struct 61 struct primes *primes; variable in typeref:struct:primes [all...] |
| /src/external/lgpl3/gmp/dist/tests/mpz/ |
| t-perfpow.c | 109 mpz_t n, np, temp, primes[NRP]; local 122 mpz_init (primes[i]); 127 nrprimes = mpz_get_ui (np) % NRP + 1; /* 1-NRP unique primes */ 135 primebits = mpz_get_ui (np) % 100 + 3; /* 3-102 bit primes */ 136 mpz_urandomb (primes[j], rands, primebits); 137 mpz_nextprime (primes[j], primes[j]); 141 if (mpz_cmp (primes[j], primes[k]) == 0) 184 mpz_pow_ui (n, primes[0], exp[0]) [all...] |
| /src/crypto/external/bsd/openssl.old/dist/crypto/rsa/ |
| rsa_gen.c | 22 static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value, 41 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, 46 return rsa->meth->rsa_multi_prime_keygen(rsa, bits, primes, 55 if (primes == 2) 61 return rsa_builtin_keygen(rsa, bits, primes, e_value, cb); 64 static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value, 82 if (primes < RSA_DEFAULT_PRIME_NUM || primes > rsa_multip_cap(bits)) { 98 /* divide bits into 'primes' pieces evenly */ 99 quo = bits / primes; [all...] |
| /src/crypto/external/bsd/openssl/dist/crypto/rsa/ |
| rsa_gen.c | 31 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, 56 return rsa->meth->rsa_multi_prime_keygen(rsa, bits, primes, 65 if (primes == 2) 71 return rsa_keygen(rsa->libctx, rsa, bits, primes, e_value, cb, 0); 75 static int rsa_multiprime_keygen(RSA *rsa, int bits, int primes, 100 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) { 116 /* divide bits into 'primes' pieces evenly */ 117 quo = bits / primes; [all...] |
| /src/games/factor/ |
| Makefile | 6 PRIMES= ${NETBSDSRCDIR}/games/primes 10 CPPFLAGS+=-I${PRIMES} 19 .PATH: ${PRIMES}
|
| /src/external/lgpl3/gmp/dist/mpz/ |
| pprime_p.c | 46 value congruent to r*2^n mod d. Since all the primes being tested are 107 /* Do more dividing. We collect small primes, using umul_ppmm, until we 108 overflow a single limb. We divide our number by the small primes product, 114 unsigned int primes[15]; local 129 if (r % primes[nprimes] == 0) 131 ASSERT_ALWAYS (mpn_mod_1 (PTR(n), (mp_size_t) SIZ(n), (mp_limb_t) primes[nprimes]) == 0); 141 primes[nprimes++] = q;
|
| /src/external/gpl2/gettext/dist/gettext-tools/gnulib-lib/ |
| gl_anyhash_list2.h | 22 /* Array of primes, approximately in steps of factor 1.2. 26 static const size_t primes[] = variable 87 for (i = 0; i < sizeof (primes) / sizeof (primes[0]); i++) 88 if (primes[i] >= estimate) 89 return primes[i];
|
| /src/crypto/external/apache2/openssl/dist/test/ |
| rsa_mp_test.c | 194 STACK_OF(BIGNUM) *primes = NULL, *exps = NULL, *coeffs = NULL; 198 if (!TEST_ptr(primes = sk_BIGNUM_new_null()) 204 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0) 206 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0) 208 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0)) 225 if (!TEST_true(ossl_rsa_set0_all_params(key, primes, exps, coeffs))) 229 sk_BIGNUM_free(primes); 234 sk_BIGNUM_pop_free(primes, BN_free); 237 primes = exps = coeffs = NULL;
|
| /src/crypto/external/bsd/openssl/dist/test/ |
| rsa_mp_test.c | 202 STACK_OF(BIGNUM) *primes = NULL, *exps = NULL, *coeffs = NULL; 206 if (!TEST_ptr(primes = sk_BIGNUM_new_null()) 212 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0) 214 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0) 216 || !TEST_int_ne(sk_BIGNUM_push(primes, num), 0)) 233 if (!TEST_true(ossl_rsa_set0_all_params(key, primes, exps, coeffs))) 237 sk_BIGNUM_free(primes); 242 sk_BIGNUM_pop_free(primes, BN_free); 245 primes = exps = coeffs = NULL;
|
| /src/crypto/external/apache2/openssl/dist/crypto/rsa/ |
| rsa_gen.c | 31 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, 56 return rsa->meth->rsa_multi_prime_keygen(rsa, bits, primes, 65 if (primes == 2) 71 return rsa_keygen(rsa->libctx, rsa, bits, primes, e_value, cb, 0); 82 int ossl_rsa_multiprime_derive(RSA *rsa, int bits, int primes, 130 /* Build list of partial products of primes */ 154 /* all other primes */ 265 static int rsa_multiprime_keygen(RSA *rsa, int bits, int primes, 295 if (primes < RSA_DEFAULT_PRIME_NUM || primes > ossl_rsa_multip_cap(bits)) [all...] |