Add missing FIPS 186-5 GCD check in Lucas probable prime test#5626
Add missing FIPS 186-5 GCD check in Lucas probable prime test#5626Shounak611 wants to merge 1 commit into
Conversation
|
I would at the very least want some testcases that actually hits this. If needed, it would be much more effective to precompute |
|
I’ll verify whether the additional GCD check actually rejects any cases not already handled by the existing Jacobi condition and try to produce concrete examples/benchmarks. If it turns out to be redundant or not materially beneficial, I’ll remove the change from the PR. |
Implements the additional FIPS 186-5 B.3.3 check:
gcd(C, (1-D)/4) == 1
inside is_lucas_probable_prime().
This aligns the implementation with the updated FIPS 186-5 specification.