Class MLDsaAlgorithm
- Namespace
- CryptoHives.Foundation.Security.Cryptography.Dsa
- Assembly
- CryptoHives.Foundation.Security.Cryptography.dll
Describes an ML-DSA parameter set (FIPS 204 Table 1) and its key and signature sizes.
public sealed class MLDsaAlgorithm : IEquatable<MLDsaAlgorithm>
- Inheritance
-
MLDsaAlgorithm
- Implements
- Inherited Members
Remarks
Instances are exposed as singletons (MLDsa44, MLDsa65,
MLDsa87) and compared by name, so they are also equal by reference. The
API shape mirrors System.Security.Cryptography.MLDsaAlgorithm from .NET 10 so code
written against the in-box types ports directly to older target frameworks.
Properties
MLDsa44
Gets the ML-DSA-44 parameter set (NIST security category 2).
public static MLDsaAlgorithm MLDsa44 { get; }
Property Value
MLDsa65
Gets the ML-DSA-65 parameter set (NIST security category 3).
public static MLDsaAlgorithm MLDsa65 { get; }
Property Value
MLDsa87
Gets the ML-DSA-87 parameter set (NIST security category 5).
public static MLDsaAlgorithm MLDsa87 { get; }
Property Value
MuSizeInBytes
Gets the size of the externally computed μ value in bytes (64).
public int MuSizeInBytes { get; }
Property Value
Name
Gets the algorithm name, e.g. ML-DSA-65.
public string Name { get; }
Property Value
PrivateKeySizeInBytes
Gets the size of the secret key in bytes.
public int PrivateKeySizeInBytes { get; }
Property Value
PrivateSeedSizeInBytes
Gets the size of the private seed ξ in bytes (32).
public int PrivateSeedSizeInBytes { get; }
Property Value
PublicKeySizeInBytes
Gets the size of the public key in bytes.
public int PublicKeySizeInBytes { get; }
Property Value
SignatureSizeInBytes
Gets the size of a signature in bytes.
public int SignatureSizeInBytes { get; }
Property Value
Methods
Equals(MLDsaAlgorithm?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MLDsaAlgorithm? other)
Parameters
otherMLDsaAlgorithmAn object to compare with this object.
Returns
- bool
true if the current object is equal to the
otherparameter; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
- bool
true if the specified object is equal to the current object; otherwise, false.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(MLDsaAlgorithm?, MLDsaAlgorithm?)
Determines whether two parameter sets are the same.
public static bool operator ==(MLDsaAlgorithm? left, MLDsaAlgorithm? right)
Parameters
leftMLDsaAlgorithmThe first parameter set, or null.
rightMLDsaAlgorithmThe second parameter set, or null.
Returns
operator !=(MLDsaAlgorithm?, MLDsaAlgorithm?)
Determines whether two parameter sets are different.
public static bool operator !=(MLDsaAlgorithm? left, MLDsaAlgorithm? right)
Parameters
leftMLDsaAlgorithmThe first parameter set, or null.
rightMLDsaAlgorithmThe second parameter set, or null.