Edit

Share via


SlhDsa Class

Definition

Represents an SLH-DSA key.

public ref class SlhDsa abstract : IDisposable
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public abstract class SlhDsa : IDisposable
public abstract class SlhDsa : IDisposable
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SlhDsa = class
    interface IDisposable
type SlhDsa = class
    interface IDisposable
Public MustInherit Class SlhDsa
Implements IDisposable
Inheritance
SlhDsa
Derived
Attributes
Implements

Remarks

This algorithm is specified by FIPS-205.

Developers are encouraged to program against the SlhDsa base class, rather than any specific derived class.

The derived classes are intended for interop with the underlying system cryptographic libraries.

Constructors

SlhDsa(SlhDsaAlgorithm)

Initializes a new instance of the SlhDsa class.

Properties

Algorithm

Gets the specific SLH-DSA algorithm for this key.

IsSupported

Gets a value indicating whether the current platform supports SLH-DSA.

Methods

Dispose()

Releases all resources used by the SlhDsa class.

Dispose(Boolean)

Called by the Dispose() and Finalize() methods to release the managed and unmanaged resources used by the current instance of the SlhDsa class.

Equals(Object)

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

(Inherited from Object)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters)

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password.

ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters)

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password.

ExportEncryptedPkcs8PrivateKey(String, PbeParameters)

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password.

ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters)

Exports the current key in a PEM-encoded representation of the PKCS#8 EncryptedPrivateKeyInfo representation of this key, using a byte-based password.

ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters)

Exports the current key in a PEM-encoded representation of the PKCS#8 EncryptedPrivateKeyInfo representation of this key, using a char-based password.

ExportEncryptedPkcs8PrivateKeyPem(String, PbeParameters)

Exports the current key in a PEM-encoded representation of the PKCS#8 EncryptedPrivateKeyInfo representation of this key, using a char-based password.

ExportPkcs8PrivateKey()

Exports the current key in the PKCS#8 PrivateKeyInfo format.

ExportPkcs8PrivateKeyPem()

Exports the current key in a PEM-encoded representation of the PKCS#8 PrivateKeyInfo format.

ExportSlhDsaPrivateKey()

Exports the current key in the FIPS 205 private key format.

ExportSlhDsaPrivateKey(Span<Byte>)

Exports the current key in the FIPS 205 private key format.

ExportSlhDsaPrivateKeyCore(Span<Byte>)

When overridden in a derived class, exports the FIPS 205 private key to the specified buffer.

ExportSlhDsaPublicKey()

Exports the public-key portion of the current key in the FIPS 205 public key format.

ExportSlhDsaPublicKey(Span<Byte>)

Exports the public-key portion of the current key in the FIPS 205 public key format.

ExportSlhDsaPublicKeyCore(Span<Byte>)

When overridden in a derived class, exports the FIPS 205 public key to the specified buffer.

ExportSubjectPublicKeyInfo()

Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format.

ExportSubjectPublicKeyInfoPem()

Exports the public-key portion of the current key in a PEM-encoded representation of the X.509 SubjectPublicKeyInfo format.

GenerateKey(SlhDsaAlgorithm)

Generates a new SLH-DSA key for the specified algorithm.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Imports an SLH-DSA private key from a PKCS#8 EncryptedPrivateKeyInfo structure.

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Imports an SLH-DSA private key from a PKCS#8 EncryptedPrivateKeyInfo structure.

ImportEncryptedPkcs8PrivateKey(String, Byte[])

Imports an SLH-DSA private key from a PKCS#8 EncryptedPrivateKeyInfo structure.

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Imports an SLH-DSA key from an encrypted RFC 7468 PEM-encoded string.

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Imports an SLH-DSA key from an encrypted RFC 7468 PEM-encoded string.

ImportFromEncryptedPem(String, Byte[])

Imports an SLH-DSA key from an encrypted RFC 7468 PEM-encoded string.

ImportFromEncryptedPem(String, String)

Imports an SLH-DSA key from an encrypted RFC 7468 PEM-encoded string.

ImportFromPem(ReadOnlySpan<Char>)

Imports an SLH-DSA key from an RFC 7468 PEM-encoded string.

ImportFromPem(String)

Imports an SLH-DSA key from an RFC 7468 PEM-encoded string.

ImportPkcs8PrivateKey(Byte[])

Imports an SLH-DSA private key from a PKCS#8 PrivateKeyInfo structure.

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>)

Imports an SLH-DSA private key from a PKCS#8 PrivateKeyInfo structure.

ImportSlhDsaPrivateKey(SlhDsaAlgorithm, Byte[])

Imports an SLH-DSA private key in the FIPS 205 private key format.

ImportSlhDsaPrivateKey(SlhDsaAlgorithm, ReadOnlySpan<Byte>)

Imports an SLH-DSA private key in the FIPS 205 private key format.

ImportSlhDsaPublicKey(SlhDsaAlgorithm, Byte[])

Imports an SLH-DSA public key in the FIPS 205 public key format.

ImportSlhDsaPublicKey(SlhDsaAlgorithm, ReadOnlySpan<Byte>)

Imports an SLH-DSA public key in the FIPS 205 public key format.

ImportSubjectPublicKeyInfo(Byte[])

Imports an SLH-DSA public key from an X.509 SubjectPublicKeyInfo structure.

ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>)

Imports an SLH-DSA public key from an X.509 SubjectPublicKeyInfo structure.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SignData(Byte[], Byte[])

Signs the specified data.

SignData(ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

Signs the specified data, writing the signature into the provided buffer.

SignDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>)

When overridden in a derived class, computes the signature of the specified data and context, writing it into the provided buffer.

SignPreHash(Byte[], String, Byte[])

Signs the specified hash using the FIPS 205 pre-hash signing algorithm.

SignPreHash(ReadOnlySpan<Byte>, Span<Byte>, String, ReadOnlySpan<Byte>)

Signs the specified hash using the FIPS 205 pre-hash signing algorithm, writing the signature into the provided buffer.

SignPreHashCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, Span<Byte>)

When overridden in a derived class, computes the pre-hash signature of the specified hash and context, writing it into the provided buffer.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.

TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.

TryExportEncryptedPkcs8PrivateKey(String, PbeParameters, Span<Byte>, Int32)

Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.

TryExportPkcs8PrivateKey(Span<Byte>, Int32)

Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into the provided buffer.

TryExportPkcs8PrivateKeyCore(Span<Byte>, Int32)

When overridden in a derived class, attempts to export the current key in the PKCS#8 PrivateKeyInfo format into the provided buffer.

TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

Attempts to export the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format into the provided buffer.

VerifyData(Byte[], Byte[], Byte[])

Verifies that the specified signature is valid for this key and the provided data.

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Verifies that the specified signature is valid for this key and the provided data.

VerifyDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

When overridden in a derived class, verifies the signature of the specified data and context.

VerifyPreHash(Byte[], Byte[], String, Byte[])

Verifies that the specified FIPS 205 pre-hash signature is valid for this key and the provided hash.

VerifyPreHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>)

Verifies that the specified FIPS 205 pre-hash signature is valid for this key and the provided hash.

VerifyPreHashCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>)

When overridden in a derived class, verifies the pre-hash signature of the specified hash and context.

Applies to