Re: Add Miller-Rabin with random bases to BPSW primality check

2023-04-28 Thread Theo Buehler
> > - *is_prime = 0; > > + *is_prime = 1; > > Nit: you call this a pseudo-prime - which I agree with, but the variable you > have added > is "is_prime" - maybe call it "maybe-prime" or "pseudo-prime" Yes. I agree. I did this for consistency with the existing code. I will keep this as-is and

Re: Add Miller-Rabin with random bases to BPSW primality check

2023-04-28 Thread Bob Beck
On Fri, Apr 28, 2023 at 10:23:15AM +0200, Theo Buehler wrote: > The behavior of BPSW for numbers > 2^64 is not very well understood. > While there is no known composite that passes the test, there are > heuristics that indicate that there are likely many. Therefore it seems > appropriate to harden

Add Miller-Rabin with random bases to BPSW primality check

2023-04-28 Thread Theo Buehler
The behavior of BPSW for numbers > 2^64 is not very well understood. While there is no known composite that passes the test, there are heuristics that indicate that there are likely many. Therefore it seems appropriate to harden the test. Having a settable number of MR rounds before doing a version