-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[release/10.0] Composite ML-DSA Draft 12 and 13 updates (#120601, #120961) #121555
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
[release/10.0] Composite ML-DSA Draft 12 and 13 updates (#120601, #120961) #121555
Conversation
[Draft 12](https://datatracker.ietf.org/doc/html/draft-ietf-lamps-pq-composite-sigs-12) of the Composite ML-DSA spec now requires the parameters to be present for `ECPrivateKey`. This PR implements these changes in our managed Composite ML-DSA implementation. --------- Co-authored-by: Kevin Jones <[email protected]>
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
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 backports Draft 12 specification changes for Composite ML-DSA that mandate the presence of the parameters field in ECPrivateKey structures. Previously, per Draft 8, parameters were omitted; now they must be present with the correct named curve OID for spec conformance.
- Updates ECPrivateKey serialization to include mandatory parameters field with context-specific tag [0]
- Adds validation to reject keys with missing, wrong, implicit, or explicit curve parameters
- Updates expected key sizes in tests to match Draft 12 spec Table 4
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CompositeMLDsaAlgorithm.cs | Calculates parameter field size for each EC curve variant (P256/P384/P521/brainpool) based on their DER-encoded OID sizes |
| CompositeMLDsaManaged.ECDsa.cs | Validates parameters presence and curve match on import; writes parameters field with correct ASN.1 tag on export |
| CompositeMLDsaManaged.cs | Updates spec reference comments from draft-08 to draft-12 |
| CompositeMLDsaTestHelpers.cs | Updates expected private key size bounds to exact values per Draft 12 Table 4 for all ECDSA variants |
| CompositeMLDsaFactoryTests.cs | Adds comprehensive test coverage for parameter validation: wrong curve, missing parameters, implicit curves, explicit curves |
PranavSenthilnathan
left a comment
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.
Update to draft 13 of Composite ML-DSA. Changelog: lamps-wg/draft-composite-sigs@draft-ietf-lamps-pq-composite-sigs-12...main
Cherry-picked commit efb3990 which updates to Draft 13 of Composite ML-DSA. All 1,015 CompositeMLDsa tests pass. Changes include:
Commit: 6970266 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
/ba-g android timeouts and #70450 |
Backport of #120601 and #120961 to release/10.0
Description
Backports Draft 12 and Draft 13 spec changes for Composite ML-DSA. This PR combines two related updates:
Draft 12 changes (#120601):
CompositeMLDsaAlgorithm.cs: Calculate parameters field size for EC curves (P256/P384/P521/brainpool variants)CompositeMLDsaManaged.ECDsa.cs: Validate parameters presence and curve match; write parameters with context-specific tag [0]CompositeMLDsaManaged.cs: Update spec references from draft-08 to draft-12Draft 13 changes (#120961):
Oids.cs: Update all Composite ML-DSA OID constants to new rangeCompositeMLDsaManaged.cs: Add "ECDSA" to domain separation strings (e.g., "COMPSIG-MLDSA65-P256-SHA512" → "COMPSIG-MLDSA65-ECDSA-P256-SHA512")Customer Impact
Without these fixes, Composite ML-DSA keys generated in .NET 10 would not conform to Draft 12 and Draft 13 of the IETF spec, causing interoperability failures with other implementations following the updated standards.
Regression
No. This updates implementation to match spec evolution from Draft 8 to Draft 13.
Testing
All 1,015 CompositeMLDsa tests pass. Added test coverage for:
Risk
Low. Changes are confined to Composite ML-DSA implementation (preview feature). Validates existing behavior is maintained while adding required spec compliance. Breaking changes are intentional and necessary for spec conformance.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.