Skip to content

BCrypt Composite ML-DSA#129612

Open
PranavSenthilnathan wants to merge 5 commits into
dotnet:mainfrom
PranavSenthilnathan:cmldsa-bcrypt
Open

BCrypt Composite ML-DSA#129612
PranavSenthilnathan wants to merge 5 commits into
dotnet:mainfrom
PranavSenthilnathan:cmldsa-bcrypt

Conversation

@PranavSenthilnathan

@PranavSenthilnathan PranavSenthilnathan commented Jun 19, 2026

Copy link
Copy Markdown
Member

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

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 CompositeMLDsa operations (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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptSignHash.cs Outdated
Comment thread src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings June 24, 2026 03:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

@PranavSenthilnathan PranavSenthilnathan changed the title [WIP] BCrypt Composite ML-DSA BCrypt Composite ML-DSA Jun 24, 2026
@PranavSenthilnathan PranavSenthilnathan marked this pull request as ready for review June 24, 2026 04:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread src/libraries/Common/src/System/Security/Cryptography/PqcBlobHelpers.cs Outdated
Comment thread src/libraries/Common/src/System/Security/Cryptography/PqcBlobHelpers.cs Outdated
Copilot AI review requested due to automatic review settings June 25, 2026 03:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Composite ML-DSA with Windows BCrypt

4 participants