-
Notifications
You must be signed in to change notification settings - Fork 60
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
config TLSv1.3 key exchange groups where supported #284
Conversation
Repeating from my #270 (comment): IANA TLS Supported Groups (see "Recommended" column in the table) The recommended groups are currently X25519:P-256:P-384:X448. The ssl-config-generator guidelines contains X25519:prime256v1:secp384r1. While the ssl-config-generator guidelines should consider adding X448, the current recommendations otherwise match the list of recommended IANA TLS Supported Groups. [...] Aside: the order of groups listed matters. X25519:prime256v1:secp384r1 is a reasonable ordering (for numerous reasons not expounded here) and matches the ordering in some existing TLS libraries, e.g. the order in mbedTLS -- though mbedTLS recognizes string secp256r1 and does not recognize prime256v1 or P-256, and mbedTLS recognizes lowercase x25519 string. The following was true in 2016: https://www.rfc-editor.org/rfc/rfc7919 (Aug 2016)
A future update of the ssl-config-generator guidelines should continue to omit ffdhe* Groups, absent new data suggesting otherwise. Even though DHE keys have sufficient security strength (if appropriately sized, e.g. minimum 2048 bits today), key exchange using elliptic curves (using smaller keys of equivalent strength to much larger DHE keys) are more CPU efficient, memory efficient, and more space efficient (smaller network packet size) than key exchange using DHE. |
Almost half of the servers in ssl-config-generator do not support configuring a list of Groups/Curves in their config files:
Of note, configuring a curve in Squid disables DHE key exchange. It is one or the other, and the default is DHE, not EC. This is a serious limitation. If someone files a bug upstream with Squid, please reference here. |
Some servers added support to configure Groups only in recent versions. Select examples (incomplete list):
|
In OpenSSL, very old openssl versions had an interface allowing configuration of a single curve. A comment in nginx code describes this well: https://github.com/nginx/nginx/blob/master/src/event/ngx_event_openssl.c#L1366
as does Exim https://www.exim.org/exim-pdf-current/doc/spec.pdf description of
|
boringssl and libressl do not support ffdhe key exchange with TLSv1.3. |
Aside: some notes for configuring TLS in Java, specifically Java https://docs.oracle.com/en/java/javase/23/security/transport-layer-security-tls-protocol-overview.html#GUID-C6554A00-CF26-4661-991D-EA1B9EA6CCBE Tomcat also has option to use tcnative (Tomcat Native) library to use OpenSSL as a replacement for JSSE to support TLS connections. https://tomcat.apache.org/native-doc/ |
Golang has different names for Groups than OpenSSL. Instead of providing a mapping, this PR hard-codes the list of Groups in |
x-ref: Explicitly configure curves/groups from the guidelines mozilla#270 github: closes mozilla#270
|
config TLSv1.3 key exchange groups where supported
The reason to explicitly configure Groups is due to OpenSSL 3.0 adding ffdhe* groups to the defaults, potentially exposing servers supporting TLSv1.3 and OpenSSL 3.0 to DHEater attacks. (See #162)
Note: .hbs additions have been made from the documentation and have not been tested on the all the server apps.
Some slight syntax adjustment may turn out to be needed.
Note: This PR exposes the TLS curves that are already defined in the guidelines. This is not a change to the guidelines. However, the curves were not previously exposed in ssl-config-generator configs. This PR implements the Groups/Curves config in server apps that have config support.