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

Primality test can return true for composites #29

Open
randombit opened this issue May 8, 2017 · 1 comment
Open

Primality test can return true for composites #29

randombit opened this issue May 8, 2017 · 1 comment
Labels

Comments

@randombit
Copy link

It appears the Miller-Rabin test implemented in bigi always chooses the base from the set of primes < 1000, however it is possible to construct a composite that appears prime relative to any fixed set of witnesses, and the paper https://math.dartmouth.edu/~carlp/PDF/reliable.pdf has a proof that there exist integers with no small witnesses at all.

The best fix is probably to choose the witnesses randomly from the range [2,n) which avoids the problem entirely.

@dcousens
Copy link
Contributor

dcousens commented May 8, 2017

The better option is probably to deprecate it and remove it? This library isn't actively developed - only maintained - cautiously.

@dcousens dcousens added the bug label Nov 29, 2017
@dcousens dcousens assigned randombit and unassigned randombit Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants