crypto: support SLH-DSA KeyObject, sign, and verify · nodejs/node@430691d

@@ -77,23 +77,35 @@ try {

77777878

The following table lists the asymmetric key types recognized by the [`KeyObject`][] API:

797980-

| Key Type | Description | OID |

81-

| --------------------------- | -------------- | ----------------------- |

82-

| `'dh'` | Diffie-Hellman | 1.2.840.113549.1.3.1 |

83-

| `'dsa'` | DSA | 1.2.840.10040.4.1 |

84-

| `'ec'` | Elliptic curve | 1.2.840.10045.2.1 |

85-

| `'ed25519'` | Ed25519 | 1.3.101.112 |

86-

| `'ed448'` | Ed448 | 1.3.101.113 |

87-

| `'ml-dsa-44'`[^openssl35] | ML-DSA-44 | 2.16.840.1.101.3.4.3.17 |

88-

| `'ml-dsa-65'`[^openssl35] | ML-DSA-65 | 2.16.840.1.101.3.4.3.18 |

89-

| `'ml-dsa-87'`[^openssl35] | ML-DSA-87 | 2.16.840.1.101.3.4.3.19 |

90-

| `'ml-kem-1024'`[^openssl35] | ML-KEM-1024 | 2.16.840.1.101.3.4.4.3 |

91-

| `'ml-kem-512'`[^openssl35] | ML-KEM-512 | 2.16.840.1.101.3.4.4.1 |

92-

| `'ml-kem-768'`[^openssl35] | ML-KEM-768 | 2.16.840.1.101.3.4.4.2 |

93-

| `'rsa-pss'` | RSA PSS | 1.2.840.113549.1.1.10 |

94-

| `'rsa'` | RSA | 1.2.840.113549.1.1.1 |

95-

| `'x25519'` | X25519 | 1.3.101.110 |

96-

| `'x448'` | X448 | 1.3.101.111 |

80+

| Key Type | Description | OID |

81+

| ---------------------------------- | ------------------ | ----------------------- |

82+

| `'dh'` | Diffie-Hellman | 1.2.840.113549.1.3.1 |

83+

| `'dsa'` | DSA | 1.2.840.10040.4.1 |

84+

| `'ec'` | Elliptic curve | 1.2.840.10045.2.1 |

85+

| `'ed25519'` | Ed25519 | 1.3.101.112 |

86+

| `'ed448'` | Ed448 | 1.3.101.113 |

87+

| `'ml-dsa-44'`[^openssl35] | ML-DSA-44 | 2.16.840.1.101.3.4.3.17 |

88+

| `'ml-dsa-65'`[^openssl35] | ML-DSA-65 | 2.16.840.1.101.3.4.3.18 |

89+

| `'ml-dsa-87'`[^openssl35] | ML-DSA-87 | 2.16.840.1.101.3.4.3.19 |

90+

| `'ml-kem-1024'`[^openssl35] | ML-KEM-1024 | 2.16.840.1.101.3.4.4.3 |

91+

| `'ml-kem-512'`[^openssl35] | ML-KEM-512 | 2.16.840.1.101.3.4.4.1 |

92+

| `'ml-kem-768'`[^openssl35] | ML-KEM-768 | 2.16.840.1.101.3.4.4.2 |

93+

| `'rsa-pss'` | RSA PSS | 1.2.840.113549.1.1.10 |

94+

| `'rsa'` | RSA | 1.2.840.113549.1.1.1 |

95+

| `'slh-dsa-sha2-128f'`[^openssl35] | SLH-DSA-SHA2-128f | 2.16.840.1.101.3.4.3.21 |

96+

| `'slh-dsa-sha2-128s'`[^openssl35] | SLH-DSA-SHA2-128s | 2.16.840.1.101.3.4.3.22 |

97+

| `'slh-dsa-sha2-192f'`[^openssl35] | SLH-DSA-SHA2-192f | 2.16.840.1.101.3.4.3.23 |

98+

| `'slh-dsa-sha2-192s'`[^openssl35] | SLH-DSA-SHA2-192s | 2.16.840.1.101.3.4.3.24 |

99+

| `'slh-dsa-sha2-256f'`[^openssl35] | SLH-DSA-SHA2-256f | 2.16.840.1.101.3.4.3.25 |

100+

| `'slh-dsa-sha2-256s'`[^openssl35] | SLH-DSA-SHA2-256s | 2.16.840.1.101.3.4.3.26 |

101+

| `'slh-dsa-shake-128f'`[^openssl35] | SLH-DSA-SHAKE-128f | 2.16.840.1.101.3.4.3.27 |

102+

| `'slh-dsa-shake-128s'`[^openssl35] | SLH-DSA-SHAKE-128s | 2.16.840.1.101.3.4.3.28 |

103+

| `'slh-dsa-shake-192f'`[^openssl35] | SLH-DSA-SHAKE-192f | 2.16.840.1.101.3.4.3.29 |

104+

| `'slh-dsa-shake-192s'`[^openssl35] | SLH-DSA-SHAKE-192s | 2.16.840.1.101.3.4.3.30 |

105+

| `'slh-dsa-shake-256f'`[^openssl35] | SLH-DSA-SHAKE-256f | 2.16.840.1.101.3.4.3.31 |

106+

| `'slh-dsa-shake-256s'`[^openssl35] | SLH-DSA-SHAKE-256s | 2.16.840.1.101.3.4.3.32 |

107+

| `'x25519'` | X25519 | 1.3.101.110 |

108+

| `'x448'` | X448 | 1.3.101.111 |

9710998110

## Class: `Certificate`

99111

@@ -2046,6 +2058,9 @@ Other key details might be exposed via this API using additional attributes.

20462058

<!-- YAML

20472059

added: v11.6.0

20482060

changes:

2061+

- version: REPLACEME

2062+

pr-url: https://github.com/nodejs/node/pull/59537

2063+

description: Add support for SLH-DSA keys.

20492064

- version: v24.7.0

20502065

pr-url: https://github.com/nodejs/node/pull/59461

20512066

description: Add support for ML-KEM keys.

@@ -3911,6 +3926,9 @@ underlying hash function. See [`crypto.createHmac()`][] for more information.

39113926

<!-- YAML

39123927

added: v10.12.0

39133928

changes:

3929+

- version: REPLACEME

3930+

pr-url: https://github.com/nodejs/node/pull/59537

3931+

description: Add support for SLH-DSA key pairs.

39143932

- version: v24.7.0

39153933

pr-url: https://github.com/nodejs/node/pull/59461

39163934

description: Add support for ML-KEM key pairs.

@@ -4036,6 +4054,9 @@ a `Promise` for an `Object` with `publicKey` and `privateKey` properties.

40364054

<!-- YAML

40374055

added: v10.12.0

40384056

changes:

4057+

- version: REPLACEME

4058+

pr-url: https://github.com/nodejs/node/pull/59537

4059+

description: Add support for SLH-DSA key pairs.

40394060

- version: v24.7.0

40404061

pr-url: https://github.com/nodejs/node/pull/59461

40414062

description: Add support for ML-KEM key pairs.

@@ -5691,6 +5712,9 @@ Throws an error if FIPS mode is not available.

56915712

<!-- YAML

56925713

added: v12.0.0

56935714

changes:

5715+

- version: REPLACEME

5716+

pr-url: https://github.com/nodejs/node/pull/59537

5717+

description: Add support for SLH-DSA signing.

56945718

- version: v24.6.0

56955719

pr-url: https://github.com/nodejs/node/pull/59259

56965720

description: Add support for ML-DSA signing.

@@ -5807,6 +5831,9 @@ not introduce timing vulnerabilities.

58075831

<!-- YAML

58085832

added: v12.0.0

58095833

changes:

5834+

- version: REPLACEME

5835+

pr-url: https://github.com/nodejs/node/pull/59537

5836+

description: Add support for SLH-DSA signature verification.

58105837

- version: v24.6.0

58115838

pr-url: https://github.com/nodejs/node/pull/59259

58125839

description: Add support for ML-DSA signature verification.