-
Notifications
You must be signed in to change notification settings - Fork 5k
PreHash SLH-DSA #115509
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
PranavSenthilnathan
merged 7 commits into
dotnet:main
from
PranavSenthilnathan:prehash-prototype
Jun 9, 2025
+1,549
−20
Merged
PreHash SLH-DSA #115509
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
61f6164
PreHash SLH-DSA
PranavSenthilnathan e096e37
Finish up PreHash impl
PranavSenthilnathan 3e923be
"data" -> "hash" in xmldoc
PranavSenthilnathan 0f722e7
fix conflict and merge
PranavSenthilnathan 362109f
Fix build for platforms without openssl 3.5
PranavSenthilnathan 7745416
Merge branch 'main' of https://github.com/dotnet/runtime into prehash…
PranavSenthilnathan 7ceaaf8
PR feedback
PranavSenthilnathan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
314 changes: 307 additions & 7 deletions
314
src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
276 changes: 275 additions & 1 deletion
276
...tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
303 changes: 300 additions & 3 deletions
303
...mmon/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaTestData.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
The tricky thing here is we want to guess "if OSSL adds primary support for Pre-HashSLH-DSA in the future, what will their API look like?". It's not this.
We can leave the function here as SlhDsaSignPreFormatted if we don't feel that we can adequately anticipate if they'd want a string OID, a binary OID, a string algorithm name, a NID, or whatever... but if we had a sense that they were adding something in OSSL 3.6 then we'd want to go ahead and make the shape be right here so we just needed to patch the body to say "if you know how to call this yourself, do it; otherwise we'll call it the preformatted way".
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.
I am not really sure what OpenSSL will do for this, but the docs say:
So
SlhDsaSignPreEncoded
might be appropriate. Their comment also makes it sound like pre-hash might require API changes on their side so it's hard to predict what the final shape will be.