diff --git a/doc/api/tls.md b/doc/api/tls.md index 34d3a9a96da672..a2a6279e0e374d 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -123,23 +123,17 @@ all sessions). Methods implementing this technique are called "ephemeral". Currently two methods are commonly used to achieve perfect forward secrecy (note the character "E" appended to the traditional abbreviations): -* [DHE][]: An ephemeral version of the Diffie-Hellman key-agreement protocol. * [ECDHE][]: An ephemeral version of the Elliptic Curve Diffie-Hellman key-agreement protocol. +* [DHE][]: An ephemeral version of the Diffie-Hellman key-agreement protocol. -To use perfect forward secrecy using `DHE` with the `node:tls` module, it is -required to generate Diffie-Hellman parameters and specify them with the -`dhparam` option to [`tls.createSecureContext()`][]. The following illustrates -the use of the OpenSSL command-line interface to generate such parameters: - -```bash -openssl dhparam -outform PEM -out dhparam.pem 2048 -``` +Perfect forward secrecy using ECDHE is enabled by default. The `ecdhCurve` +option can be used when creating a TLS server to customize the list of supported +ECDH curves to use. See [`tls.createServer()`][] for more info. -If using perfect forward secrecy using `ECDHE`, Diffie-Hellman parameters are -not required and a default ECDHE curve will be used. The `ecdhCurve` property -can be used when creating a TLS Server to specify the list of names of supported -curves to use, see [`tls.createServer()`][] for more info. +DHE is disabled by default but can be enabled alongside ECDHE by setting the +`dhparam` option to `'auto'`. Custom DHE parameters are also supported but +discouraged in favor of automatically selected, well-known parameters. Perfect forward secrecy was optional up to TLSv1.2. As of TLSv1.3, (EC)DHE is always used (with the exception of PSK-only connections). @@ -1796,6 +1790,10 @@ argument.