diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 27e57141e2d..f4dd56b8d61 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1181,20 +1181,16 @@ const { createDiffieHellmanGroup } = require('node:crypto'); const dh = createDiffieHellmanGroup('modp1'); ``` -The name (e.g. `'modp1'`) is taken from [RFC 2412][] (modp1 and 2) and -[RFC 3526][]: - -```console -$ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h -modp1 # 768 bits -modp2 # 1024 bits -modp5 # 1536 bits -modp14 # 2048 bits -modp15 # etc. -modp16 -modp17 -modp18 -``` +The following groups are supported: + +* `'modp1'` (768 bits, [RFC 2409][] Section 6.1) +* `'modp2'` (1024 bits, [RFC 2409][] Section 6.2) +* `'modp5'` (1536 bits, [RFC 3526][] Section 2) +* `'modp14'` (2048 bits, [RFC 3526][] Section 3) +* `'modp15'` (3072 bits, [RFC 3526][] Section 4) +* `'modp16'` (4096 bits, [RFC 3526][] Section 5) +* `'modp17'` (6144 bits, [RFC 3526][] Section 6) +* `'modp18'` (8192 bits, [RFC 3526][] Section 7) ## Class: `ECDH` @@ -5993,6 +5989,7 @@ See the [list of SSL OP Flags][] for details. [Nonce-Disrespecting Adversaries]: https://github.com/nonce-disrespect/nonce-disrespect [OpenSSL's SPKAC implementation]: https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html [RFC 1421]: https://www.rfc-editor.org/rfc/rfc1421.txt +[RFC 2409]: https://www.rfc-editor.org/rfc/rfc2409.txt [RFC 2412]: https://www.rfc-editor.org/rfc/rfc2412.txt [RFC 2818]: https://www.rfc-editor.org/rfc/rfc2818.txt [RFC 3526]: https://www.rfc-editor.org/rfc/rfc3526.txt