Skip to content
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

Add binding for SSL_CTX_set1_curves_list #4980

Closed
evilaliv3 opened this issue Sep 1, 2019 · 6 comments
Closed

Add binding for SSL_CTX_set1_curves_list #4980

evilaliv3 opened this issue Sep 1, 2019 · 6 comments

Comments

@evilaliv3
Copy link
Contributor

While experimenting within the Globaleaks application i just find out that the binding for SSL_CTX_set1_curves_list is currently not exposed.

This would be useful in order to define a preference on the order of the curves that should be used.

The feature would result particularly important especially for the fact that it seems that OpenSSL default order seems to be x25519, secp256r1, x448, secp521r1, secp384r1. This specific order makes clients select secp256r1 even if they support secp521r1 or secp384r1. (openssl/openssl#9748)

@kroeckx
Copy link

kroeckx commented Sep 1, 2019

This is one of those things where I think people should not change the defaults in an application, unless they know what they're doing. Most of the times I see something like that being used, they don't know what all the effects are, or after 10 years they end up with bad values. So I'm not sure it's a good idea to expose this to applications or not.

@evilaliv3
Copy link
Contributor Author

Thank you @kroeckx

Thank you for exaplaing your point for the default value in openssl where as default you prefer to prioritize performances that would be more important for the general public (openssl/openssl#9748 (comment)) and i not agree on the reason you prefer to keep it as it is.

I would support anyway that cryptography would expose this option option to the user that require more security to make it possible to specify the order to prioritize security over performances.

@alex
Copy link
Member

alex commented Sep 1, 2019

If OpenSSL's going to have an API for this, we can bind to it.

@evilaliv3
Copy link
Contributor Author

@alex: the API is this: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set1_curves_list.html

It was first introduced in pyopenssl 1.0.2

Here you can see an example of configuration using SSL_CTX_set_ecdh_auto where each of the client that you see listed are able to support secp384r1 but given the order list of the server they are using secp256r1: https://www.ssllabs.com/ssltest/analyze.html?d=try.globaleaks.org

@evilaliv3
Copy link
Contributor Author

@alex @kroeckx: one additional value in adding this binding would be to make it possible for users to disable a particular curve. Suppose in fact that tomorrow a particular curve will result vulnerable. By having this binding exposed it will be possible to immediately disable it and with a simple configuration patch the vulnerability.

@reaperhulk
Copy link
Member

This binding can be added, but in general we'd expect it to be consumed by pyopenssl. If you'd like to add this then you should submit a PR here and also a pyopenssl PR that adds a new API consuming it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants