Clean up CompositeMLDsaAlgorithm and add comprehensive tests#117135
Merged
PranavSenthilnathan merged 4 commits intomainfrom Jun 30, 2025
Merged
Clean up CompositeMLDsaAlgorithm and add comprehensive tests#117135PranavSenthilnathan merged 4 commits intomainfrom
PranavSenthilnathan merged 4 commits intomainfrom
Conversation
Co-authored-by: PranavSenthilnathan <[email protected]>
Copilot
AI
changed the title
[WIP] Clean up
Clean up CompositeMLDsaAlgorithm and add comprehensive tests
Jun 29, 2025
CompositeMLDsaAlgorithm and add tests
PranavSenthilnathan
requested changes
Jun 29, 2025
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs
Show resolved
Hide resolved
src/libraries/Common/tests/System/Security/Cryptography/CompositeMLDsaAlgorithmTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/CompositeMLDsaAlgorithm.cs
Show resolved
Hide resolved
src/libraries/Common/tests/System/Security/Cryptography/CompositeMLDsaAlgorithmTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: PranavSenthilnathan <[email protected]>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
This was referenced Jun 30, 2025
bartonjs
approved these changes
Jun 30, 2025
PranavSenthilnathan
approved these changes
Jun 30, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR addresses the cleanup and testing requirements for
CompositeMLDsaAlgorithmas requested in the issue.Changes Made
1. Documentation Fix
CompositeMLDsaAlgorithm.csline 21: "An a string" → "A string"2. Comprehensive Test Suite
Added
CompositeMLDsaAlgorithmTests.cswith tests covering:==and!=operator behaviorGetHashCode()implementationToString()methodEquals()method with null inputs3. Test Coverage
The test suite comprehensively covers all 18 CompositeMLDsaAlgorithm variants:
ML-DSA-44 (4 variants):
MLDsa44WithRSA2048PssMLDsa44WithRSA2048Pkcs15MLDsa44WithEd25519MLDsa44WithECDsaP256ML-DSA-65 (8 variants):
MLDsa65WithRSA3072Pss/Pkcs15MLDsa65WithRSA4096Pss/Pkcs15MLDsa65WithECDsaP256/P384/BrainpoolP256r1MLDsa65WithEd25519ML-DSA-87 (6 variants):
MLDsa87WithECDsaP384/BrainpoolP384r1/P521MLDsa87WithEd448MLDsa87WithRSA3072Pss/RSA4096Pss4. Integration
System.Security.Cryptography.Tests.csprojandMicrosoft.Bcl.Cryptography.Tests.csprojSlhDsaAlgorithmTestsandMLDsaAlgorithmTests[Theory],[MemberData], andAssertExtensionsAll changes are minimal and surgical, maintaining compatibility while providing comprehensive test coverage for the CompositeMLDsaAlgorithm class.
Fixes #117134.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
http://www.microsoft.com:80/pki/certs/MicCodSigPCA_08-31-2010.crt/home/REDACTED/work/runtime/runtime/artifacts/bin/testhost/net10.0-linux-Debug-x64/dotnet exec --runtimeconfig System.Security.Cryptography.Tests.runtimeconfig.json --depsfile System.Security.Cryptography.Tests.deps.json /home/REDACTED/.nuget/packages/microsoft.dotnet.xunitconsoleREDACTED/2.9.2-beta.25311.107/build/../tools/net/xunit.console.dll System.Security.Cryptography.Tests.dll -xml testResults.xml -nologo -notrait category=OuterLoop -notrait category=failing(http block)http://www.microsoft.com:80/pki/mscorp/Microsoft%20RSA%20TLS%20CA%2001.crt/home/REDACTED/work/runtime/runtime/artifacts/bin/testhost/net10.0-linux-Debug-x64/dotnet exec --runtimeconfig System.Security.Cryptography.Tests.runtimeconfig.json --depsfile System.Security.Cryptography.Tests.deps.json /home/REDACTED/.nuget/packages/microsoft.dotnet.xunitconsoleREDACTED/2.9.2-beta.25311.107/build/../tools/net/xunit.console.dll System.Security.Cryptography.Tests.dll -xml testResults.xml -nologo -notrait category=OuterLoop -notrait category=failing(http block)/home/REDACTED/work/runtime/runtime/artifacts/bin/testhost/net10.0-linux-Debug-x64/dotnet exec --runtimeconfig /home/REDACTED/work/runtime/runtime/artifacts/bin/System.Security.Cryptography.Tests/Debug/net10.0-unix/System.Security.Cryptography.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/runtime/runtime/artifacts/bin/System.Security.Cryptography.Tests/Debug/net10.0-unix/System.Security.Cryptography.Tests.deps.json /home/REDACTED/work/runtime/runtime/artifacts/bin/System.Security.Cryptography.Tests/Debug/net10.0-unix/testhost.dll --port 35095 --endpoint 127.0.0.1:035095 --role client --parentprocessid 73784 --datacollectionport 32835 --telemetryoptedin false(http block)/home/REDACTED/work/runtime/runtime/artifacts/bin/testhost/net10.0-linux-Debug-x64/dotnet exec --runtimeconfig /home/REDACTED/work/runtime/runtime/artifacts/bin/System.Security.Cryptography.Tests/Debug/net10.0-unix/System.Security.Cryptography.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/runtime/runtime/artifacts/bin/System.Security.Cryptography.Tests/Debug/net10.0-unix/System.Security.Cryptography.Tests.deps.json /home/REDACTED/work/runtime/runtime/artifacts/bin/System.Security.Cryptography.Tests/Debug/net10.0-unix/testhost.dll --port 41119 --endpoint 127.0.0.1:041119 --role client --parentprocessid 73986 --datacollectionport 33619 --telemetryoptedin false(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.