MLDsa Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an ML-DSA key.
public ref class MLDsa abstract : IDisposable
public abstract class MLDsa : IDisposable
type MLDsa = class
interface IDisposable
Public MustInherit Class MLDsa
Implements IDisposable
- Inheritance
-
MLDsa
- Derived
- Implements
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
| MLDsa(MLDsaAlgorithm) |
Initializes a new instance of the MLDsa class. |
Properties
| Algorithm |
Gets the specific ML-DSA algorithm for this key. |
| IsSupported |
Gets a value indicating whether the current platform supports ML-DSA. |
Methods
| Dispose() |
Releases all resources used by the MLDsa class. |
| Dispose(Boolean) |
Called by the |
| 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. |
| ExportMLDsaPrivateKey() |
Exports the current key in the FIPS 204 private key format. |
| ExportMLDsaPrivateKey(Span<Byte>) |
Exports the current key in the FIPS 204 private key format. |
| ExportMLDsaPrivateKeyCore(Span<Byte>) |
When overridden in a derived class, exports the FIPS 204 private key to the specified buffer. |
| ExportMLDsaPrivateSeed() |
Exports the private seed in the FIPS 204 private seed format. |
| ExportMLDsaPrivateSeed(Span<Byte>) |
Exports the private seed of the current key. |
| ExportMLDsaPrivateSeedCore(Span<Byte>) |
When overridden in a derived class, exports the private seed to the specified buffer. |
| ExportMLDsaPublicKey() |
Exports the public-key portion of the current key in the FIPS 204 public key format. |
| ExportMLDsaPublicKey(Span<Byte>) |
Exports the public-key portion of the current key in the FIPS 204 public key format. |
| ExportMLDsaPublicKeyCore(Span<Byte>) |
When overridden in a derived class, exports the FIPS 204 public key to the specified buffer. |
| 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. |
| 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(MLDsaAlgorithm) |
Generates a new ML-DSA key. |
| 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 ML-DSA private key from a PKCS#8 EncryptedPrivateKeyInfo structure. |
| ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>) |
Imports an ML-DSA private key from a PKCS#8 EncryptedPrivateKeyInfo structure. |
| ImportEncryptedPkcs8PrivateKey(String, Byte[]) |
Imports an ML-DSA private key from a PKCS#8 EncryptedPrivateKeyInfo structure. |
| ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>) |
Imports an ML-DSA key from an encrypted RFC 7468 PEM-encoded string. |
| ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>) |
Imports an ML-DSA key from an encrypted RFC 7468 PEM-encoded string. |
| ImportFromEncryptedPem(String, Byte[]) |
Imports an ML-DSA key from an encrypted RFC 7468 PEM-encoded string. |
| ImportFromEncryptedPem(String, String) |
Imports an ML-DSA key from an encrypted RFC 7468 PEM-encoded string. |
| ImportFromPem(ReadOnlySpan<Char>) |
Imports an ML-DSA key from an RFC 7468 PEM-encoded string. |
| ImportFromPem(String) |
Imports an ML-DSA key from an RFC 7468 PEM-encoded string. |
| ImportMLDsaPrivateKey(MLDsaAlgorithm, Byte[]) |
Imports an ML-DSA private key in the FIPS 204 private key format. |
| ImportMLDsaPrivateKey(MLDsaAlgorithm, ReadOnlySpan<Byte>) |
Imports an ML-DSA private key in the FIPS 204 private key format. |
| ImportMLDsaPrivateSeed(MLDsaAlgorithm, Byte[]) |
Imports an ML-DSA private key from its private seed value. |
| ImportMLDsaPrivateSeed(MLDsaAlgorithm, ReadOnlySpan<Byte>) |
Imports an ML-DSA private key from its private seed value. |
| ImportMLDsaPublicKey(MLDsaAlgorithm, Byte[]) |
Imports an ML-DSA public key in the FIPS 204 public key format. |
| ImportMLDsaPublicKey(MLDsaAlgorithm, ReadOnlySpan<Byte>) |
Imports an ML-DSA public key in the FIPS 204 public key format. |
| ImportPkcs8PrivateKey(Byte[]) |
Imports an ML-DSA private key from a PKCS#8 PrivateKeyInfo structure. |
| ImportPkcs8PrivateKey(ReadOnlySpan<Byte>) |
Imports an ML-DSA private key from a PKCS#8 PrivateKeyInfo structure. |
| ImportSubjectPublicKeyInfo(Byte[]) |
Imports an ML-DSA public key from an X.509 SubjectPublicKeyInfo structure. |
| ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>) |
Imports an ML-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. |
| SignMu(Byte[]) |
Signs the specified externally computed signature mu (μ) value. |
| SignMu(ReadOnlySpan<Byte>, Span<Byte>) |
Signs the specified externally computed signature mu (μ) value, writing the signature into the provided buffer. |
| SignMu(ReadOnlySpan<Byte>) |
Signs the specified externally computed signature mu (μ) value. |
| 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. |
| SignPreHash(Byte[], String, Byte[]) |
Signs the specified hash using the FIPS 204 pre-hash signing algorithm. |
| 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. |
| 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. |
| VerifyMu(Byte[], Byte[]) |
Verifies that a digital signature is valid for the provided externally computed signature mu (μ) value. |
| VerifyMu(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>) |
Verifies that a digital signature is valid for the provided externally computed signature mu (μ) value. |
| 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. |
| VerifyPreHash(Byte[], Byte[], String, Byte[]) |
Verifies that the specified FIPS 204 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 204 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. |