-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update Composite ML-DSA to draft 8 #120077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Composite ML-DSA to draft 8 #120077
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Composite ML-DSA implementation to align with draft 8 of the specification. The key changes include removing randomizers from signatures, updating domain separators to use algorithm names (now called "labels"), and enforcing stricter ECPrivateKey formatting requirements.
- Removes 32-byte randomizers from signature format, reducing signature sizes
- Updates domain separators to use algorithm names instead of OIDs for stability
- Enforces that ECPrivateKey components must omit publicKey and parameters fields
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/EccKeyFormatHelper.cs | Adds inline validation logic for ECPrivateKey format, replacing external helper function |
src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj | Removes reference to shared EccKeyFormatHelper file |
src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj | Removes reference to shared EccKeyFormatHelper file |
src/libraries/Common/tests/System/Security/Cryptography/CompositeMLDsaAlgorithmTests.cs | Updates signature size expectations by removing 32-byte randomizer |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestsBase.cs | Updates signature validation tests to reflect new format without randomizer |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs | Updates OIDs and ECPrivateKey size calculations |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaMockImplementation.cs | Updates signature length assertions |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs | Updates private key import tests for new ECPrivateKey restrictions |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaContractTests.cs | Updates signature bounds calculations |
src/libraries/Common/src/System/Security/Cryptography/Oids.cs | Updates OID values to match draft 8 |
src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs | Deletes shared helper file |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaManaged.cs | Major refactoring to remove randomizer handling and update domain separators to labels |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaManaged.ECDsa.cs | Enforces ECPrivateKey format restrictions by rejecting parameters and publicKey fields |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs | Removes randomizer constants and updates signature size calculations |
.../Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs
Show resolved
Hide resolved
...m/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs
Show resolved
Hide resolved
/backport to release/10.0 |
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/18021553476 |
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
📋 Breaking Change Documentation RequiredCreate a breaking change issue with AI-generated content Generated by Breaking Change Documentation Tool - 2025-10-03 12:19:42 |
📋 Breaking Change Documentation RequiredCreate a breaking change issue with AI-generated content Generated by Breaking Change Documentation Tool - 2025-10-03 12:50:54 |
Added the breaking change doc. I clicked on the auto-gen link, but threw away most of its content, since it was trying to describe the behavioral changes, and to justify them (FWIW, the justification was entirely bogus hallucination). It'd probably be more useful for a change other than "moved to the current version of a spec" 😄. |
Composite ML-DSA spec release draft 8 recently, and this PR updates our implementation with the changes. The draft diff is here.