Table of Contents

Class SlhDsaAlgorithm

Namespace
CryptoHives.Foundation.Security.Cryptography.Dsa
Assembly
CryptoHives.Foundation.Security.Cryptography.dll

Describes an SLH-DSA parameter set (FIPS 205 Table 2) and its key and signature sizes.

public sealed class SlhDsaAlgorithm : IEquatable<SlhDsaAlgorithm>
Inheritance
SlhDsaAlgorithm
Implements
Inherited Members

Remarks

Instances are exposed as singletons, and equality compares the algorithm name so a descriptor still matches after crossing an assembly or serialization boundary. The API shape mirrors System.Security.Cryptography.SlhDsaAlgorithm from .NET 10. The s (small) sets minimize signature size at a high signing cost; the f (fast) sets sign an order of magnitude faster with larger signatures. Verification is fast for all sets.

Properties

Name

Gets the algorithm name, e.g. SLH-DSA-SHAKE-128f.

public string Name { get; }

Property Value

string

PrivateKeySizeInBytes

Gets the size of the private key in bytes (4n).

public int PrivateKeySizeInBytes { get; }

Property Value

int

PublicKeySizeInBytes

Gets the size of the public key in bytes (2n).

public int PublicKeySizeInBytes { get; }

Property Value

int

SignatureSizeInBytes

Gets the size of a signature in bytes.

public int SignatureSizeInBytes { get; }

Property Value

int

SlhDsaSha2_128f

Gets the SLH-DSA-SHA2-128f parameter set (security category 1, fast).

public static SlhDsaAlgorithm SlhDsaSha2_128f { get; }

Property Value

SlhDsaAlgorithm

SlhDsaSha2_128s

Gets the SLH-DSA-SHA2-128s parameter set (security category 1, small).

public static SlhDsaAlgorithm SlhDsaSha2_128s { get; }

Property Value

SlhDsaAlgorithm

SlhDsaSha2_192f

Gets the SLH-DSA-SHA2-192f parameter set (security category 3, fast).

public static SlhDsaAlgorithm SlhDsaSha2_192f { get; }

Property Value

SlhDsaAlgorithm

SlhDsaSha2_192s

Gets the SLH-DSA-SHA2-192s parameter set (security category 3, small).

public static SlhDsaAlgorithm SlhDsaSha2_192s { get; }

Property Value

SlhDsaAlgorithm

SlhDsaSha2_256f

Gets the SLH-DSA-SHA2-256f parameter set (security category 5, fast).

public static SlhDsaAlgorithm SlhDsaSha2_256f { get; }

Property Value

SlhDsaAlgorithm

SlhDsaSha2_256s

Gets the SLH-DSA-SHA2-256s parameter set (security category 5, small).

public static SlhDsaAlgorithm SlhDsaSha2_256s { get; }

Property Value

SlhDsaAlgorithm

SlhDsaShake128f

Gets the SLH-DSA-SHAKE-128f parameter set (security category 1, fast).

public static SlhDsaAlgorithm SlhDsaShake128f { get; }

Property Value

SlhDsaAlgorithm

SlhDsaShake128s

Gets the SLH-DSA-SHAKE-128s parameter set (security category 1, small).

public static SlhDsaAlgorithm SlhDsaShake128s { get; }

Property Value

SlhDsaAlgorithm

SlhDsaShake192f

Gets the SLH-DSA-SHAKE-192f parameter set (security category 3, fast).

public static SlhDsaAlgorithm SlhDsaShake192f { get; }

Property Value

SlhDsaAlgorithm

SlhDsaShake192s

Gets the SLH-DSA-SHAKE-192s parameter set (security category 3, small).

public static SlhDsaAlgorithm SlhDsaShake192s { get; }

Property Value

SlhDsaAlgorithm

SlhDsaShake256f

Gets the SLH-DSA-SHAKE-256f parameter set (security category 5, fast).

public static SlhDsaAlgorithm SlhDsaShake256f { get; }

Property Value

SlhDsaAlgorithm

SlhDsaShake256s

Gets the SLH-DSA-SHAKE-256s parameter set (security category 5, small).

public static SlhDsaAlgorithm SlhDsaShake256s { get; }

Property Value

SlhDsaAlgorithm

Methods

Equals(SlhDsaAlgorithm?)

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

public bool Equals(SlhDsaAlgorithm? other)

Parameters

other SlhDsaAlgorithm

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 ==(SlhDsaAlgorithm?, SlhDsaAlgorithm?)

Determines whether two parameter sets are the same.

public static bool operator ==(SlhDsaAlgorithm? left, SlhDsaAlgorithm? right)

Parameters

left SlhDsaAlgorithm

The first parameter set, or null.

right SlhDsaAlgorithm

The second parameter set, or null.

Returns

bool

true if both operands describe the same parameter set.

operator !=(SlhDsaAlgorithm?, SlhDsaAlgorithm?)

Determines whether two parameter sets are different.

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

Parameters

left SlhDsaAlgorithm

The first parameter set, or null.

right SlhDsaAlgorithm

The second parameter set, or null.

Returns

bool

true if the operands describe different parameter sets.