6 types derived from MLKem
System.Security.Cryptography (6)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.cs (1)
24public sealed partial class MLKemCng : MLKem
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (1)
16public sealed partial class MLKemCng : MLKem
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
8internal sealed partial class MLKemImplementation : MLKem
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.Windows.cs (1)
17internal sealed partial class MLKemImplementation : MLKem
System\Security\Cryptography\MLKemOpenSsl.cs (1)
23public sealed partial class MLKemOpenSsl : MLKem
System\Security\Cryptography\MLKemOpenSsl.NotSupported.cs (1)
8public sealed partial class MLKemOpenSsl : MLKem
66 references to MLKem
Microsoft.Bcl.Cryptography (6)
Microsoft.Bcl.Cryptography.Forwards.cs (1)
17[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.MLKem))]
System\Security\Cryptography\X509Certificates\X509CertificateKeyAccessors.cs (5)
24/// Gets the <see cref="MLKem"/> public key from this certificate. 41public static MLKem? GetMLKemPublicKey(this X509Certificate2 certificate) 68/// Gets the <see cref="MLKem"/> private key from this certificate. 85public static MLKem? GetMLKemPrivateKey(this X509Certificate2 certificate) 122public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certificate, MLKem privateKey)
System.Security.Cryptography (60)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (33)
49/// Initializes a new instance of the <see cref="MLKem" /> class. 82public static MLKem GenerateKey(MLKemAlgorithm algorithm) 350public static MLKem ImportPrivateSeed(MLKemAlgorithm algorithm, ReadOnlySpan<byte> source) 383public static MLKem ImportPrivateSeed(MLKemAlgorithm algorithm, byte[] source) 409public static MLKem ImportDecapsulationKey(MLKemAlgorithm algorithm, ReadOnlySpan<byte> source) 441public static MLKem ImportDecapsulationKey(MLKemAlgorithm algorithm, byte[] source) 466public static MLKem ImportEncapsulationKey(MLKemAlgorithm algorithm, ReadOnlySpan<byte> source) 498public static MLKem ImportEncapsulationKey(MLKemAlgorithm algorithm, byte[] source) 1183public static MLKem ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source) 1188KeyFormatHelper.ReadSubjectPublicKeyInfo(s_knownOids, source, SubjectPublicKeyReader, out int read, out MLKem kem); 1192static void SubjectPublicKeyReader(ReadOnlySpan<byte> key, in ValueAlgorithmIdentifierAsn identifier, out MLKem kem) 1209public static MLKem ImportSubjectPublicKeyInfo(byte[] source) 1245public static MLKem ImportPkcs8PrivateKey(ReadOnlySpan<byte> source) 1250KeyFormatHelper.ReadPkcs8(s_knownOids, source, MLKemKeyReader, out int read, out MLKem kem); 1259public static MLKem ImportPkcs8PrivateKey(byte[] source) 1303public static MLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, ReadOnlySpan<byte> source) 1348public static MLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> source) 1396public static MLKem ImportEncryptedPkcs8PrivateKey(string password, byte[] source) 1442public static MLKem ImportFromPem(ReadOnlySpan<char> source) 1446return PemKeyHelpers.ImportFactoryPem<MLKem>(source, label => 1459public static MLKem ImportFromPem(string source) 1520public static MLKem ImportFromEncryptedPem(ReadOnlySpan<char> source, ReadOnlySpan<char> password) 1522return PemKeyHelpers.ImportEncryptedFactoryPem<MLKem, char>( 1578public static MLKem ImportFromEncryptedPem(ReadOnlySpan<char> source, ReadOnlySpan<byte> passwordBytes) 1580return PemKeyHelpers.ImportEncryptedFactoryPem<MLKem, byte>( 1590public static MLKem ImportFromEncryptedPem(string source, string password) 1602public static MLKem ImportFromEncryptedPem(string source, byte[] passwordBytes) 1611/// Releases all resources used by the <see cref="MLKem"/> class. 1625/// resources used by the current instance of the <see cref="MLKem"/> class. 1673throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLKem))); 1693out MLKem kem) 1726MLKem key = MLKemImplementation.ImportPrivateSeedImpl(algorithm, kemKey.Both.Seed); 1761ObjectDisposedException.ThrowIf(_disposed, typeof(MLKem));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemAlgorithm.cs (1)
12/// <seealso cref="MLKem" />
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.cs (1)
18/// Developers are encouraged to program against the <see cref="MLKem" /> base class,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
14internal static MLKemImplementation DuplicatePrivateKey(MLKem key)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
12MLKem kem,
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.PrivateKey.cs (3)
95public MLKem? GetMLKemPrivateKey() 197public ICertificatePal CopyWithPrivateKey(MLKem privateKey) 199throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLKem)));
System\Security\Cryptography\X509Certificates\ICertificatePal.cs (2)
35MLKem? GetMLKemPrivateKey(); 44ICertificatePal CopyWithPrivateKey(MLKem privateKey);
System\Security\Cryptography\X509Certificates\PublicKey.cs (7)
62/// using SubjectPublicKeyInfo from an <see cref="MLKem" />. 65/// An <see cref="MLKem" /> key to obtain the SubjectPublicKeyInfo from. 69/// <see cref="MLKem.ExportSubjectPublicKeyInfo" /> must return a 72public PublicKey(MLKem key) : this(key.ExportSubjectPublicKeyInfo()) 347/// Gets the <see cref="MLKem" /> public key, or <see langword="null" /> 360public MLKem? GetMLKemPublicKey() 365return EncodeSubjectPublicKeyInfo().Encode(MLKem.ImportSubjectPublicKeyInfo);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (11)
783/// Gets the <see cref="MLKem"/> public key from this certificate. 794public MLKem? GetMLKemPublicKey() 800MLKem? publicKey = PublicKey.GetMLKemPublicKey(); 806/// Gets the <see cref="MLKem"/> private key from this certificate. 814public MLKem? GetMLKemPrivateKey() 846public X509Certificate2 CopyWithPrivateKey(MLKem privateKey) 853using (MLKem? publicKey = GetMLKemPublicKey()) 1377ExtractKeyFromPem<MLKem>( 1380MLKem.ImportFromPem, 1465ExtractKeyFromEncryptedPem<MLKem>( 1468MLKem.ImportFromEncryptedPem,