Table of Contents

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

MLDsaAlgorithm

MLDsa65

Gets the ML-DSA-65 parameter set (NIST security category 3).

public static MLDsaAlgorithm MLDsa65 { get; }

Property Value

MLDsaAlgorithm

MLDsa87

Gets the ML-DSA-87 parameter set (NIST security category 5).

public static MLDsaAlgorithm MLDsa87 { get; }

Property Value

MLDsaAlgorithm

MuSizeInBytes

Gets the size of the externally computed μ value in bytes (64).

public int MuSizeInBytes { get; }

Property Value

int

Name

Gets the algorithm name, e.g. ML-DSA-65.

public string Name { get; }

Property Value

string

PrivateKeySizeInBytes

Gets the size of the secret key in bytes.

public int PrivateKeySizeInBytes { get; }

Property Value

int

PrivateSeedSizeInBytes

Gets the size of the private seed ξ in bytes (32).

public int PrivateSeedSizeInBytes { get; }

Property Value

int

PublicKeySizeInBytes

Gets the size of the public key in bytes.

public int PublicKeySizeInBytes { get; }

Property Value

int

SignatureSizeInBytes

Gets the size of a signature in bytes.

public int SignatureSizeInBytes { get; }

Property Value

int

Methods

Equals(MLDsaAlgorithm?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(MLDsaAlgorithm? other)

Parameters

other MLDsaAlgorithm

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The 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

left MLDsaAlgorithm

The first parameter set, or null.

right MLDsaAlgorithm

The second parameter set, or null.

Returns

bool

true if both operands describe the same parameter set.

operator !=(MLDsaAlgorithm?, MLDsaAlgorithm?)

Determines whether two parameter sets are different.

public static bool operator !=(MLDsaAlgorithm? left, MLDsaAlgorithm? right)

Parameters

left MLDsaAlgorithm

The first parameter set, or null.

right MLDsaAlgorithm

The second parameter set, or null.

Returns

bool

true if the operands describe different parameter sets.