6 types derived from MLKem
System.Security.Cryptography (6)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.cs (1)
24
public sealed partial class MLKemCng :
MLKem
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (1)
16
public sealed partial class MLKemCng :
MLKem
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
8
internal sealed partial class MLKemImplementation :
MLKem
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.Windows.cs (1)
17
internal sealed partial class MLKemImplementation :
MLKem
System\Security\Cryptography\MLKemOpenSsl.cs (1)
23
public sealed partial class MLKemOpenSsl :
MLKem
System\Security\Cryptography\MLKemOpenSsl.NotSupported.cs (1)
8
public 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.
41
public static
MLKem
? GetMLKemPublicKey(this X509Certificate2 certificate)
68
/// Gets the <see cref="
MLKem
"/> private key from this certificate.
85
public static
MLKem
? GetMLKemPrivateKey(this X509Certificate2 certificate)
122
public 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.
82
public static
MLKem
GenerateKey(MLKemAlgorithm algorithm)
350
public static
MLKem
ImportPrivateSeed(MLKemAlgorithm algorithm, ReadOnlySpan<byte> source)
383
public static
MLKem
ImportPrivateSeed(MLKemAlgorithm algorithm, byte[] source)
409
public static
MLKem
ImportDecapsulationKey(MLKemAlgorithm algorithm, ReadOnlySpan<byte> source)
441
public static
MLKem
ImportDecapsulationKey(MLKemAlgorithm algorithm, byte[] source)
466
public static
MLKem
ImportEncapsulationKey(MLKemAlgorithm algorithm, ReadOnlySpan<byte> source)
498
public static
MLKem
ImportEncapsulationKey(MLKemAlgorithm algorithm, byte[] source)
1183
public static
MLKem
ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source)
1188
KeyFormatHelper.ReadSubjectPublicKeyInfo(s_knownOids, source, SubjectPublicKeyReader, out int read, out
MLKem
kem);
1192
static void SubjectPublicKeyReader(ReadOnlySpan<byte> key, in ValueAlgorithmIdentifierAsn identifier, out
MLKem
kem)
1209
public static
MLKem
ImportSubjectPublicKeyInfo(byte[] source)
1245
public static
MLKem
ImportPkcs8PrivateKey(ReadOnlySpan<byte> source)
1250
KeyFormatHelper.ReadPkcs8(s_knownOids, source, MLKemKeyReader, out int read, out
MLKem
kem);
1259
public static
MLKem
ImportPkcs8PrivateKey(byte[] source)
1303
public static
MLKem
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, ReadOnlySpan<byte> source)
1348
public static
MLKem
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> source)
1396
public static
MLKem
ImportEncryptedPkcs8PrivateKey(string password, byte[] source)
1442
public static
MLKem
ImportFromPem(ReadOnlySpan<char> source)
1446
return PemKeyHelpers.ImportFactoryPem<
MLKem
>(source, label =>
1459
public static
MLKem
ImportFromPem(string source)
1520
public static
MLKem
ImportFromEncryptedPem(ReadOnlySpan<char> source, ReadOnlySpan<char> password)
1522
return PemKeyHelpers.ImportEncryptedFactoryPem<
MLKem
, char>(
1578
public static
MLKem
ImportFromEncryptedPem(ReadOnlySpan<char> source, ReadOnlySpan<byte> passwordBytes)
1580
return PemKeyHelpers.ImportEncryptedFactoryPem<
MLKem
, byte>(
1590
public static
MLKem
ImportFromEncryptedPem(string source, string password)
1602
public 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.
1673
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(
MLKem
)));
1693
out
MLKem
kem)
1726
MLKem
key = MLKemImplementation.ImportPrivateSeedImpl(algorithm, kemKey.Both.Seed);
1761
ObjectDisposedException.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)
14
internal static MLKemImplementation DuplicatePrivateKey(
MLKem
key)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
12
MLKem
kem,
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.PrivateKey.cs (3)
95
public
MLKem
? GetMLKemPrivateKey()
197
public ICertificatePal CopyWithPrivateKey(
MLKem
privateKey)
199
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(
MLKem
)));
System\Security\Cryptography\X509Certificates\ICertificatePal.cs (2)
35
MLKem
? GetMLKemPrivateKey();
44
ICertificatePal 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
72
public PublicKey(
MLKem
key) : this(key.ExportSubjectPublicKeyInfo())
347
/// Gets the <see cref="
MLKem
" /> public key, or <see langword="null" />
360
public
MLKem
? GetMLKemPublicKey()
365
return EncodeSubjectPublicKeyInfo().Encode(
MLKem
.ImportSubjectPublicKeyInfo);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (11)
783
/// Gets the <see cref="
MLKem
"/> public key from this certificate.
794
public
MLKem
? GetMLKemPublicKey()
800
MLKem
? publicKey = PublicKey.GetMLKemPublicKey();
806
/// Gets the <see cref="
MLKem
"/> private key from this certificate.
814
public
MLKem
? GetMLKemPrivateKey()
846
public X509Certificate2 CopyWithPrivateKey(
MLKem
privateKey)
853
using (
MLKem
? publicKey = GetMLKemPublicKey())
1377
ExtractKeyFromPem<
MLKem
>(
1380
MLKem
.ImportFromPem,
1465
ExtractKeyFromEncryptedPem<
MLKem
>(
1468
MLKem
.ImportFromEncryptedPem,