Lines Matching defs:mod
25 * For an odd n compute a / 2 (mod n). If a is even, we can do a plain
26 * division, otherwise calculate (a + n) / 2. Then reduce (mod n).
51 * U' = U * V (mod n)
52 * V' = (V^2 + D * U^2) / 2 (mod n)
56 * U'' = (U' + V') / 2 (mod n)
57 * V'' = (V' + D * U') / 2 (mod n)
80 /* U' = U * V (mod n). */
84 /* V' = (V^2 + D * U^2) / 2 (mod n). */
97 /* U'' = (U' + V') / 2 (mod n). */
103 /* V'' = (V' + D * U') / 2 (mod n). */
308 * * Fermat's little theorem: base^(n-1) = 1 (mod n).
309 * * The only square roots of 1 (mod n) are 1 and -1.
345 /* Loop invariant: power is neither 1 nor -1 (mod n). */
489 BN_ULONG mod;
505 if ((mod = BN_mod_word(n, primes[i])) == (BN_ULONG)-1)
507 if (mod == 0) {