-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hello,
I'm a neophyte to fast integer factoring and primality testing, but I've recently been reading up on the various techniques.
I can see that this library uses deterministic Miller-Rabin. The README links to this Wikipedia page section, which currently states:
The Miller test is not used in practice. For most purposes, proper use of the probabilistic Miller–Rabin test or the Baillie–PSW primality test gives sufficient confidence while running much faster. It is also slower in practice than commonly used proof methods such as Adleman–Pomerance–Rumely primality test and Elliptic curve primality which give results that do not rely on unproven assumptions. For theoretical purposes requiring a deterministic polynomial time algorithm, it was superseded by the AKS primality test, which also does not rely on unproven assumptions.
I've recently implemented the Baillie-PSW myself, including the strong version of the Lucas test. Nicely's Baillie-PSW page states that the cost is roughly equivalent to 3 to 7 iterations of the Miller-Rabin test.
However, from cursory browsing of your project's website, it's clear that you've put great effort into optimizing your particular deterministic Milller-Rabin implementation. For example: you're doing something with hashing to choose the bases, but I don't really understand the idea behind this step. Nevertheless, I'd put more stock in your implementation than this paragraph from Wikipedia, even though you link directly to it in your README.
Could you please comment on how you see the performance of the best deterministic Miller-Rabin implementations relative to Baillie-PSW?
And, could you give a brief summary (or provide a link to a tutorial) on the idea behind the base hashing?