Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul of the prime-tests #541

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

czurnieden
Copy link
Contributor

  • Removal of the Fermat test mp_prime_fermat
  • Replacement of the Strong Lucas-Selfridge test with the Extra Strong Lucas test with Robert Baillie's parameters P = 3 and Q = 1
  • Additional tests to check the implementations of the Miller-Rabin and Extra Strong Lucas tests

@czurnieden czurnieden added this to the v2.0.0 milestone Mar 7, 2023
@czurnieden
Copy link
Contributor Author

It took a bit but I found it: this has been promised in a comment in #498. But what are two years between friends?

@czurnieden
Copy link
Contributor Author

My implementation of the extra strong Lucas test has been successfully checked against all Miller-Rabin pseudoprimes to the base 2 up to 2^64.
Testcode in a gist. Comment contains links to the pseudoprime lists.

@czurnieden czurnieden mentioned this pull request Apr 5, 2023
@czurnieden czurnieden force-pushed the extra_strong_lucas_test branch 2 times, most recently from e34d96f to d2b62d4 Compare April 11, 2023 19:32
@czurnieden
Copy link
Contributor Author

There are many preprocessor branches now in mp_prime_is_prime.c. Add a line or two to the CI to check the branch LTM_USE_ONLY_MR?

@czurnieden
Copy link
Contributor Author

The generated SPRP tables including their factoring (used to compute some of the limits here) is in the new repository SPRPs.

@czurnieden
Copy link
Contributor Author

There are no changes of the API directly but the Frobenius-Underwood test is an addition to the Extra-Strong-Lucas test now, instead of an alternative. If that is not seen as a problem we could merge it now instead of later (version 2).

Oh, and I found a bit of an unrelated mess in the documentation and fixed it here instead of a separate PR. Drop me a note if you[1] want a separate PR.

[1] "You"? Who is "you"? Y'all, of course! ;-)

 - Removal of the Fermat test mp_prime_fermat
 - Replacement of the Strong Lucas-Selfridge test with the
   Extra Strong Lucas test with Robert Baillie's parameters
   P = 3 and Q = 1
 - Finer grained early-outs
 - All determistic tests < 2^64 empirically verified
 - Additional tests to check the implementations of the
   Miller-Rabin and Extra Strong Lucas tests
 - Addition of tests of the LTM_USE_ONLY_MR to the CI
 - Documentation update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant