Lines Matching refs:primes
134 /* The quick sieve algorithm approach to weeding out primes is Philip
138 /* NUMPRIMES is the number of primes that fit into a uint16_t. */
141 /* primes is defined at the bottom of the file and contains all the primes that
143 static const uint16_t primes[NUMPRIMES];
312 if (BN_mod_word(a, primes[i]) == 0) {
460 BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES - 1];
470 mods[i] = (uint16_t)BN_mod_word(rnd, (BN_ULONG)primes[i]);
488 * 1) It's greater than primes[i] because we shouldn't reject
493 * primes because there aren't many small primes where
495 for (i = 1; i < NUMPRIMES && primes[i] < rnd_word; i++) {
496 if ((mods[i] + delta) % primes[i] == 0) {
506 * that gcd(rnd-1,primes) == 1 (except for 2) */
507 if (((mods[i] + delta) % primes[i]) <= 1) {
562 if (BN_mod_word(rnd, (BN_ULONG)primes[i]) <= 1) {
633 * gcd(p-1,primes) == 1 (except for 2) */
634 if ((BN_mod_word(p, (BN_ULONG)primes[i]) == 0) ||
635 (BN_mod_word(q, (BN_ULONG)primes[i]) == 0)) {
653 static const uint16_t primes[NUMPRIMES] = {