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

/freebsd-13-stable/crypto/openssl/crypto/bn/
H A Dbn_prime.h16 static const prime_t primes[2048] = { variable
H A Dbn_prime.pl28 my @primes = ( 2 );
30 loop: while ($#primes < $num-1) {
34 for (my $i = 0; defined($primes[$i]) && $primes[$i] <= $s; $i++) {
35 next loop if ($p % $primes[$i]) == 0;
37 push(@primes, $p);
43 printf "static const prime_t primes[%d] = {", $num;
44 for (my $i = 0; $i <= $#primes; $i++) {
46 printf " %5d,", $primes[$i];
H A Dbn_prime.c16 * 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...]
/freebsd-13-stable/usr.bin/primes/
H A DMakefile4 PROG= primes
5 SRCS= pattern.c pr_tbl.c primes.c spsp.c
H A Dprimes.c41 static char sccsid[] = "@(#)primes.c 8.5 (Berkeley) 5/10/95";
48 * primes - generate a table of primes between two values
55 * primes [-h] [start [stop]]
57 * Print primes >= start and < stop. If stop is omitted,
61 * validation check: there are 664579 primes between 0 and 10^7
77 #include "primes.h"
92 static void primes(ubig, ubig);
170 primes(start, stop);
206 * primes
209 primes(ubig start, ubig stop) function
[all...]
/freebsd-13-stable/usr.bin/factor/
H A DMakefile8 CFLAGS+=-I${SRCTOP}/usr.bin/primes
16 MLINKS+=factor.6 primes.6
17 .PATH: ${SRCTOP}/usr.bin/primes
/freebsd-13-stable/crypto/openssl/crypto/rsa/
H A Drsa_gen.c22 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, argument
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, argument
82 if (primes < RSA_DEFAULT_PRIME_NUM || primes > rsa_multip_cap(bits)) {
98 /* divide bits into 'primes' pieces evenly */
99 quo = bits / primes;
[all...]
H A Drsa_lib.c263 int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], argument
270 if (primes == NULL || exps == NULL || coeffs == NULL || pnum == 0)
284 if (primes[i] != NULL && exps[i] != NULL && coeffs[i] != NULL) {
288 pinfo->r = primes[i];
356 int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]) argument
365 * return other primes
370 primes[i] = pinfo->r;
396 /* return other primes */
H A Drsa_local.h20 /* save product of primes prior to this one */
111 int (*rsa_multi_prime_keygen) (RSA *rsa, int bits, int primes,
H A Drsa_meth.c275 (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb)
282 int primes, BIGNUM *e,
280 RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth, int (*keygen) (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb)) argument
H A Drsa_pmeth.c30 int primes; member in struct:__anon7216
60 rctx->primes = RSA_DEFAULT_PRIME_NUM;
485 rctx->primes = p1;
743 ret = RSA_generate_multi_prime_key(rsa, rctx->nbits, rctx->primes,
/freebsd-13-stable/sys/kern/
H A Dsubr_hash.c104 static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, variable
107 #define NPRIMES nitems(primes)
124 for (i = 1, hashsize = primes[1]; hashsize <= elements;) {
128 hashsize = primes[i];
130 hashsize = primes[i - 1];
/freebsd-13-stable/targets/pseudo/userland/games/
H A DMakefile.depend16 usr.bin/primes \
/freebsd-13-stable/crypto/openssl/apps/
H A Dgenrsa.c50 {"primes", OPT_PRIMES, 'p', "Specify number of primes"},
64 int ret = 1, num = DEFBITS, private = 0, primes = DEFPRIMES; local
111 if (!opt_int(opt_arg(), &primes))
142 BIO_printf(bio_err, "Generating RSA private key, %d bit long modulus (%d primes)\n",
143 num, primes);
149 || !RSA_generate_multi_prime_key(rsa, num, primes, bn, cb))
H A Dspeed.c331 {"primes", OPT_PRIMES, 'p', "Specify number of primes (for RSA only)"},
1487 int primes = RSA_DEFAULT_PRIME_NUM; local
1636 if (!opt_int(opt_arg(), &primes))
1849 if (primes > RSA_DEFAULT_PRIME_NUM) {
2687 if (primes > 2) {
2709 primes, bn, NULL)) {
/freebsd-13-stable/crypto/openssh/
H A DMakefile.in376 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
377 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
378 mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
/freebsd-13-stable/crypto/openssl/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,
/freebsd-13-stable/contrib/ofed/opensm/opensm/
H A Dst.c118 static long primes[] = { variable
164 i < sizeof(primes) / sizeof(primes[0]); i++, newsize <<= 1) {
166 return primes[i];
/freebsd-13-stable/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/lua_core/
H A Dtst.lib_coroutine.lua120 -- generate primes up to 20
130 -- expect 8 primes and last one is 19
/freebsd-13-stable/usr.bin/
H A DMakefile213 SUBDIR.${MK_GAMES}+= primes
/freebsd-13-stable/crypto/openssh/contrib/redhat/
H A Dopenssh.spec519 - replace primes with moduli
724 - Add the primes file from the latest snapshot to the main package (#20884).

Completed in 226 milliseconds