MLKemCng 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.
Provides a Cryptography Next Generation (CNG) implementation of the Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM).
public ref class MLKemCng sealed : System::Security::Cryptography::MLKem
public sealed class MLKemCng : System.Security.Cryptography.MLKem
type MLKemCng = class
inherit MLKem
Public NotInheritable Class MLKemCng
Inherits MLKem
- Inheritance
Remarks
This algorithm is specified by FIPS-203.
Developers are encouraged to program against the MLKem base class, rather than any specific derived class.
The derived classes are intended for interop with the underlying system cryptographic libraries.
Constructors
MLKemCng(CngKey) |
Initializes a new instance of the MLKemCng class by using the specified CngKey. |
Properties
Algorithm |
Gets the specific ML-KEM algorithm for this key. (Inherited from MLKem) |
Methods
Decapsulate(Byte[]) |
Decapsulates a shared secret from a provided ciphertext. (Inherited from MLKem) |
Decapsulate(ReadOnlySpan<Byte>, Span<Byte>) |
Decapsulates a shared secret from a provided ciphertext. (Inherited from MLKem) |
DecapsulateCore(ReadOnlySpan<Byte>, Span<Byte>) |
When overridden in a derived class, decapsulates a shared secret from a provided ciphertext. (Inherited from MLKem) |
Dispose() |
Releases all resources used by the MLKem class. (Inherited from MLKem) |
Dispose(Boolean) |
Called by the |
Encapsulate(Byte[], Byte[]) |
Creates an encapsulation ciphertext and shared secret. (Inherited from MLKem) |
Encapsulate(Span<Byte>, Span<Byte>) |
Creates an encapsulation ciphertext and shared secret, writing them into the provided buffers. (Inherited from MLKem) |
EncapsulateCore(Span<Byte>, Span<Byte>) |
When overridden in a derived class, creates an encapsulation ciphertext and shared secret, writing them into the provided buffers. (Inherited from MLKem) |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
ExportDecapsulationKey() |
Exports the decapsulation key. (Inherited from MLKem) |
ExportDecapsulationKey(Span<Byte>) |
Exports the decapsulation key into the provided buffer. (Inherited from MLKem) |
ExportDecapsulationKeyCore(Span<Byte>) |
When overridden in a derived class, exports the decapsulation key into the provided buffer. (Inherited from MLKem) |
ExportEncapsulationKey() |
Exports the encapsulation key. (Inherited from MLKem) |
ExportEncapsulationKey(Span<Byte>) |
Exports the encapsulation key into the provided buffer. (Inherited from MLKem) |
ExportEncapsulationKeyCore(Span<Byte>) |
When overridden in a derived class, exports the encapsulation key into the provided buffer. (Inherited from MLKem) |
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) |
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. (Inherited from MLKem) |
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) |
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. (Inherited from MLKem) |
ExportEncryptedPkcs8PrivateKey(String, PbeParameters) |
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. (Inherited from MLKem) |
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 MLKem) |
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 MLKem) |
ExportEncryptedPkcs8PrivateKeyPem(String, PbeParameters) |
Exports the current key in a PEM-encoded representation of the PKCS#8 EncryptedPrivateKeyInfo representation of this key, using a string password. (Inherited from MLKem) |
ExportPkcs8PrivateKey() |
Export the current key in the PKCS#8 PrivateKeyInfo format. (Inherited from MLKem) |
ExportPkcs8PrivateKeyPem() |
Exports the current key in a PEM-encoded representation of the PKCS#8 PrivateKeyInfo format. (Inherited from MLKem) |
ExportPrivateSeed() |
Exports the private seed. (Inherited from MLKem) |
ExportPrivateSeed(Span<Byte>) |
Exports the private seed into the provided buffer. (Inherited from MLKem) |
ExportPrivateSeedCore(Span<Byte>) |
When overridden in a derived class, exports the private seed into the provided buffer. (Inherited from MLKem) |
ExportSubjectPublicKeyInfo() |
Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format. (Inherited from MLKem) |
ExportSubjectPublicKeyInfoPem() |
Exports the public-key portion of the current key in a PEM-encoded representation of the X.509 SubjectPublicKeyInfo format. (Inherited from MLKem) |
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) |
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 MLKem) |
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 MLKem) |
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 MLKem) |
TryExportPkcs8PrivateKey(Span<Byte>, Int32) |
Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into the provided buffer. (Inherited from MLKem) |
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 MLKem) |
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 MLKem) |