diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 51e3282fce6afb..a95a2a4173f32f 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -73,6 +73,28 @@ try { } ``` +## Asymmetric key types + +The following table lists the asymmetric key types recognized by the [`KeyObject`][] API: + +| Key Type | Description | OID | +| --------------------------- | -------------- | ----------------------- | +| `'dh'` | Diffie-Hellman | 1.2.840.113549.1.3.1 | +| `'dsa'` | DSA | 1.2.840.10040.4.1 | +| `'ec'` | Elliptic curve | 1.2.840.10045.2.1 | +| `'ed25519'` | Ed25519 | 1.3.101.112 | +| `'ed448'` | Ed448 | 1.3.101.113 | +| `'ml-dsa-44'`[^openssl35] | ML-DSA-44 | 2.16.840.1.101.3.4.3.17 | +| `'ml-dsa-65'`[^openssl35] | ML-DSA-65 | 2.16.840.1.101.3.4.3.18 | +| `'ml-dsa-87'`[^openssl35] | ML-DSA-87 | 2.16.840.1.101.3.4.3.19 | +| `'ml-kem-1024'`[^openssl35] | ML-KEM-1024 | 2.16.840.1.101.3.4.4.3 | +| `'ml-kem-512'`[^openssl35] | ML-KEM-512 | 2.16.840.1.101.3.4.4.1 | +| `'ml-kem-768'`[^openssl35] | ML-KEM-768 | 2.16.840.1.101.3.4.4.2 | +| `'rsa-pss'` | RSA PSS | 1.2.840.113549.1.1.10 | +| `'rsa'` | RSA | 1.2.840.113549.1.1.1 | +| `'x25519'` | X25519 | 1.3.101.110 | +| `'x448'` | X448 | 1.3.101.111 | + ## Class: `Certificate` -* `type` {string} Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, - `'ed448'`, `'x25519'`, `'x448'`, `'dh'`, `'ml-dsa-44'`[^openssl35], - `'ml-dsa-65'`[^openssl35], or `'ml-dsa-87'`[^openssl35]. +* `type` {string} The asymmetric key type to generate. See the + supported [asymmetric key types][]. * `options` {Object} * `modulusLength` {number} Key size in bits (RSA, DSA). * `publicExponent` {number} Public exponent (RSA). **Default:** `0x10001`. @@ -3825,9 +3830,8 @@ changes: produce key objects if no encoding was specified. --> -* `type` {string} Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, - `'ed448'`, `'x25519'`, `'x448'`, `'dh'`, `'ml-dsa-44'`[^openssl35], - `'ml-dsa-65'`[^openssl35], or `'ml-dsa-87'`[^openssl35]. +* `type` {string} The asymmetric key type to generate. See the + supported [asymmetric key types][]. * `options` {Object} * `modulusLength` {number} Key size in bits (RSA, DSA). * `publicExponent` {number} Public exponent (RSA). **Default:** `0x10001`. @@ -6280,6 +6284,7 @@ See the [list of SSL OP Flags][] for details. [`verify.verify()`]: #verifyverifyobject-signature-signatureencoding [`x509.fingerprint256`]: #x509fingerprint256 [`x509.verify(publicKey)`]: #x509verifypublickey +[asymmetric key types]: #asymmetric-key-types [caveats when using strings as inputs to cryptographic APIs]: #using-strings-as-inputs-to-cryptographic-apis [certificate object]: tls.md#certificate-object [encoding]: buffer.md#buffers-and-character-encodings