Skip to content

script: Fix alg field of exported ML-KEM key in JWK format#41627

Merged
yezhizhen merged 2 commits intoservo:mainfrom
kkoyung:fix-ml-kem-name-in-jwk
Jan 2, 2026
Merged

script: Fix alg field of exported ML-KEM key in JWK format#41627
yezhizhen merged 2 commits intoservo:mainfrom
kkoyung:fix-ml-kem-name-in-jwk

Conversation

@kkoyung
Copy link
Copy Markdown
Member

@kkoyung kkoyung commented Jan 2, 2026

We wrongly use the object identifier of ML-KEM for the alg field of exported ML-KEM key in JWK format. We should use the values specified in Section 8 of [draft-ietf-jose-pqc-kem-01] (Figure 1) instead.

[draft-ietf-jose-pqc-kem-01] (Figure 1):
https://www.ietf.org/archive/id/draft-ietf-jose-pqc-kem-01.html#direct-table

Testing: WPT currently does not have relevant tests for ML-KEM keys in JWK format since The JWK format for ML-KEM is not standardized yet. We strive to remain compliant with the current specification.

We wrongly use the object identifier of ML-KEM for the `alg` field of
exported ML-KEM key in JWK format. We should use the values specified in
Section 8 of [draft-ietf-jose-pqc-kem-01] (Figure 1) instead.

[draft-ietf-jose-pqc-kem-01] (Figure 1):
https://www.ietf.org/archive/id/draft-ietf-jose-pqc-kem-01.html#direct-table

Testing: WPT currently does not have relevant tests for ML-KEM keys in
JWK format since The JWK format for ML-KEM is not standardized yet. We
aim to remain compliant with the current specification.

Signed-off-by: Kingsley Yung <[email protected]>
@kkoyung kkoyung requested a review from gterzian as a code owner January 2, 2026 08:58
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 2, 2026
ALG_ML_KEM_512 => ID_ALG_ML_KEM_512,
ALG_ML_KEM_768 => ID_ALG_ML_KEM_768,
ALG_ML_KEM_1024 => ID_ALG_ML_KEM_1024,
ALG_ML_KEM_512 => "MLKEM512",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Copy Markdown
Member

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 2, 2026
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 2, 2026
@yezhizhen yezhizhen enabled auto-merge January 2, 2026 09:28
@yezhizhen yezhizhen added this pull request to the merge queue Jan 2, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 2, 2026
Merged via the queue into servo:main with commit 00792e0 Jan 2, 2026
32 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 2, 2026
@kkoyung kkoyung deleted the fix-ml-kem-name-in-jwk branch January 9, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants