Skip to content

[WebCryptoAPI] Expand supports() validation coverage - #62115

Merged
panva merged 1 commit into
web-platform-tests:masterfrom
panva:webcrypto-ecdh-derivebits-errors
Aug 21, 2026
Merged

panva merged 1 commit into
web-platform-tests:masterfrom
panva:webcrypto-ecdh-derivebits-errors

Conversation

@panva

@panva panva commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Keep ECDH mismatched-curve cases independent of the existing overlength deriveBits tests. Add supports() coverage for RSA, HKDF, HMAC, EC derivation and import, ML-DSA contexts, and ML-KEM imported keys.

Refs: w3c/webcrypto#560
Refs: w3c/webcrypto#558
Refs: WICG/webcrypto-modern-algos#76
Refs: WICG/webcrypto-modern-algos#77

Keep ECDH mismatched-curve cases independent of the existing overlength
deriveBits tests. Add supports() coverage for RSA, HKDF, HMAC, EC
derivation and import, ML-DSA contexts, and ML-KEM imported keys.

Refs: w3c/webcrypto#560
Refs: w3c/webcrypto#558
Refs: WICG/webcrypto-modern-algos#76
Refs: WICG/webcrypto-modern-algos#77
@panva
panva merged commit e235e08 into web-platform-tests:master Aug 21, 2026
28 checks passed
@panva
panva deleted the webcrypto-ecdh-derivebits-errors branch August 21, 2026 19:19
jdm pushed a commit to jdm/servo that referenced this pull request Sep 1, 2026
…7545)

WebCrypto API specification has updated some cryptography operations in
order to expand `supports()` validation coverage. We follow the updates.

The update basically consists of moving all parameter validation to the
beginning of the operations, and adding some new parameter validation
which were done implicitly. Therefore, these operations should not have
observable changes from user perspective.

Meanwhile, since the actually implementation of Step 8 of the **check
support for an algorithm** algorithm is based on how these operations
are written, and it follows the above changes, the `supports()` method,
which relies on the **check support for an algorithm** algorithm,
improves its validation coverage.

We also update our comment next to Step 8 based on the discussion in
WICG/webcrypto-modern-algos#74.

Spec Update: w3c/webcrypto#558
WPT Update: web-platform-tests/wpt#62115

Testing: Pass more WPT tests.

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
lumiscosity pushed a commit to lumiscosity/servo that referenced this pull request Sep 3, 2026
Modern Algorithm in WebCrypto API specification has updated the sign and
verify operations of ML-DSA, in order to improve `supports()` method
validation coverage.

We follow the update to add a step to check the context length at the
beginning of the sign and verify operations of ML-DSA.

The implementation of Step 8 of the **check support for an algorithm**
algorithm also follows these changes.

Spec Update: WICG/webcrypto-modern-algos#76
WPT Update: web-platform-tests/wpt#62115

Testing: Pass more WPT tests.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…7545)

WebCrypto API specification has updated some cryptography operations in
order to expand `supports()` validation coverage. We follow the updates.

The update basically consists of moving all parameter validation to the
beginning of the operations, and adding some new parameter validation
which were done implicitly. Therefore, these operations should not have
observable changes from user perspective.

Meanwhile, since the actually implementation of Step 8 of the **check
support for an algorithm** algorithm is based on how these operations
are written, and it follows the above changes, the `supports()` method,
which relies on the **check support for an algorithm** algorithm,
improves its validation coverage.

We also update our comment next to Step 8 based on the discussion in
WICG/webcrypto-modern-algos#74.

Spec Update: w3c/webcrypto#558
WPT Update: web-platform-tests/wpt#62115

Testing: Pass more WPT tests.

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
Modern Algorithm in WebCrypto API specification has updated the sign and
verify operations of ML-DSA, in order to improve `supports()` method
validation coverage.

We follow the update to add a step to check the context length at the
beginning of the sign and verify operations of ML-DSA.

The implementation of Step 8 of the **check support for an algorithm**
algorithm also follows these changes.

Spec Update: WICG/webcrypto-modern-algos#76
WPT Update: web-platform-tests/wpt#62115

Testing: Pass more WPT tests.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Psychpsyo pushed a commit to Psychpsyo/servo that referenced this pull request Oct 12, 2026
…7545)

WebCrypto API specification has updated some cryptography operations in
order to expand `supports()` validation coverage. We follow the updates.

The update basically consists of moving all parameter validation to the
beginning of the operations, and adding some new parameter validation
which were done implicitly. Therefore, these operations should not have
observable changes from user perspective.

Meanwhile, since the actually implementation of Step 8 of the **check
support for an algorithm** algorithm is based on how these operations
are written, and it follows the above changes, the `supports()` method,
which relies on the **check support for an algorithm** algorithm,
improves its validation coverage.

We also update our comment next to Step 8 based on the discussion in
WICG/webcrypto-modern-algos#74.

Spec Update: w3c/webcrypto#558
WPT Update: web-platform-tests/wpt#62115

Testing: Pass more WPT tests.

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Psychpsyo pushed a commit to Psychpsyo/servo that referenced this pull request Oct 12, 2026
Modern Algorithm in WebCrypto API specification has updated the sign and
verify operations of ML-DSA, in order to improve `supports()` method
validation coverage.

We follow the update to add a step to check the context length at the
beginning of the sign and verify operations of ML-DSA.

The implementation of Step 8 of the **check support for an algorithm**
algorithm also follows these changes.

Spec Update: WICG/webcrypto-modern-algos#76
WPT Update: web-platform-tests/wpt#62115

Testing: Pass more WPT tests.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants