Skip to content

Commit db65e65

Browse files
committed
crypto: import ML-KEM raw seeds as raw-seed
Use the raw-seed key format constant for WebCrypto ML-KEM raw-seed imports instead of passing the raw-private constant to native key import. Signed-off-by: Filip Skokan <panva.ip@gmail.com>
1 parent 91a9434 commit db65e65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/internal/crypto/ml_kem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const {
1313
KEMDecapsulateJob,
1414
KEMEncapsulateJob,
1515
kKeyFormatDER,
16-
kKeyFormatRawPrivate,
1716
kKeyFormatRawPublic,
17+
kKeyFormatRawSeed,
1818
kWebCryptoKeyFormatPKCS8,
1919
kWebCryptoKeyFormatRaw,
2020
kWebCryptoKeyFormatSPKI,
@@ -178,7 +178,7 @@ function mlKemImportKey(
178178
case 'raw-seed': {
179179
const isPublic = format === 'raw-public';
180180
verifyAcceptableMlKemKeyUse(name, isPublic, usagesSet);
181-
handle = importRawKey(isPublic, keyData, isPublic ? kKeyFormatRawPublic : kKeyFormatRawPrivate, name);
181+
handle = importRawKey(isPublic, keyData, isPublic ? kKeyFormatRawPublic : kKeyFormatRawSeed, name);
182182
break;
183183
}
184184
case 'jwk': {

0 commit comments

Comments
 (0)