-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add external mu support to ML-DSA #117966
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
Conversation
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
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.
comments
src/libraries/Common/src/System/Security/Cryptography/MLDsaMuHash.cs
Outdated
Show resolved
Hide resolved
...Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestHelpers.cs
Show resolved
Hide resolved
...tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestImplementation.cs
Outdated
Show resolved
Hide resolved
src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_ml_dsa.h
Outdated
Show resolved
Hide resolved
...braries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.MLDsa.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/MLDsaMuHash.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/MLDsaMuHash.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/MLDsaMuHash.cs
Outdated
Show resolved
Hide resolved
...tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestImplementation.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs
Outdated
Show resolved
Hide resolved
It looks like
|
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.
some small stuff
...s/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestsBase.cs
Outdated
Show resolved
Hide resolved
src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_ml_dsa.h
Outdated
Show resolved
Hide resolved
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 external mu (μ) support to ML-DSA, allowing developers to compute the signature mu value independently and use it for signing and verification operations. This enables more flexible cryptographic workflows where the mu computation can be separated from the actual signing process.
Key changes include:
- Addition of
SignExternalMu
andVerifyExternalMu
methods to the ML-DSA API - Introduction of
MLDsaMuHash
class for stateful mu computation - Native layer support for external mu operations via OpenSSL
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pal_evp_pkey_ml_dsa.h | Added function declarations for external mu signing and verification |
pal_evp_pkey_ml_dsa.c | Implemented external mu signing and verification using OpenSSL EVP APIs |
opensslshim.h | Added OSSL_SIGNATURE_PARAM_MU constant definition |
entrypoints.c | Exported new external mu functions for P/Invoke |
MLDsaOpenSsl.OpenSsl.cs | Added OpenSSL implementation of external mu methods |
MLDsaOpenSsl.NotSupported.cs | Added not-supported stubs for external mu methods |
MLDsaImplementation.OpenSsl.cs | Added external mu method implementations |
System.Security.Cryptography.cs | Added public API surface for external mu functionality |
MLDsaMuHash.cs | New class providing stateful hash computation for mu values |
MLDsa.cs | Added external mu methods and MLDsaMuHash factory methods |
Various test files | Added comprehensive test coverage for external mu functionality |
UntouchableStream.cs | Moved common test utility to shared location |
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/Resources/Strings.resx
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/Shake256.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/System/Security/Cryptography/MLDsaMuHash.cs
Outdated
Show resolved
Hide resolved
Win11 with PQC has test failures on net481. They're all src\libraries\Microsoft.Bcl.Cryptography\tests> dn test -f net481
|
Fair, guess I get to power that up. In my head it was unreachable until we get to integrate with the Windows feature, but, nope, it's the base impl. |
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.
Comments
src/libraries/Common/src/System/Security/Cryptography/MLDsaMuHash.cs
Outdated
Show resolved
Hide resolved
...Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestHelpers.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/Shake256.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/Shake256.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/Shake256.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/Shake256.cs
Outdated
Show resolved
Hide resolved
Since the API Review session is, at this point, "tomorrow", I've slapped on NO-MERGE so I remind myself to wait for updates from that, rather than getting trigger-happy. |
OK, the latest push
|
@artl93 BTW: PQC RC1 API Addition (I was so tempted to say ADD instead of addition...) |
Fixes #116995