Skip to content
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

Scaffold SLH-DSA based on ML-DSA #113634

Merged
merged 6 commits into from
Mar 20, 2025
Merged

Scaffold SLH-DSA based on ML-DSA #113634

merged 6 commits into from
Mar 20, 2025

Conversation

PranavSenthilnathan
Copy link
Member

Moslty copied from SLH-DSA with algorithm name, oid, parameters updated for SLH-DSA based on FIPS 205.

Notes:

  • Unlike FIPS 204 (ML-DSA) which allows the seed to be exported, FIPS 205 does not allow any internal state to be exported. However, this PR does expose an export method for parity with the ML-DSA implementation.
  • Seed size is dependent on the parameter set

I expect that the ML-DSA skeleton might change as work on the implementation progresses, but it's still a useful reference for SLH-DSA in order to have some APIs to start writing tests against.

Progress towards #113506

@PranavSenthilnathan PranavSenthilnathan self-assigned this Mar 18, 2025
@Copilot Copilot bot review requested due to automatic review settings March 18, 2025 01:29
Copy link
Contributor

@Copilot Copilot AI left a 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 scaffolds SLH-DSA based on ML-DSA by introducing new algorithm identifiers, implementation stubs, and corresponding OID definitions.

  • Added a new SLHDsaAlgorithm class with static properties for each SLH-DSA variant.
  • Introduced platform-specific stub implementations in SLHDsaImplementation.Windows.cs and SLHDsaImplementation.NotSupported.cs.
  • Extended the Oids class with SLH-DSA specific OIDs.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/libraries/Common/src/System/Security/Cryptography/SLHDsaAlgorithm.cs Added algorithm identifiers for SLH-DSA.
src/libraries/Common/src/System/Security/Cryptography/SLHDsaImplementation.Windows.cs Provided Windows-specific stub implementations throwing PlatformNotSupportedException.
src/libraries/Common/src/System/Security/Cryptography/SLHDsaImplementation.NotSupported.cs Provided fallback stub implementations throwing PlatformNotSupportedException.
src/libraries/Common/src/System/Security/Cryptography/SLHDsaImplementation.cs Defined the core SLHDsa implementation scaffolding.
src/libraries/Common/src/System/Security/Cryptography/Oids.cs Extended OID definitions with SLH-DSA specific values.
Comments suppressed due to low confidence (1)

src/libraries/Common/src/System/Security/Cryptography/SLHDsaImplementation.cs:21

  • There is an inconsistency in referencing the ParameterSetInfo type: some implementations qualify it as SLHDsa.ParameterSetInfo while others do not. Consider using a consistent reference (either fully qualified or unqualified) across all implementations.
internal static partial SLHDsa ImportPublicKey(ParameterSetInfo info, ReadOnlySpan<byte> source);

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@bartonjs bartonjs merged commit 97facd0 into dotnet:main Mar 20, 2025
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants