[release/11.0] Add managed Composite ML-KEM implementation - #134164
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security |
Member
Author
|
/ba-g #133311 |
artl93
force-pushed
the
ps-rc2-pqc-3-managed-ml-kem
branch
from
September 19, 2026 04:24
8c34b30 to
192c90e
Compare
artl93
pushed a commit
that referenced
this pull request
Sep 19, 2026
main PR: #132440 # Description Add the experimental Composite ML-KEM base APIs, algorithm identifiers, and key import/export support. Straight backport; no additional code changes. Stack layer 2/4, based on #134162, targeting RC2. # Customer Impact Provides the new hybrid PQC API surface. Requires the implementation layers #134164 and #134165. # Regression No. New APIs. # Testing Includes the original contract and import/export tests. Cherry-pick equivalence verified; no local builds or tests run for this layer. # Risk Low. Adds new experimental APIs without changing existing API behavior. Ships together with the implementation layers. > [!NOTE] > This PR description was generated with GitHub Copilot. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5676db47-d54b-4946-97ec-7fc0a7392c30 Copilot-Session: 17bb5da2-badb-480f-a196-71dc1e23dc7b
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The critical X25519 all-zero agreement validation issue remains unresolved; two project-file ordering nits also remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds managed Composite ML-KEM support for OpenSSL-backed platforms, combining ML-KEM with RSA, ECDH, and X25519.
Changes:
- Adds composite KEM implementations and platform support wiring.
- Adds ASN.1 handling and failure-path secret clearing.
- Adds test vectors and implementation, factory, and contract tests.
| File | Summary |
|---|---|
src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj |
Includes Composite ML-KEM tests; vector entries require alphabetical reordering. |
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/MLKemImplementation.OpenSsl.cs |
Adds per-algorithm OpenSSL support detection. |
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CompositeMLKemImplementation.Managed.cs |
Wires the managed Composite ML-KEM implementation. |
src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj |
Includes managed implementation sources. |
src/libraries/System.Security.Cryptography/src/Resources/Strings.resx |
Adds RSA decapsulation failure text. |
src/libraries/Microsoft.Bcl.Cryptography/tests/Microsoft.Bcl.Cryptography.Tests.csproj |
Includes shared test vectors; vector entries require alphabetical reordering. |
src/libraries/Common/tests/System/Security/Cryptography/AsnUtils.cs |
Supports span-based ASN.1 test inputs. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemTestVector.cs |
Defines test-vector representation. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemTestsBase.cs |
Provides shared Composite ML-KEM tests. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemTestData.cs |
Provides vector filtering and component metadata. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemImplementationTests.cs |
Tests the managed implementation. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemFactoryTests.cs |
Tests factories and key imports. |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemContractTests.cs |
Tests failure and secret-clearing contracts. |
src/libraries/Common/src/System/Security/Cryptography/RSAKeyFormatHelper.Pkcs1.cs |
Adds configurable ASN.1 encoding rules. |
src/libraries/Common/src/System/Security/Cryptography/MLKemImplementation.Windows.cs |
Adds Windows support-check parity. |
src/libraries/Common/src/System/Security/Cryptography/MLKemImplementation.NotSupported.cs |
Adds unsupported-platform support checks. |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLKemManaged.XDiffieHellman.cs |
Implements X25519 composition; both paths require constant-time all-zero agreement rejection. |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLKemManaged.RSA.cs |
Implements RSA-OAEP composition. |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLKemManaged.ECDiffieHellman.cs |
Implements ECDH composition. |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLKemManaged.cs |
Combines component KEMs and manages keys. |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLKem.cs |
Clears shared-secret buffers on failures. |
Managed Composite ML-KEM. This implementation is just for OpenSSL. Windows will have a native implementation added in a future PR. Contributes to #129633 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 02fe9eac-5557-460a-aa50-d6a60a546192 Copilot-Session: 11ffe761-e9d2-47c2-ace0-857272c52b10 (cherry picked from commit 632117e)
PranavSenthilnathan
force-pushed
the
ps-rc2-pqc-3-managed-ml-kem
branch
from
September 19, 2026 05:02
192c90e to
d979aed
Compare
Member
Author
|
/ba-g #133311 |
artl93
pushed a commit
that referenced
this pull request
Sep 20, 2026
main PR: #132687 # Description Add Windows Composite ML-KEM support, including BCrypt/NCrypt integration, CNG APIs, and key-blob handling. Straight backport; no additional code changes. Stack layer 4/4, based on #134164, targeting RC2. # Customer Impact Enables the new hybrid PQC APIs on Windows systems with supporting cryptographic providers. # Regression No. New APIs and platform implementation. # Testing Includes the original Windows provider, CNG, and key-blob tests. Cherry-pick equivalence verified; no local builds or tests run for this layer. # Risk Low. Adds support for new experimental APIs without changing existing cryptographic API behavior. > [!NOTE] > This PR description was generated with GitHub Copilot. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 67901feb-14f5-4029-bedd-84864cf3ea53 Copilot-Session: 11ffe761-e9d2-47c2-ace0-857272c52b10
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.

main PR: #132659
Description
Implement Composite ML-KEM on OpenSSL-backed platforms. Straight backport;
no additional code changes. Stack layer 3/4, based on #134163, targeting RC2.
Customer Impact
Makes the new hybrid PQC APIs usable on OpenSSL-backed platforms where
the underlying algorithms are supported.
Regression
No. New API functionality.
Testing
Includes the original implementation tests and test vectors. Cherry-pick
equivalence and
git diff --checkpassed; no local builds or tests runfor this layer.
Risk
Low. Implements new experimental APIs. Shared-helper changes preserve
existing callers' behavior.
Note
This PR description was generated with GitHub Copilot.