Define the deriveBits length parameter as optional 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 CL implements the required changes in the IDL so that the 'length' parameter is declared as optional, with 'null' as default value when omitted. The CL also changes the signature of the affected algorithms: ECDH, HKDF, PBKDF2 and X25519. Additionally, this CL also fixes a long interop issue in the HKDF to throw an OperationError, instead of TypeError, when the length is null or omitted, matching the current draft of the spec. The PR#43400 [2] defined tests for the new behavior of the afected algorithms, which Chrome passes except for the case of HKDF with length=0 (see the PR#275 [3] for details) [1] https://github.com/w3c/webcrypto/pull/345 [2] https://github.com/web-platform-tests/wpt/pull/43400 [3] https://github.com/w3c/webcrypto/pull/275 Bug: 40265696 Change-Id: I39ad6823b7013b3d07ac7d2b9d8a2622f86fa547 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5686232 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: David Benjamin <davidben@chromium.org> Cr-Commit-Position: refs/heads/main@{#1344421}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.