Edit

Share via


MLDsaCng Class

Definition

Provides a Cryptography Next Generation (CNG) implementation of the Module-Lattice-Based Digital Signature Algorithm (ML-DSA).

public ref class MLDsaCng sealed : System::Security::Cryptography::MLDsa
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class MLDsaCng : System.Security.Cryptography.MLDsa
public sealed class MLDsaCng : System.Security.Cryptography.MLDsa
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type MLDsaCng = class
    inherit MLDsa
type MLDsaCng = class
    inherit MLDsa
Public NotInheritable Class MLDsaCng
Inherits MLDsa
Inheritance
MLDsaCng
Attributes

Remarks

This algorithm is specified by FIPS-204.

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

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

Constructors

MLDsaCng(CngKey)

Initializes a new instance of the MLDsaCng class by using the specified CngKey.

Properties

Algorithm

Gets the specific ML-DSA algorithm for this key.

(Inherited from MLDsa)

Methods

Dispose() (Inherited from MLDsa)
Dispose(Boolean)

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

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters)

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

(Inherited from MLDsa)
ExportEncryptedPkcs8PrivateKey(String, PbeParameters)

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

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
ExportMLDsaPrivateKey()

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

(Inherited from MLDsa)
ExportMLDsaPrivateKey(Span<Byte>)

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

(Inherited from MLDsa)
ExportMLDsaPrivateKeyCore(Span<Byte>)

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

(Inherited from MLDsa)
ExportMLDsaPrivateSeed()

Exports the private seed in the FIPS 204 private seed format.

(Inherited from MLDsa)
ExportMLDsaPrivateSeed(Span<Byte>)

Exports the private seed of the current key.

(Inherited from MLDsa)
ExportMLDsaPrivateSeedCore(Span<Byte>)

When overridden in a derived class, exports the private seed to the specified buffer.

(Inherited from MLDsa)
ExportMLDsaPublicKey()

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

(Inherited from MLDsa)
ExportMLDsaPublicKey(Span<Byte>)

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

(Inherited from MLDsa)
ExportMLDsaPublicKeyCore(Span<Byte>)

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

(Inherited from MLDsa)
ExportPkcs8PrivateKey()

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

(Inherited from MLDsa)
ExportPkcs8PrivateKeyPem()

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

(Inherited from MLDsa)
ExportSubjectPublicKeyInfo()

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

(Inherited from MLDsa)
ExportSubjectPublicKeyInfoPem()

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

(Inherited from MLDsa)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetKey()

Gets a new CngKey representing the key used by the current instance.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

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

Signs the specified data.

(Inherited from MLDsa)
SignData(ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

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

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
SignMu(Byte[])

Signs the specified externally computed signature mu (μ) value.

(Inherited from MLDsa)
SignMu(ReadOnlySpan<Byte>, Span<Byte>)

Signs the specified externally computed signature mu (μ) value, writing the signature into the provided buffer.

(Inherited from MLDsa)
SignMu(ReadOnlySpan<Byte>)

Signs the specified externally computed signature mu (μ) value.

(Inherited from MLDsa)
SignMuCore(ReadOnlySpan<Byte>, Span<Byte>)

When overridden in a derived class, computes the remainder of the signature from the precomputed mu (μ) value, writing it into the provided buffer.

(Inherited from MLDsa)
SignPreHash(Byte[], String, Byte[])

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

(Inherited from MLDsa)
SignPreHash(ReadOnlySpan<Byte>, Span<Byte>, String, ReadOnlySpan<Byte>)

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

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
TryExportPkcs8PrivateKey(Span<Byte>, Int32)

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

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
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.

(Inherited from MLDsa)
VerifyData(Byte[], Byte[], Byte[])

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

(Inherited from MLDsa)
VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

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

(Inherited from MLDsa)
VerifyDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

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

(Inherited from MLDsa)
VerifyMu(Byte[], Byte[])

Verifies that a digital signature is valid for the provided externally computed signature mu (μ) value.

(Inherited from MLDsa)
VerifyMu(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Verifies that a digital signature is valid for the provided externally computed signature mu (μ) value.

(Inherited from MLDsa)
VerifyMuCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

When overridden in a derived class, verifies that a digital signature is valid for the provided externally computed signature mu (μ) value.

(Inherited from MLDsa)
VerifyPreHash(Byte[], Byte[], String, Byte[])

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

(Inherited from MLDsa)
VerifyPreHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, String, ReadOnlySpan<Byte>)

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

(Inherited from MLDsa)
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.

(Inherited from MLDsa)

Applies to