-
Notifications
You must be signed in to change notification settings - Fork 5k
Unify documentation for ML-DSA and SLH-DSA #115760
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
Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>
// ML-DSA parameter sets, and the sizes associated with them, | ||
// are defined in FIPS 204, "CRYSTALS-Dilithium: Digital Signature Algorithm | ||
// Specification" |
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 TODO hasn't been addressed yet so leave it in.
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've restored the TODO comments that were inadvertently removed. The original TODO comments are now back in place. 9ad6c46
@@ -51,7 +51,13 @@ public sealed class MLDsaAlgorithm | |||
/// </value> | |||
public int SignatureSizeInBytes { get; } | |||
|
|||
internal string Oid { get; } | |||
/// <summary> |
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.
Spacing
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.
Fixed the spacing issue in the Oid property documentation to match the rest of the file. 9ad6c46
@@ -57,7 +57,7 @@ public SlhDsaOpenSsl(SafeEvpPKeyHandle pkeyHandle) : base(AlgorithmFromHandle(pk | |||
private static partial SlhDsaAlgorithm AlgorithmFromHandle(SafeEvpPKeyHandle pkeyHandle, out SafeEvpPKeyHandle upRefHandle); | |||
|
|||
/// <summary> | |||
/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key. | |||
/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic 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.
Are there any other related files that have this same indenting issue? Fix them too
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've fixed the indentation issue in DuplicateKeyHandle documentation for all related files. Similar indentation issues were found and fixed in MLKemOpenSsl.cs. b2887dd
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography | |||
/// Represents an SLH-DSA key. | |||
/// </summary> | |||
/// <remarks> | |||
/// Developers are encouraged to program against the <c>SlhDsa</c> base class, | |||
/// Developers are encouraged to program against the <see cref="SlhDsa"/> base class, |
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.
Fix other related files that have the same issue
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've updated all related cryptography class documentation for consistency. Changed all instances of <c>SlhDsa</c>
, <c>MLDsa</c>
, and <c>MLKem</c>
to use the <see cref="..."/>
tag instead in SlhDsaOpenSsl.cs, MLDsaOpenSsl.cs, MLKemOpenSsl.cs, and MLKem.cs. b2887dd
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.
see comments
Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>
Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>
Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
This PR addresses inconsistencies in documentation between ML-DSA and SLH-DSA cryptography classes. These are similar post-quantum cryptography algorithm implementations that should maintain consistent documentation patterns.
Changes:
SlhDsa.cs: Updated to use
<see cref="SlhDsa"/>
instead of<c>SlhDsa</c>
in remarks section for consistency with MLDsaMLDsaAlgorithm.cs:
Oid
property to match SlhDsaAlgorithmSlhDsaOpenSsl.cs: Fixed indentation in DuplicateKeyHandle method documentation to match formatting style in MLDsaOpenSsl.cs
These changes ensure that both API families follow the same documentation style and provide comparable levels of detail, making the cryptography APIs more consistent for developers.
Fixes #115759.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.