[webkit-changes] [WebKit/WebKit] 9586d3: Define the deriveBits length parameter as optional
Javier Fernandez Garcia-Boente
noreply at github.com
Tue Jul 23 04:24:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9586d3db576cdc891e0c33934825534cd3a7766a
https://github.com/WebKit/WebKit/commit/9586d3db576cdc891e0c33934825534cd3a7766a
Author: Javier Fernandez <jfernandez at igalia.com>
Date: 2024-07-23 (Tue, 23 Jul 2024)
Changed paths:
M LayoutTests/crypto/subtle/derive-bits-malformed-parameters-expected.txt
M LayoutTests/crypto/subtle/derive-bits-malformed-parameters.html
M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/derived_bits_length.https.any-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/derived_bits_length.https.any.worker-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/idlharness.https.any-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/idlharness.https.any.worker-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/interfaces/WebCryptoAPI.idl
M Source/WebCore/crypto/CryptoAlgorithm.cpp
M Source/WebCore/crypto/CryptoAlgorithm.h
M Source/WebCore/crypto/SubtleCrypto.cpp
M Source/WebCore/crypto/SubtleCrypto.h
M Source/WebCore/crypto/SubtleCrypto.idl
M Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.h
M Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.cpp
M Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.h
Log Message:
-----------
Define the deriveBits length parameter as optional
https://bugs.webkit.org/show_bug.cgi?id=276394
Reviewed by Youenn Fablet and Nitin Mahendru.
The PR#345 [1] to the WebCryptoAPI spec defines now the 'length'
parameter as optional, defaulting to 'null'. This change tries to
solve a long-standing interoperability issue in the deriveBits
operation.
This patch implements the required changes in the IDL so that the
'length' parameter is declared as optional, with 'null' as default
value when omitted. The affected algorithms (ECDH, HKDF, PBKDF2
and X25519) are adapted to the parameter's new type.
The PR#43400 [2] defined tests for the new behavior of the afected
algorithms, which they all pass now.
[1] https://github.com/w3c/webcrypto/pull/345
[2] https://github.com/web-platform-tests/wpt/pull/43400
* LayoutTests/crypto/subtle/derive-bits-malformed-parameters-expected.txt:
* LayoutTests/crypto/subtle/derive-bits-malformed-parameters.html:
* LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/derived_bits_length.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/derived_bits_length.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/idlharness.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/idlharness.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/interfaces/WebCryptoAPI.idl:
* Source/WebCore/crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::deriveBits):
* Source/WebCore/crypto/CryptoAlgorithm.h:
* Source/WebCore/crypto/SubtleCrypto.cpp:
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::deriveBits):
* Source/WebCore/crypto/SubtleCrypto.h:
* Source/WebCore/crypto/SubtleCrypto.idl:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.cpp:
(WebCore::CryptoAlgorithmECDH::deriveBits):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmECDH.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.cpp:
(WebCore::CryptoAlgorithmHKDF::deriveBits):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmHKDF.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:
(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmPBKDF2.h:
* Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.cpp:
(WebCore::CryptoAlgorithmX25519::deriveBits):
* Source/WebCore/crypto/algorithms/CryptoAlgorithmX25519.h:
Canonical link: https://commits.webkit.org/281240@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list