Skip to content

Commit 247f97e

Browse files
committed
crypto: add Hybrid KEMs to Web Cryptography
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
1 parent 4cd3d98 commit 247f97e

17 files changed

Lines changed: 2207 additions & 35 deletions

doc/api/webcrypto.md

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
<!-- YAML
44
changes:
5+
- version: REPLACEME
6+
pr-url: https://github.com/nodejs/node/pull/XXXXX
7+
description: Hybrid KEM algorithms are now supported.
58
- version:
69
- v25.9.0
710
- v24.18.0
@@ -136,6 +139,9 @@ Algorithms:
136139
* `'ML-KEM-512'`[^openssl35]
137140
* `'ML-KEM-768'`[^openssl35]
138141
* `'ML-KEM-1024'`[^openssl35]
142+
* `'MLKEM768-P256'`[^openssl35]
143+
* `'MLKEM768-X25519'`[^openssl35]
144+
* `'MLKEM1024-P384'`[^openssl35]
139145
* `'SHA3-256'`
140146
* `'SHA3-384'`
141147
* `'SHA3-512'`
@@ -531,9 +537,10 @@ Crypto API implementation and the APIs supported for each:
531537
`'ECDSA'`, `'Ed25519'`, `'Ed448'`[^secure-curves],
532538
`'ML-DSA-44'`[^modern-algos], `'ML-DSA-65'`[^modern-algos],
533539
`'ML-DSA-87'`[^modern-algos], `'ML-KEM-512'`[^modern-algos],
534-
`'ML-KEM-768'`[^modern-algos], `'ML-KEM-1024'`[^modern-algos], `'RSA-OAEP'`,
535-
`'RSA-PSS'`, `'RSASSA-PKCS1-v1_5'`, `'X25519'`, and
536-
`'X448'`[^secure-curves].
540+
`'ML-KEM-768'`[^modern-algos], `'ML-KEM-1024'`[^modern-algos],
541+
`'MLKEM768-P256'`[^modern-algos], `'MLKEM768-X25519'`[^modern-algos],
542+
`'MLKEM1024-P384'`[^modern-algos], `'RSA-OAEP'`, `'RSA-PSS'`,
543+
`'RSASSA-PKCS1-v1_5'`, `'X25519'`, and `'X448'`[^secure-curves].
537544
538545
### Crypto Operation APIs
539546
@@ -553,8 +560,10 @@ Crypto API implementation and the APIs supported for each:
553560
`'ChaCha20-Poly1305'`[^modern-algos], and `'RSA-OAEP'`.
554561
* [`subtle.encapsulateBits()`][], [`subtle.decapsulateBits()`][],
555562
[`subtle.encapsulateKey()`][], and [`subtle.decapsulateKey()`][] support
556-
`'ML-KEM-512'`[^modern-algos], `'ML-KEM-768'`[^modern-algos], and
557-
`'ML-KEM-1024'`[^modern-algos].
563+
`'ML-KEM-512'`[^modern-algos], `'ML-KEM-768'`[^modern-algos],
564+
`'ML-KEM-1024'`[^modern-algos], `'MLKEM768-P256'`[^modern-algos],
565+
`'MLKEM768-X25519'`[^modern-algos], and
566+
`'MLKEM1024-P384'`[^modern-algos].
558567
* [`subtle.digest()`][] supports `'cSHAKE128'`[^modern-algos],
559568
`'cSHAKE256'`[^modern-algos], `'KT128'`[^modern-algos],
560569
`'KT256'`[^modern-algos], `'SHA-1'`, `'SHA-256'`, `'SHA-384'`, `'SHA-512'`,
@@ -586,6 +595,10 @@ and [`subtle.exportKey()`][].
586595
`'ML-KEM-768'`[^modern-algos], and `'ML-KEM-1024'`[^modern-algos]** can be
587596
imported and exported using `'spki'`, `'pkcs8'`, `'jwk'`,
588597
`'raw-public'`[^modern-algos], and `'raw-seed'`[^modern-algos].
598+
* **`'MLKEM768-P256'`[^modern-algos],
599+
`'MLKEM768-X25519'`[^modern-algos], and
600+
`'MLKEM1024-P384'`[^modern-algos]** can be imported and exported using
601+
`'jwk'`, `'raw-public'`[^modern-algos], and `'raw-seed'`[^modern-algos].
589602
* **`'RSA-OAEP'`, `'RSA-PSS'`, and `'RSASSA-PKCS1-v1_5'`** can be imported
590603
and exported using `'spki'`, `'pkcs8'`, and `'jwk'`.
591604
@@ -790,6 +803,9 @@ The algorithms currently supported include:
790803
* `'ML-KEM-512'`[^modern-algos]
791804
* `'ML-KEM-768'`[^modern-algos]
792805
* `'ML-KEM-1024'`[^modern-algos]
806+
* `'MLKEM768-P256'`[^modern-algos]
807+
* `'MLKEM768-X25519'`[^modern-algos]
808+
* `'MLKEM1024-P384'`[^modern-algos]
793809
794810
### `subtle.decapsulateKey(decapsulationAlgorithm, decapsulationKey, ciphertext, sharedKeyAlgorithm, extractable, keyUsages)`
795811
@@ -816,6 +832,9 @@ The algorithms currently supported include:
816832
* `'ML-KEM-512'`[^modern-algos]
817833
* `'ML-KEM-768'`[^modern-algos]
818834
* `'ML-KEM-1024'`[^modern-algos]
835+
* `'MLKEM768-P256'`[^modern-algos]
836+
* `'MLKEM768-X25519'`[^modern-algos]
837+
* `'MLKEM1024-P384'`[^modern-algos]
819838
820839
### `subtle.decrypt(algorithm, key, data)`
821840
@@ -1014,6 +1033,9 @@ The algorithms currently supported include:
10141033
* `'ML-KEM-512'`[^modern-algos]
10151034
* `'ML-KEM-768'`[^modern-algos]
10161035
* `'ML-KEM-1024'`[^modern-algos]
1036+
* `'MLKEM768-P256'`[^modern-algos]
1037+
* `'MLKEM768-X25519'`[^modern-algos]
1038+
* `'MLKEM1024-P384'`[^modern-algos]
10171039
10181040
### `subtle.encapsulateKey(encapsulationAlgorithm, encapsulationKey, sharedKeyAlgorithm, extractable, keyUsages)`
10191041
@@ -1038,6 +1060,9 @@ The algorithms currently supported include:
10381060
* `'ML-KEM-512'`[^modern-algos]
10391061
* `'ML-KEM-768'`[^modern-algos]
10401062
* `'ML-KEM-1024'`[^modern-algos]
1063+
* `'MLKEM768-P256'`[^modern-algos]
1064+
* `'MLKEM768-X25519'`[^modern-algos]
1065+
* `'MLKEM1024-P384'`[^modern-algos]
10411066
10421067
### `subtle.encrypt(algorithm, key, data)`
10431068
@@ -1076,6 +1101,9 @@ The algorithms currently supported include:
10761101
<!-- YAML
10771102
added: v15.0.0
10781103
changes:
1104+
- version: REPLACEME
1105+
pr-url: https://github.com/nodejs/node/pull/XXXXX
1106+
description: Hybrid KEM algorithms are now supported.
10791107
- version:
10801108
- v26.1.0
10811109
- v24.18.0
@@ -1142,6 +1170,9 @@ Derives the public key from a given private key.
11421170
<!-- YAML
11431171
added: v15.0.0
11441172
changes:
1173+
- version: REPLACEME
1174+
pr-url: https://github.com/nodejs/node/pull/XXXXX
1175+
description: Hybrid KEM algorithms are now supported.
11451176
- version: v24.8.0
11461177
pr-url: https://github.com/nodejs/node/pull/59647
11471178
description: KMAC algorithms are now supported.
@@ -1183,6 +1214,9 @@ include:
11831214
* `'ML-KEM-512'`[^modern-algos]
11841215
* `'ML-KEM-768'`[^modern-algos]
11851216
* `'ML-KEM-1024'`[^modern-algos]
1217+
* `'MLKEM768-P256'`[^modern-algos]
1218+
* `'MLKEM768-X25519'`[^modern-algos]
1219+
* `'MLKEM1024-P384'`[^modern-algos]
11861220
* `'RSA-OAEP'`
11871221
* `'RSA-PSS'`
11881222
* `'RSASSA-PKCS1-v1_5'`
@@ -1206,6 +1240,9 @@ The {CryptoKey} (secret key) generating algorithms supported include:
12061240
<!-- YAML
12071241
added: v15.0.0
12081242
changes:
1243+
- version: REPLACEME
1244+
pr-url: https://github.com/nodejs/node/pull/XXXXX
1245+
description: Hybrid KEM algorithms are now supported.
12091246
- version:
12101247
- v26.1.0
12111248
- v24.18.0
@@ -1379,6 +1416,9 @@ The unwrapped key algorithms supported include:
13791416
* `'ML-KEM-512'`[^modern-algos]
13801417
* `'ML-KEM-768'`[^modern-algos]
13811418
* `'ML-KEM-1024'`[^modern-algos]
1419+
* `'MLKEM768-P256'`[^modern-algos]
1420+
* `'MLKEM768-X25519'`[^modern-algos]
1421+
* `'MLKEM1024-P384'`[^modern-algos]
13821422
* `'RSA-OAEP'`
13831423
* `'RSA-PSS'`
13841424
* `'RSASSA-PKCS1-v1_5'`

0 commit comments

Comments
 (0)