[−][src]Function accumulator::hash::primality::passes_lucas
pub fn passes_lucas(n: &U256) -> bool
Strong Lucas probable prime test (NOT the more common Lucas primality test which requires
factorization of n-1
).
Selects parameters d
, p
, q
according to Selfridge's method.
If n
passes, it is either prime or a "strong" Lucas pseudoprime. (The precise meaning of
"strong" is not fixed in the literature.) Procedure can be further strengthened by implementing
more tests in Section 6 of [Baillie and Wagstaff 1980], but for now this is TODO.
See also: Lucas pseudoprime on Wikipedia.