BCrypt Composite ML-DSA#129612
Open
PranavSenthilnathan wants to merge 5 commits into
Open
Conversation
Contributor
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR wires up Windows support for Composite ML-DSA via the BCrypt “single key”/PQDSA blob mechanism (including new parameter-set identifiers and blob magic values), and updates platform-support expectations in tests.
Changes:
- Add Composite ML-DSA PQDSA blob encode/decode support and parameter-set mapping for Windows composite algorithms.
- Implement Windows
CompositeMLDsaoperations (keygen/import/export/sign/verify) using BCrypt Composite-ML-DSA provider and PQDSA blobs. - Update Windows algorithm identifiers / magic numbers and adjust support-detection tests accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj | Removes managed Composite ML-DSA sources from the Windows build item group. |
| src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs | Updates platform support expectations for IsAlgorithmSupported on Windows. |
| src/libraries/Common/src/System/Security/Cryptography/PqcBlobHelpers.cs | Adds composite parameter-set strings plus composite PQDSA blob encode/decode helpers; adjusts stackalloc threshold. |
| src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaImplementation.Windows.cs | Replaces Windows PNSE stub with a BCrypt-backed implementation for composite keygen/import/export/sign/verify. |
| src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs | Adds an algorithm support check during PKCS#8 private-key import. |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.Blobs.cs | Adds composite ML-DSA public/private magic numbers for PQDSA blobs. |
| src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs | Changes PQC “pure” signing helper to return bytesWritten and relaxes debug assertion. |
| src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs | Adds BCrypt algorithm name constant for Composite-ML-DSA. |
fadf2c4 to
b94a7dc
Compare
b94a7dc to
f7063c5
Compare
vcsjones
reviewed
Jun 24, 2026
vcsjones
reviewed
Jun 24, 2026
vcsjones
reviewed
Jun 24, 2026
vcsjones
reviewed
Jun 24, 2026
vcsjones
reviewed
Jun 24, 2026
3 tasks
bartonjs
reviewed
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows Insider builds support Composite ML-DSA in BCrypt. Documentation of public API can be found here.
Note this changes the default implementation on Windows from managed to BCrypt. On versions that support Composite ML-DSA, this reduces the number of supported algorithms to the 4 listed in the docs above. And for Windows versions that don't support Composite ML-DSA, our default implementation also doesn't support it now.
Fixes #116999