Edit

Share via


MLKemOpenSsl Class

Definition

Represents an ML-KEM key backed by OpenSSL.

public ref class MLKemOpenSsl sealed : System::Security::Cryptography::MLKem
public sealed class MLKemOpenSsl : System.Security.Cryptography.MLKem
type MLKemOpenSsl = class
    inherit MLKem
Public NotInheritable Class MLKemOpenSsl
Inherits MLKem
Inheritance
MLKemOpenSsl

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

MLKemOpenSsl(SafeEvpPKeyHandle)

Initializes a new instance of the MLKemOpenSsl class from an existing OpenSSL key represented as an EVP_PKEY*.

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 Dispose() and Finalize() methods to release the managed and unmanaged resources used by the current instance of the MLKem class.

(Inherited from MLKem)
DuplicateKeyHandle()

Gets a SafeEvpPKeyHandle representation of the cryptographic key.

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)
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)

Applies to