-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Scaffold CompositeMLDsa and CompositeMLDsaAlgorithm #116926
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
Scaffold CompositeMLDsa and CompositeMLDsaAlgorithm #116926
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 introduces the initial public API and skeleton implementation for CompositeMLDsa and CompositeMLDsaAlgorithm to support future post-quantum cryptography work. Key changes include adding new API definitions in the reference assembly, providing rough implementation stubs that throw PNSE, and adding associated tests and resource strings.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj | Added compile entry for CompositeMLDsaFactoryTests |
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AsymmetricAlgorithmHelpers.Der.cs | Removed implementation of DER helper methods; these are now provided from the common shared source |
src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj | Added compile entries for new CompositeMLDSA files |
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs | Added public API signatures for CompositeMLDsa and CompositeMLDsaAlgorithm |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs | Added tests to verify that CompositeMLDsa APIs are not yet supported |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs | Introduced the CompositeMLDsaAlgorithm class with several static instances |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaImplementation.cs | Added stub implementations for CompositeMLDsa methods that throw PNSE |
src/libraries/Common/src/System/Security/Cryptography/AsymmetricAlgorithmHelpers.Der.cs | Added shared DER helper methods |
Comments suppressed due to low confidence (1)
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs:63
- The algorithm name for MLDsa44WithRSA2048Pkcs15 appears to be incorrect; the string literal should likely be "MLDSA44-RSA2048-PKCS15-SHA256" to match the variable name and intended algorithm.
public static CompositeMLDsaAlgorithm MLDsa44WithRSA2048Pkcs15 = new("MLDSA44-RSA2048-PSS-SHA256",
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
src/libraries/Common/src/System/Security/Cryptography/AsymmetricAlgorithmHelpers.Der.cs
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaImplementation.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jeremy Barton <jbarton@microsoft.com> Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>
…te-mldsa-scaffold
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs
Outdated
Show resolved
Hide resolved
I left the min/max calculations as TODOs for the future PRs. As far as the public API goes though, |
This PR adds the public API skeleton for
CompositeMLDsa
andCompositeMLDsaAlgorithm
. The goal of this PR is to get a consensus onsrc/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
so we can start adding implementations.It also has a rough (and probably buggy) implementation of the API to show its feasibility, but the intent is that all this code is subject to change in future PRs when we actually start thorough implementation and testing. All entry points will eventually throw PNSE to ensure this class can't be used yet, but I'm also fine with removing the extra implementation code if we want to keep the PR scoped to just the API.