From 6bc1db34683fe52109918b74c447aaf0ae6556d5 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Tue, 1 Oct 2024 14:01:05 +0200 Subject: [PATCH 1/2] crypto: remove experimental Curve448 WebCryptoAPI algorithms --- doc/api/webcrypto.md | 77 +++++++------------ lib/internal/crypto/cfrg.js | 39 ---------- lib/internal/crypto/diffiehellman.js | 5 +- lib/internal/crypto/util.js | 12 --- lib/internal/crypto/webcrypto.js | 31 -------- lib/internal/crypto/webidl.js | 10 --- test/fixtures/crypto/eddsa.js | 15 +--- .../test-webcrypto-derivebits-cfrg.js | 53 ++++--------- .../test-webcrypto-derivebits-ecdh.js | 2 +- test/parallel/test-webcrypto-derivebits.js | 3 +- .../parallel/test-webcrypto-derivekey-cfrg.js | 48 +++--------- .../parallel/test-webcrypto-derivekey-ecdh.js | 2 +- test/parallel/test-webcrypto-derivekey.js | 3 +- .../test-webcrypto-export-import-cfrg.js | 50 +----------- test/parallel/test-webcrypto-keygen.js | 24 ------ .../test-webcrypto-sign-verify-eddsa.js | 31 -------- test/parallel/test-webcrypto-sign-verify.js | 20 ----- test/parallel/test-webcrypto-webidl.js | 10 --- test/parallel/test-webcrypto-wrap-unwrap.js | 16 ---- test/wpt/status/WebCryptoAPI.cjs | 33 ++++++++ 20 files changed, 93 insertions(+), 391 deletions(-) diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index 27c37bf4829f3e..5410d7df852fb4 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -2,6 +2,9 @@ -* `algorithm`: {AlgorithmIdentifier|RsaPssParams|EcdsaParams|Ed448Params} +* `algorithm`: {AlgorithmIdentifier|RsaPssParams|EcdsaParams} * `key`: {CryptoKey} * `data`: {ArrayBuffer|TypedArray|DataView|Buffer} * Returns: {Promise} Fulfills with an {ArrayBuffer} @@ -884,7 +891,6 @@ The algorithms currently supported include: * `'RSA-PSS'` * `'ECDSA'` * `'Ed25519'` [^1] -* `'Ed448'` [^1] * `'HMAC'` ### `subtle.unwrapKey(format, wrappedKey, unwrappingKey, unwrapAlgo, unwrappedKeyAlgo, extractable, keyUsages)` @@ -932,10 +938,8 @@ The unwrapped key algorithms supported include: * `'RSA-OAEP'` * `'ECDSA'` * `'Ed25519'` [^1] -* `'Ed448'` [^1] * `'ECDH'` * `'X25519'` [^1] -* `'X448'` [^1] * `'HMAC'` * `'AES-CTR'` * `'AES-CBC'` @@ -947,6 +951,9 @@ The unwrapped key algorithms supported include: -* `algorithm`: {AlgorithmIdentifier|RsaPssParams|EcdsaParams|Ed448Params} +* `algorithm`: {AlgorithmIdentifier|RsaPssParams|EcdsaParams} * `key`: {CryptoKey} * `signature`: {ArrayBuffer|TypedArray|DataView|Buffer} * `data`: {ArrayBuffer|TypedArray|DataView|Buffer} @@ -975,7 +982,6 @@ The algorithms currently supported include: * `'RSA-PSS'` * `'ECDSA'` * `'Ed25519'` [^1] -* `'Ed448'` [^1] * `'HMAC'` ### `subtle.wrapKey(format, key, wrappingKey, wrapAlgo)` @@ -1188,7 +1194,7 @@ added: v15.0.0 added: v15.0.0 --> -* Type: {string} Must be `'ECDH'`, `'X25519'`, or `'X448'`. +* Type: {string} Must be `'ECDH'` or `'X25519'` #### `ecdhKeyDeriveParams.public` @@ -1279,37 +1285,6 @@ added: v15.0.0 * Type: {string} Must be one of `'P-256'`, `'P-384'`, `'P-521'`. -### Class: `Ed448Params` - - - -#### `ed448Params.name` - - - -* Type: {string} Must be `'Ed448'`. - -#### `ed448Params.context` - - - -* Type: {ArrayBuffer|TypedArray|DataView|Buffer|undefined} - -The `context` member represents the optional context data to associate with -the message. -The Node.js Web Crypto API implementation only supports zero-length context -which is equivalent to not providing context at all. - ### Class: `HkdfParams` -* Type: {string} Must be `'ECDH'` or `'X25519'` +* Type: {string} Must be `'ECDH'` or `'X25519'`. #### `ecdhKeyDeriveParams.public`