-
Notifications
You must be signed in to change notification settings - Fork 5k
Make CertificateRequest et al work with ML-DSA #114357
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
Note regarding the
|
1 similar comment
Note regarding the
|
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.
Copilot reviewed 26 out of 29 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj: Language not supported
- src/libraries/System.Security.Cryptography/src/Resources/Strings.resx: Language not supported
- src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj: Language not supported
...ecurity.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs
Show resolved
Hide resolved
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
Looks like I forgot to try to build System.Net.Security.Tests, which also includes CertificateAuthority.cs |
...curity.Cryptography/tests/X509Certificates/CertificateCreation/PrivateKeyAssociationTests.cs
Show resolved
Hide resolved
....Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Show resolved
Hide resolved
...yptography/src/System/Security/Cryptography/X509Certificates/OpenSslX509CertificateReader.cs
Show resolved
Hide resolved
...ryptography/src/System/Security/Cryptography/X509Certificates/MLDsaX509SignatureGenerator.cs
Show resolved
Hide resolved
...libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj
Show resolved
Hide resolved
...ecurity.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificateRequest.cs
Show resolved
Hide resolved
...ryptography/src/System/Security/Cryptography/X509Certificates/MLDsaX509SignatureGenerator.cs
Show resolved
Hide resolved
@@ -17,6 +17,7 @@ internal sealed class OpenSslX509CertificateReader : ICertificatePal | |||
|
|||
private SafeX509Handle _cert; | |||
private SafeEvpPKeyHandle? _privateKey; | |||
private MLDsa? _mldsaPrivateKey; |
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.
Should this be added to Dispose
like _privateKey
?
@@ -314,6 +314,16 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan<byte> source | |||
return MLKem.ImportSubjectPublicKeyInfo(ExportSubjectPublicKeyInfo()); | |||
} | |||
|
|||
[Experimental(Experimentals.PostQuantumCryptographyDiagId)] | |||
[UnsupportedOSPlatform("browser")] | |||
public MLDsa? GetMLDsaPublicKey() |
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.
XML docs?
....Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Show resolved
Hide resolved
@@ -32,5 +34,13 @@ public static X509SignatureGenerator CreateForRSA(RSA key, RSASignaturePadding s | |||
|
|||
throw new ArgumentException(SR.Cryptography_InvalidPaddingMode); | |||
} | |||
|
|||
[Experimental(Experimentals.PostQuantumCryptographyDiagId)] | |||
public static X509SignatureGenerator CreateForMLDsa(MLDsa key) |
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.
Docs would be good.
The longer the PR has been up, the more dirty I feel about a huge passel of test/infrastructure changes and the "enable ML-DSA" part. Partially because the "enable ML-DSA" part is supposed to serve as a template for SLH-DSA and CompositeMLDsa... so I think I'm going to break this into two pieces, even though that's more work. |
A few things happen in this PR:
Those pieces could be broken out into a pure test enhancement change for cleanliness.
The impetus of the change, however, was to add first-class support for ML-DSA to CertificateRequest.
Contributes to #113502