Christian Heimes <li...@cheimes.de> added the comment:

I'm still not convinced that it's a good idea to add a general prime factor 
function to Python's standard library. IMO the feature is better suited for an 
external math library or crypto library.

If we are going to add a prime factor function, then we should consider 
existing implementations. OpenSSL has BN_generate_prime_ex() [1] API. It's 
based on MR probabilistic prime test. The API can also generate primes with 
additional properties, e.g. Sophie Germain primes or primes suitable for finite 
field Diffie-Hellman.

[1] https://www.openssl.org/docs/man1.1.1/man3/BN_generate_prime_ex.html

----------
nosy: +christian.heimes

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40028>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to