I take it that the primes are up to about 512 bits in the examples you gave?

If so, then perhaps a different method of primality testing would be
better. There are good libraries dedicated to this, like ECPP.
Primality testing is an entire industry.

I don't personally know of a really fast algorithm in that range,
though the BPSW test could probably be extended to work there with
very few counterexamples. This ought to be a lot faster than 40
iterations of Miller-Rabin. There is probably an implementation on TR
Nicely's page somewhere:

http://www.trnicely.net/

Bill.

On 8 November 2012 22:08, Richard Marton <y...@tekken.cc> wrote:
> Hi there!
>
> I have made an RSA coder in C++ which runs on a single thread. The prime
> generation takes up most of the CPU time, I'd prefer to speed it up using
> multiple cores.
> The random number is generated by MPIR and tested by the Miller-Rabin
> primality test with 40 iterations. I am using Visual Studio and my target
> platform is Windows.
> What method would you recommend on speeding up the primality testing?
>
> --
> You received this message because you are subscribed to the Google Groups
> "mpir-devel" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mpir-devel/-/7qY67JideIUJ.
> To post to this group, send email to mpir-devel@googlegroups.com.
> To unsubscribe from this group, send email to
> mpir-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mpir-devel?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to