[release/11.0] Managed HPKE - #134442
Merged
Merged
[release/11.0] Managed HPKE#134442
Conversation
cherry-pick of 2023ab7
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 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 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
One or more issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Adds experimental managed HPKE support, including public APIs, managed cryptographic adapters, compatibility packaging, and extensive tests.
Changes:
- Adds HPKE suite, KEM, KDF, sender, recipient, and key APIs.
- Implements managed DHKEM, HKDF/SHAKE, AES-GCM, and ChaCha20-Poly1305.
- Adds test vectors, contract tests, diagnostics, and Microsoft.Bcl.Cryptography integration.
Validation: No build or tests run in this review.
| File | Description |
|---|---|
| src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeX25519DiffieHellmanKemAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeManagedKemAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeManagedKdfAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeManagedChaCha20Poly1305AeadAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeManagedAesAeadAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeManagedAeadAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeKemMetadata.Managed.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeKdfMetadata.Managed.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeImplementation.NotSupported.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeImplementation.Managed.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeECDiffieHellmanKemAdapter.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HpkeAeadMetadata.Managed.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/FixedMemoryKeyBox.cs | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/src/Resources/Strings.resx | Updated as part of this pull request. |
| src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs | Updated as part of this pull request. |
| src/libraries/Microsoft.Bcl.Cryptography/tests/Microsoft.Bcl.Cryptography.Tests.csproj | Updated as part of this pull request. |
| src/libraries/Microsoft.Bcl.Cryptography/src/Resources/Strings.resx | Updated as part of this pull request. |
| src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.Forwards.cs | Updated as part of this pull request. |
| src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeTests.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeTestDataTests.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeTestData.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeSuiteTests.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeSenderContractTests.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeRecipientContractTests.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeNotSupportedTests.cs | Updated as part of this pull request. |
| src/libraries/Common/tests/System/Security/Cryptography/HpkeKeyTests.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeSuite.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeSender.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeRecipient.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeKemMetadata.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeKem.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeKdfMetadata.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeKdf.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeAeadMetadata.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Security/Cryptography/HpkeAead.cs | Updated as part of this pull request. |
| src/libraries/Common/src/System/Experimentals.cs | Updated as part of this pull request. |
| docs/project/list-of-diagnostics.md | Updated as part of this pull request. |
| case HpkeKem.MLKEM1024_P384: | ||
| return false; | ||
| default: | ||
| Debug.Fail($"Kem ${Kem}'s support is unknown."); |
Member
Author
|
Approved via email |
Member
|
Can you check build analysis?
|
Member
Author
|
/ba-g #134367 |
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.


cherry-pick of 2023ab7 (#133804)
Customer Impact
New API for .NET 11 to support using HPKE as part of the PQC transition effort.
Regression
Testing
This standalone feature is extensively tested in this PR.
Risk
Low. The feature is entirely isolated, only consumers of these new
[Experimental]types are affected.This change contains the full API set for the feature, but does not represent full functionality (e.g. Win32 interop instead of the managed implementation on Windows), which can be added in servicing.