Skip to content

[release/11.0] Add managed Composite ML-KEM implementation - #134164

Merged
artl93 merged 1 commit into
release/11.0from
ps-rc2-pqc-3-managed-ml-kem
Sep 20, 2026
Merged

artl93 merged 1 commit into
release/11.0from
ps-rc2-pqc-3-managed-ml-kem

Conversation

@PranavSenthilnathan

@PranavSenthilnathan PranavSenthilnathan commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

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 --check passed; no local builds or tests run
for this layer.

Risk

Low. Implements new experimental APIs. Shared-helper changes preserve
existing callers' behavior.

Note

This PR description was generated with GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
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.

@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.

@bartonjs bartonjs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Confirmed via patch-diffing that it's the same as existing commit 632117e.

@PranavSenthilnathan

Copy link
Copy Markdown
Member Author

/ba-g #133311

@PranavSenthilnathan PranavSenthilnathan added the Servicing-consider Issue for next servicing release review label Sep 19, 2026

@artl93 artl93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

New PQC. Approved.

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 19, 2026
Copilot AI lite review requested due to automatic review settings September 19, 2026 04:24
@artl93
artl93 force-pushed the ps-rc2-pqc-3-managed-ml-kem branch from 8c34b30 to 192c90e Compare September 19, 2026 04:24
Base automatically changed from ps-rc2-pqc-2-ml-kem-base to release/11.0 September 19, 2026 04:28
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

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.

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 High severity

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
PranavSenthilnathan force-pushed the ps-rc2-pqc-3-managed-ml-kem branch from 192c90e to d979aed Compare September 19, 2026 05:02

@artl93 artl93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still approved.

@PranavSenthilnathan

Copy link
Copy Markdown
Member Author

/ba-g #133311

@artl93
artl93 merged commit 82b2ac8 into release/11.0 Sep 20, 2026
80 of 82 checks passed
@artl93
artl93 deleted the ps-rc2-pqc-3-managed-ml-kem branch September 20, 2026 04:04
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Security Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants