[WebCrypto] fix ml-kem/ml-dsa CryptoKey serialization [chromium/src : main]

0 views
Skip to first unread message

Hubert Chao (Gerrit)

unread,
May 14, 2026, 2:42:04 PM (5 days ago) May 14
to David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
Attention needed from David Benjamin

Hubert Chao voted and added 2 comments

Votes added by Hubert Chao

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Hubert Chao . unresolved

With the new tests, I don't think we get much from adding a serialization round trip for ML-KEM/ML-DSA to `third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc`, so I left it off. Lemme know if you think we should still add one.

File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
Line 579, Patchset 3 (Latest): WriteOneByte(kNoParamsAsymmetricKeyTag);
WriteUint32(AlgorithmIdForWireFormat(algorithm.Id()));
WriteUint32(AsymmetricKeyTypeForWireFormat(key.GetType()));
break;
Hubert Chao . unresolved

@davi...@chromium.org I think it is possible to change Ed25519/X25519 serialization to use the new tag `kNoParamsAsymmetricKeyTag`, but have deserialization code support both the old `kEd25519KeyTag/kX5519KeyTag` and `kNoParamsAsymmetricKeyTag`.

 (we'd have to collapse `WebCryptoKeyAlgorithm::CreateEd25519/X25519` into `WebCryptoKeyAlgorithm::CreateWithoutParams`, but that's easy).

I'm not sure its worth it though, as it'd just make the code a bit more complex and we'd have to do work to get rid of the old tags, which doesn't seem like a good use of time.

thoughts?

Open in Gerrit

Related details

Attention is currently required from:
  • David Benjamin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
Gerrit-Change-Number: 7846315
Gerrit-PatchSet: 3
Gerrit-Owner: Hubert Chao <hc...@chromium.org>
Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: David Benjamin <davi...@chromium.org>
Gerrit-Comment-Date: Thu, 14 May 2026 18:41:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

David Benjamin (Gerrit)

unread,
May 14, 2026, 3:02:02 PM (5 days ago) May 14
to Hubert Chao, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
Attention needed from Hubert Chao

David Benjamin voted and added 2 comments

Votes added by David Benjamin

Code-Review+1

2 comments

