Ingela/crypto/public key/deprecation revert/otp 19163 #8700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OTB: Decided to revert deprecation of crypto and public_key functions using legacy RSA encryption. Reason is that there exists other paddings than rsa-pcks1-padding that can still have valid uses cases, and that rsa-pkcs1-padding use case can be used for offline reasons or with mitigated OpenSSL versions and is then likely secure, we leave it up to the user if they want to trust OpenSSL implementation.
I rephrased the warnings and still recommend against using this functions with rsa-pkcs1-padding, we want to be secure by default and let it be the users responsibility to ensure that if they use the algorithm it will be secure for their setup.
Note that best practices for the web-socket protocol using these functions (and that is the main reason for reverting) explicitly recommends to only support an other padding than rsa-pcks1 one.
Avoid all RSA-PKCS1 v1.5 encryption algorithms ([RFC8017], Section 7.2), preferring RSAES-OAEP ([RFC8017], Section 7.1).
Form: https://www.rfc-editor.org/rfc/rfc8725#RFC7515
We also remove rsa_sslv23_padding form the documentation as, from OpenSSL doc:
RSA_SSLV23_PADDING
PKCS https://github.com/erlang/otp-internal/pull/1 v1.5 padding with an SSL-specific modification that denotes that the server is SSL3 capable.
Translated to English , this means that the SSL implementation that implements SSL-2.0 (First protocol version designed by Netscape and never released to the public due to its many vulnerabilities) signals that it also supports SSL-3.0 (First IETF standardized version) .
So OTP has never had an SSL implementation that supports SSL-2.0 not even when we wrapped OpenSSL. And for several years we have not supported SSL-3.0. And I do not think that we need to think that there are any other Erlang implementations in the wild of legacy SSL version 2.0 and 3.0 that we need to support, especially not in OTP-27. It can be considered a documentation bug.