Skip to content

Commit 8ea1c77

Browse files
Unify documentation for ML-DSA and SLH-DSA
Co-authored-by: PranavSenthilnathan <[email protected]>
1 parent 05348dc commit 8ea1c77

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/libraries/Common/src/System/Security/Cryptography/MLDsaAlgorithm.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ public sealed class MLDsaAlgorithm
5151
/// </value>
5252
public int SignatureSizeInBytes { get; }
5353

54-
internal string Oid { get; }
54+
/// <summary>
55+
/// Gets the Object Identifier (OID) for this algorithm.
56+
/// </summary>
57+
/// <value>
58+
/// The Object Identifier (OID) for this algorithm.
59+
/// </value>
60+
internal string Oid { get; }
5561

5662
/// <summary>
5763
/// Initializes a new instance of the <see cref="MLDsaAlgorithm" /> structure with a custom name.
@@ -69,7 +75,7 @@ public sealed class MLDsaAlgorithm
6975
/// The size of the signature in bytes.
7076
/// </param>
7177
/// <param name="oid">
72-
/// The OID of the algorithm.
78+
/// The Object Identifier (OID) for this algorithm.
7379
/// </param>
7480
private MLDsaAlgorithm(string name, int secretKeySizeInBytes, int publicKeySizeInBytes, int signatureSizeInBytes, string oid)
7581
{
@@ -80,8 +86,9 @@ private MLDsaAlgorithm(string name, int secretKeySizeInBytes, int publicKeySizeI
8086
Oid = oid;
8187
}
8288

83-
// TODO: Our algorithm names generally match CNG. If they don't in this case, consider changing the values.
84-
// TODO: These values match OpenSSL names, if changing this for CNG, we should make sure to do the right thing for OpenSSL.
89+
// ML-DSA parameter sets, and the sizes associated with them,
90+
// are defined in FIPS 204, "CRYSTALS-Dilithium: Digital Signature Algorithm
91+
// Specification"
8592

8693
/// <summary>
8794
/// Gets an ML-DSA algorithm identifier for the ML-DSA-44 algorithm.

src/libraries/Common/src/System/Security/Cryptography/SlhDsa.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography
1414
/// Represents an SLH-DSA key.
1515
/// </summary>
1616
/// <remarks>
17-
/// Developers are encouraged to program against the <c>SlhDsa</c> base class,
17+
/// Developers are encouraged to program against the <see cref="SlhDsa"/> base class,
1818
/// rather than any specific derived class.
1919
/// The derived classes are intended for interop with the underlying system
2020
/// cryptographic libraries.

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SlhDsaOpenSsl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public SlhDsaOpenSsl(SafeEvpPKeyHandle pkeyHandle) : base(AlgorithmFromHandle(pk
5757
private static partial SlhDsaAlgorithm AlgorithmFromHandle(SafeEvpPKeyHandle pkeyHandle, out SafeEvpPKeyHandle upRefHandle);
5858

5959
/// <summary>
60-
/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key.
60+
/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key.
6161
/// </summary>
6262
/// <returns>A <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key.</returns>
6363
/// <exception cref="ObjectDisposedException">The object has already been disposed.</exception>

0 commit comments

Comments
 (0)