-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security Implications of #675 (Delete rand.py) #706
Comments
Hmm, we could restore just the Opinions? |
I'm for option 2, that is "install osrandom engine". It provides security w/o forcing the user to mess with OpenSSL internals. |
I think restoring the status quo with |
Maybe we should add some blurb to it explaining why it’s important while doing so. |
I came across this page, which describes a new approach for fork-safety in OpenSSL 1.1.1: I guess it will take some time until 1.1.1 becomes the minimum supported version, but perhaps this is worth considering while you decide how to best tackle this issue. |
For posterity: we're aware of the upcoming improvements in OpenSSL 1.1.1 re: the userland CSPRNG. #708 restores the rand subset to allow manual entropy mixing for conscientious forkers who can't utilize the |
@reaperhulk many thanks for the pull request #708 to restore part of the rand module. Note that the security implications I am raising here have to do with OpenSSL's internal use of its own RNG. I can't think how the import of cryptography's random engine will change that. Please clarify. |
|
Thanks for clarifying! |
In #675, the rand module was removed from the codebase, and users of the module were instructed to use os.urandom instead. However, using os.urandom is not an alternative for the whole rand module, just for some functions like rand.bytes.
There are other functions in the module, such as rand.add, that are changing the PRNG state of OpenSSL. Using such functions is of particular importance for fork safety, as described here: https://wiki.openssl.org/index.php/Random_fork-safety
and here:
https://docs.python.org/2/library/ssl.html#multi-processing
Please consider reverting #675, or at least bringing back the minimum subset of the rand module that will allow pyopenssl users to deal with fork safety.
The text was updated successfully, but these errors were encountered: