Predicate stating that a is a Miller-Rabin witness for compositeness of N:
i.e., writing N - 1 = 2^s * d with d odd and s > 0, neither a^d ≡ 1 (mod N) nor
a^(2^r * d) ≡ -1 (mod N) holds for any 0 ≤ r < s.
Instances For
The set of odd integers in the interval [2^(k-1), 2^k].
Instances For
The subset of nonWitnessPairs k for which N is actually prime.
Instances For
Damgård-Landrock-Pomerance bound (Theorem 11.11): for a random odd integer
N ∈ [2^(k-1), 2^k] and a random a ∈ [1, N-1], the conditional probability
that N is prime given that a is not a Miller-Rabin witness for N is at least
1 - k^2 · 4^(2 - √k).