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

doc: list supported MODP groups explicitly #43986

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 11 additions & 14 deletions doc/api/crypto.md
Expand Up @@ -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`

Expand Down Expand Up @@ -6105,6 +6101,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
Expand Down