-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add Composite ML-DSA support for HTTPS #63280
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
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 support for Composite ML-DSA (Machine Learning Digital Signature Algorithm) to HTTPS in Kestrel. This follows up on previous work to enable post-quantum cryptographic support in the ASP.NET Core web server.
- Adds support for all 18 Composite ML-DSA algorithm variants for certificate loading and test generation
- Refactors existing test infrastructure to use shared dictionaries for algorithm definitions
- Includes comprehensive tests (disabled due to certificate generation limitations)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| KestrelConfigurationLoaderTests.cs | Refactors algorithm handling and adds Composite ML-DSA test support with shared dictionaries |
| CertificateConfigLoader.cs | Adds OID constants and certificate loading logic for all 18 Composite ML-DSA variants |
| private static readonly Dictionary<string, MLDsaAlgorithm> _mlDsaAlgorithms = ((IEnumerable<MLDsaAlgorithm>)[ | ||
| MLDsaAlgorithm.MLDsa44, | ||
| MLDsaAlgorithm.MLDsa65, | ||
| MLDsaAlgorithm.MLDsa87, | ||
| ]).ToDictionary(a => a.Name); |
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.
This refactor allows us to add more algorithms to test without having to repeat the algorithm name in 3 different places.
| const string SlhDsaShake_256sOid = "2.16.840.1.101.3.4.3.30"; | ||
| const string SlhDsaShake_256fOid = "2.16.840.1.101.3.4.3.31"; | ||
|
|
||
| const string MLDsa44WithRSA2048PssPreHashSha256Oid = "2.16.840.1.114027.80.9.0"; |
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.
These seem wrong? Ref https://datatracker.ietf.org/doc/draft-ietf-lamps-pq-composite-sigs/
<CompSig>is equal to 2.16.840.1.114027.80.9.1
id-MLDSA44-RSA2048-PSS-SHA256|<CompSig>.0
That would equal 2.16.840.1.114027.80.9.1.0
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.
Wow, good catch. We should probably fix https://github.com/dotnet/runtime/blob/f514fa50f3385d28fad10d3e1ef5b75a8dfa84f5/src/libraries/Common/src/System/Security/Cryptography/Oids.cs#L138-L155 then (that's where I copied these from).
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.
halter73
left a comment
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.
Good catch @BrennanConroy!
Follow-up to #62866 with support for Composite ML-DSA.
Tests are included, but disabled because certificate generation for composite ML-DSA is not currently implemented.
Fixes #62030