-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Require parameters in ECPrivateKey for Composite ML-DSA #120601
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
Require parameters in ECPrivateKey for Composite ML-DSA #120601
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 comply with Draft 12 of the specification, which now requires parameters to be present in ECPrivateKey structures. The key change is that ECPrivateKey objects must now include curve parameters (OID) for composite ML-DSA algorithms.
- Updates ECPrivateKey generation to include required curve parameters
- Modifies validation logic to enforce parameter presence and correctness
- Updates size calculations to account for the additional parameter data
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
CompositeMLDsaManaged.cs | Updates draft specification references from version 08 to 12 |
CompositeMLDsaManaged.ECDsa.cs | Adds parameter validation and generation for ECPrivateKey structures |
CompositeMLDsaAlgorithm.cs | Updates size calculations to include parameter overhead |
CompositeMLDsaTestHelpers.cs | Updates expected key size calculations with specific values per algorithm |
CompositeMLDsaFactoryTests.cs | Updates test cases to reflect new parameter requirements and validation |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs
Show resolved
Hide resolved
...m/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs
Show resolved
Hide resolved
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.
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaManaged.ECDsa.cs
Outdated
Show resolved
Hide resolved
.../Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaManaged.ECDsa.cs
Show resolved
Hide resolved
…eMLDsaManaged.ECDsa.cs Co-authored-by: Kevin Jones <vcsjones@github.com>
…an/runtime into cmldsa-draft11
No APIs changed but, following our past convention, implementing an updated PQC draft requires a breaking change doc. Assuming we get this in for .NET 10, we can just modify dotnet/docs#48901. |
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
/ba-g #103347 |
Draft 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.