-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Clean up CompositeMLDsaAlgorithm and add comprehensive tests #117135
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
Merged
Merged
+209
−1
Conversation
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
Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>
CompositeMLDsaAlgorithm
and add tests
Copilot finished work on behalf of
PranavSenthilnathan
June 29, 2025 21:35
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 <12225508+PranavSenthilnathan@users.noreply.github.com>
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:
|
Copilot finished work on behalf of
PranavSenthilnathan
June 29, 2025 22:30
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
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.
This PR addresses the cleanup and testing requirements for
CompositeMLDsaAlgorithm
as requested in the issue.Changes Made
1. Documentation Fix
CompositeMLDsaAlgorithm.cs
line 21: "An a string" → "A string"2. Comprehensive Test Suite
Added
CompositeMLDsaAlgorithmTests.cs
with 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):
MLDsa44WithRSA2048Pss
MLDsa44WithRSA2048Pkcs15
MLDsa44WithEd25519
MLDsa44WithECDsaP256
ML-DSA-65 (8 variants):
MLDsa65WithRSA3072Pss/Pkcs15
MLDsa65WithRSA4096Pss/Pkcs15
MLDsa65WithECDsaP256/P384/BrainpoolP256r1
MLDsa65WithEd25519
ML-DSA-87 (6 variants):
MLDsa87WithECDsaP384/BrainpoolP384r1/P521
MLDsa87WithEd448
MLDsa87WithRSA3072Pss/RSA4096Pss
4. Integration
System.Security.Cryptography.Tests.csproj
andMicrosoft.Bcl.Cryptography.Tests.csproj
SlhDsaAlgorithmTests
andMLDsaAlgorithmTests
[Theory]
,[MemberData]
, andAssertExtensions
All 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.