[pycrypto] getStrongPrime() implementation
don at amberfisharts.com
Tue Oct 20 16:48:01 CST 2009
as promised here is the implementation of a getStrongPrime() function which generates strong primes as described in
the paper .
Let me know if such a thing is of interest and if so what could be improved.
Really any comments are welcome.
I didn't benchmark or use this in any meaningful way, yet.
But it is expected to be quite a bit slower than the implementation used so far for at least two reasons:
1) the base for the sieve is much larger (here 10000 in contrast to 54)
2) a lot more calls to mpz_probab_prime_p (Rabin-Miller-Tests) are used (75 per strong prime vs 5)
I chose those numbers in accordance with the paper  but there is probably room for a security/performance trade-off.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the pycrypto