File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
Line 578, Patchset 3 (Latest): case kWebCryptoAlgorithmIdMlKem1024: {
David Benjamin . unresolved

Optional: I think this new tag you added *also* works for symmetric, no-param algorithms. It's 4 more bytes than needed because `AsymmetricKeyTypeForWireFormat` is redundant but, if it's wrong, logic like this will flag it:
https://source.chromium.org/chromium/chromium/src/+/main:components/webcrypto/algorithms/chacha20_poly1305.cc;l=211

That means, if we want to reduce the number of lines we have to touch when we add a new algorithm, we *could* do something like:

  • Rename this to `kNoParamsWithKeyTypeTag` or something.
  • Special case the existing HKDF, PBKDF2, ChaCha20-Poly1305 symmetric algorithms to use `kNoParamsTag`
  • Leave all these new ones to the `default` case

Then the story will be that *all* no paramless algorithms use this generic codepath and don't need new lines. The exceptions are Ed25519, X25519, HKDF, PBKDF, and ChaCha20-Poly1305, which use other tags for historical reasons.

I.e. we only special case the old stuff and leave the new stuff straightforward.

WDYT? I'm fine with either. Mentioning this in case you think this would be better. It means, e.g., X-Wing doesn't have to touch this function.

Line 579, Patchset 3 (Latest): WriteOneByte(kNoParamsAsymmetricKeyTag);
WriteUint32(AlgorithmIdForWireFormat(algorithm.Id()));
WriteUint32(AsymmetricKeyTypeForWireFormat(key.GetType()));
break;
Hubert Chao . resolved

@davi...@chromium.org I think it is possible to change Ed25519/X25519 serialization to use the new tag `kNoParamsAsymmetricKeyTag`, but have deserialization code support both the old `kEd25519KeyTag/kX5519KeyTag` and `kNoParamsAsymmetricKeyTag`.

 (we'd have to collapse `WebCryptoKeyAlgorithm::CreateEd25519/X25519` into `WebCryptoKeyAlgorithm::CreateWithoutParams`, but that's easy).

I'm not sure its worth it though, as it'd just make the code a bit more complex and we'd have to do work to get rid of the old tags, which doesn't seem like a good use of time.

thoughts?

David Benjamin

Agreed it's probably not a good use of time.

Open in Gerrit

Related details

Attention is currently required from:
  • Hubert Chao
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
    Gerrit-Change-Number: 7846315
    Gerrit-PatchSet: 3
    Gerrit-Owner: Hubert Chao <hc...@chromium.org>
    Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
    Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Hubert Chao <hc...@chromium.org>
    Gerrit-Comment-Date: Thu, 14 May 2026 19:01:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Hubert Chao <hc...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Benjamin (Gerrit)

    unread,
    May 14, 2026, 3:04:09 PM (5 days ago) May 14
    to Hubert Chao, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
    Attention needed from Hubert Chao

    David Benjamin added 1 comment

    Patchset-level comments
    Hubert Chao . unresolved

    With the new tests, I don't think we get much from adding a serialization round trip for ML-KEM/ML-DSA to `third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc`, so I left it off. Lemme know if you think we should still add one.

    David Benjamin

    Yeah, I'm also inclined to say the WPT is good enough. Looking at RoundTripCryptoKeyX25519, ISTM the differences are:

    • It checks we preserve the extractable bit
    • It checks we preserve the usages bit

    I guess we could add that to the WPTs if we're concerned?

    Gerrit-Comment-Date: Thu, 14 May 2026 19:03:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Hubert Chao <hc...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hubert Chao (Gerrit)

    unread,
    May 15, 2026, 10:44:17 AM (4 days ago) May 15
    to David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
    Attention needed from David Benjamin

    Hubert Chao added 2 comments

    Patchset-level comments
    File-level comment, Patchset 3:
    Hubert Chao . resolved

    With the new tests, I don't think we get much from adding a serialization round trip for ML-KEM/ML-DSA to `third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules_test.cc`, so I left it off. Lemme know if you think we should still add one.

    David Benjamin

    Yeah, I'm also inclined to say the WPT is good enough. Looking at RoundTripCryptoKeyX25519, ISTM the differences are:

    • It checks we preserve the extractable bit
    • It checks we preserve the usages bit

    I guess we could add that to the WPTs if we're concerned?

    Hubert Chao

    I'm not super concerned about those; preserving the usages bit is something we could add without too much effort.

    extractables bit might be harder; think I might have an idea but I can make that another CL (along with the usages bit)

    File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
    Line 578, Patchset 3: case kWebCryptoAlgorithmIdMlKem1024: {
    David Benjamin . resolved

    Optional: I think this new tag you added *also* works for symmetric, no-param algorithms. It's 4 more bytes than needed because `AsymmetricKeyTypeForWireFormat` is redundant but, if it's wrong, logic like this will flag it:
    https://source.chromium.org/chromium/chromium/src/+/main:components/webcrypto/algorithms/chacha20_poly1305.cc;l=211

    That means, if we want to reduce the number of lines we have to touch when we add a new algorithm, we *could* do something like:

    • Rename this to `kNoParamsWithKeyTypeTag` or something.
    • Special case the existing HKDF, PBKDF2, ChaCha20-Poly1305 symmetric algorithms to use `kNoParamsTag`
    • Leave all these new ones to the `default` case

    Then the story will be that *all* no paramless algorithms use this generic codepath and don't need new lines. The exceptions are Ed25519, X25519, HKDF, PBKDF, and ChaCha20-Poly1305, which use other tags for historical reasons.

    I.e. we only special case the old stuff and leave the new stuff straightforward.

    WDYT? I'm fine with either. Mentioning this in case you think this would be better. It means, e.g., X-Wing doesn't have to touch this function.

    Hubert Chao

    I like the idea of making future no-key-param webcrypto algorithms (hopefully _all_ future webcrypto algorithms) not have to touch this code.

    Done; renamed a few things to make the naming make more sense.

    (I don't think this should break anything because as you said, the checks in DeserializeKeyForClone should catch it).

    oh also, because ChaCha is still not launched or even OTed, I changed ChaCha to use the new tag.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Benjamin
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
      Gerrit-Change-Number: 7846315
      Gerrit-PatchSet: 5
      Gerrit-Owner: Hubert Chao <hc...@chromium.org>
      Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
      Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-Attention: David Benjamin <davi...@chromium.org>
      Gerrit-Comment-Date: Fri, 15 May 2026 14:44:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Benjamin <davi...@chromium.org>
      Comment-In-Reply-To: Hubert Chao <hc...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      David Benjamin (Gerrit)

      unread,
      May 15, 2026, 3:39:39 PM (4 days ago) May 15
      to Hubert Chao, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
      Attention needed from Hubert Chao

      David Benjamin voted and added 3 comments

      Votes added by David Benjamin

      Code-Review+1

      3 comments

      File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
      Line 454, Patchset 6 (Latest): NOTREACHED() << "Unknown asymmetric key type " << key_type;
      David Benjamin . unresolved
      ```suggestion
      NOTREACHED() << "Unknown key type " << key_type;
      ```
      Line 579, Patchset 6 (Latest): DCHECK(WebCryptoAlgorithm::IsKdf(algorithm.Id()));
      David Benjamin . unresolved

      Think this DCHECK is pretty useless now. 😊

      File third_party/blink/renderer/bindings/modules/v8/serialization/web_crypto_sub_tags.h
      Line 86, Patchset 6 (Latest): kSecretKeyType = 3,
      David Benjamin . resolved

      Ohhhhh, *that's* why it worked that way. I missed that the key type encoding didn't even have an option for secret keys. Okay then!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hubert Chao
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
        Gerrit-Change-Number: 7846315
        Gerrit-PatchSet: 6
        Gerrit-Owner: Hubert Chao <hc...@chromium.org>
        Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
        Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-Attention: Hubert Chao <hc...@chromium.org>
        Gerrit-Comment-Date: Fri, 15 May 2026 19:39:33 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Hubert Chao (Gerrit)

        unread,
        May 15, 2026, 4:29:47 PM (4 days ago) May 15
        to Daniel Cheng, David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
        Attention needed from Daniel Cheng

        Hubert Chao added 2 comments

        File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
        Line 454, Patchset 6: NOTREACHED() << "Unknown asymmetric key type " << key_type;
        David Benjamin . resolved
        ```suggestion
        NOTREACHED() << "Unknown key type " << key_type;
        ```
        Hubert Chao

        missed that. done.

        Line 579, Patchset 6: DCHECK(WebCryptoAlgorithm::IsKdf(algorithm.Id()));
        David Benjamin . resolved

        Think this DCHECK is pretty useless now. 😊

        Hubert Chao

        totally.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniel Cheng
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
          Gerrit-Change-Number: 7846315
          Gerrit-PatchSet: 8
          Gerrit-Owner: Hubert Chao <hc...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
          Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
          Gerrit-Comment-Date: Fri, 15 May 2026 20:29:40 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Daniel Cheng (Gerrit)

          unread,
          May 15, 2026, 11:57:59 PM (3 days ago) May 15
          to Hubert Chao, Daniel Cheng, David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org
          Attention needed from Hubert Chao

          Daniel Cheng voted and added 1 comment

          Votes added by Daniel Cheng

          Code-Review+1

          1 comment

          File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
          Line 565, Patchset 8 (Latest): // params for the key should use the default case.
          Daniel Cheng . unresolved

          I'm just curious: this says "fix the serialization"; was anything potentially serialized with the broken serialization, and do we break those things from deserializing successfully?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Hubert Chao
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
          Gerrit-Change-Number: 7846315
          Gerrit-PatchSet: 8
          Gerrit-Owner: Hubert Chao <hc...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
          Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-Attention: Hubert Chao <hc...@chromium.org>
          Gerrit-Comment-Date: Sat, 16 May 2026 03:57:01 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hubert Chao (Gerrit)

          unread,
          May 16, 2026, 9:08:11 AM (3 days ago) May 16
          to Daniel Cheng, David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org

          Hubert Chao added 1 comment

          File third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
          Line 565, Patchset 8 (Latest): // params for the key should use the default case.
          Daniel Cheng . resolved

          I'm just curious: this says "fix the serialization"; was anything potentially serialized with the broken serialization, and do we break those things from deserializing successfully?

          Hubert Chao

          Nope. Any attempt to serialize a ML-DSA/ML-KEM key before this fix would have resulted in an unusable key.

          You can see this from the WPT results on the previous CL (crrev.com/c/7842729)

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
            Gerrit-Change-Number: 7846315
            Gerrit-PatchSet: 8
            Gerrit-Owner: Hubert Chao <hc...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
            Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-Comment-Date: Sat, 16 May 2026 13:08:00 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
            satisfied_requirement
            open
            diffy

            Hubert Chao (Gerrit)

            unread,
            May 16, 2026, 6:41:56 PM (2 days ago) May 16
            to Daniel Cheng, David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org

            Hubert Chao voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
            Gerrit-Change-Number: 7846315
            Gerrit-PatchSet: 8
            Gerrit-Owner: Hubert Chao <hc...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
            Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-Comment-Date: Sat, 16 May 2026 22:41:47 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Chromium LUCI CQ (Gerrit)

            unread,
            May 16, 2026, 7:59:27 PM (2 days ago) May 16
            to Hubert Chao, Daniel Cheng, David Benjamin, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, jbroma...@chromium.org

            Chromium LUCI CQ submitted the change

            Change information

            Commit message:
            [WebCrypto] fix ml-kem/ml-dsa CryptoKey serialization

            Add a new tag for key serialization (kNoParamsWithKeyTypeKeyTag) so that
            no code modification is needed for serialization of new algorithms with
            no key parameters. Use this to fix ML-KEM and ML-DSA key
            serialization/deserialization, and change ChaCha20-Poly1305
            serialization to use the new tag as well.

            It would be nice to get rid of the Ed25519/X25519 specific
            CryptoKeySubTags, but removing those would break currently serialized
            Ed25519/X25519 tags.
            Bug: 512509718
            Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
            Reviewed-by: David Benjamin <davi...@chromium.org>
            Reviewed-by: Daniel Cheng <dch...@chromium.org>
            Commit-Queue: Hubert Chao <hc...@chromium.org>
            Cr-Commit-Position: refs/heads/main@{#1631817}
            Files:
            • M third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
            • M third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
            • M third_party/blink/renderer/bindings/modules/v8/serialization/web_crypto_sub_tags.h
            • M third_party/blink/web_tests/virtual/webcrypto-pqc/external/wpt/WebCryptoAPI/serialization/mldsa.tentative.https.window-expected.txt
            • M third_party/blink/web_tests/virtual/webcrypto-pqc/external/wpt/WebCryptoAPI/serialization/mlkem.tentative.https.window-expected.txt
            Change size: M
            Delta: 5 files changed, 49 insertions(+), 41 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by David Benjamin, +1 by Daniel Cheng
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: If37e0a11af116c9c1bb56f4c21bf4cf78e37b0e5
            Gerrit-Change-Number: 7846315
            Gerrit-PatchSet: 9
            Gerrit-Owner: Hubert Chao <hc...@chromium.org>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
            Gerrit-Reviewer: Hubert Chao <hc...@chromium.org>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages