-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[release/10.0] SPKI and PKCS#8 for Composite ML-DSA (#119837) #119914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/10.0] SPKI and PKCS#8 for Composite ML-DSA (#119837) #119914
Conversation
There was a problem hiding this comment.
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 adds SPKI (Subject Public Key Info) and PKCS#8 support for the managed Composite ML-DSA implementation. It implements methods that previously threw PlatformNotSupportedException
, enabling export and import of keys in these standard formats.
Key changes:
- Implements PKCS#8 export functionality in the managed implementation
- Adds comprehensive test helpers for SPKI and PKCS#8 operations
- Adds extensive test coverage for new import/export methods with various formats
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/libraries/Common/tests/System/Security/Cryptography/AsnUtils.cs | Adds utility method to convert DER to non-minimal BER encoding for testing |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestHelpers.cs | Adds comprehensive test helpers for SPKI, PKCS#8, and encrypted key operations |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaTestData.cs | Adds SPKI extraction from test vectors and helper method |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaMockImplementation.cs | Updates mock implementation with PKCS#8 export support and improved test assertions |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaImplementationTests.cs | Adds roundtrip tests for PKCS#8, SPKI, and encrypted formats |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs | Adds validation tests for import methods and error handling |
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaContractTests.cs | Adds comprehensive contract tests for export methods and argument validation |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaManaged.cs | Implements PKCS#8 export functionality |
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsa.cs | Updates import logic and removes TODO comments |
...ty/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaImplementationTests.cs
Show resolved
Hide resolved
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Once #119919 gets merged, I'm planning on cherry-picking it into this PR. |
Backport of #119837 to release/10.0
Adds SPKI and PKCS#8 support for managed Composite ML-DSA implementation.
Customer Impact
This adds an implementation to a method that previously threw PlatformNotSupportedException.
Regression
Testing
Tests added.
Risk
Low