Home | History | Annotate | Download | only in bn

Lines Matching refs:primes

116 // The quick sieve algorithm approach to weeding out primes is Philip
122 // primes contains all the primes that fit into a uint16_t.
123 static const uint16_t primes[NUMPRIMES] = {
503 BN_ULONG mod = BN_mod_word(a, primes[i]);
508 return BN_is_word(a, primes[i]);
682 BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES - 1];
692 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]);
720 // 1) It's greater than primes[i] because we shouldn't reject
725 // primes because there aren't many small primes where
727 for (i = 1; i < NUMPRIMES && primes[i] < rnd_word; i++) {
728 if ((mods[i] + delta) % primes[i] == 0) {
739 // that gcd(rnd-1,primes) == 1 (except for 2)
740 if (((mods[i] + delta) % primes[i]) <= 1) {
796 BN_ULONG mod = BN_mod_word(rnd, (BN_ULONG)primes[i]);
871 // gcd(p-1,primes) == 1 (except for 2)
872 BN_ULONG pmod = BN_mod_word(p, (BN_ULONG)primes[i]);
873 BN_ULONG qmod = BN_mod_word(q, (BN_ULONG)primes[i]);