3 instantiations of MLKemAlgorithm
System.Security.Cryptography (3)
src\libraries\Common\src\System\Security\Cryptography\MLKemAlgorithm.cs (3)
38
public static MLKemAlgorithm MLKem512 { get; } =
new
("ML-KEM-512", 800, 1632, 768, Oids.MlKem512);
46
public static MLKemAlgorithm MLKem768 { get; } =
new
("ML-KEM-768", 1184, 2400, 1088, Oids.MlKem768);
54
public static MLKemAlgorithm MLKem1024 { get; } =
new
("ML-KEM-1024", 1568, 3168, 1568, Oids.MlKem1024);
57 references to MLKemAlgorithm
Microsoft.Bcl.Cryptography (1)
Microsoft.Bcl.Cryptography.Forwards.cs (1)
18
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.
MLKemAlgorithm
))]
System.Security.Cryptography (56)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.KemAlgs.cs (3)
26
MlKem512 = EvpKemAvailable(
MLKemAlgorithm
.MLKem512.Name);
27
MlKem768 = EvpKemAvailable(
MLKemAlgorithm
.MLKem768.Name);
28
MlKem1024 = EvpKemAvailable(
MLKemAlgorithm
.MLKem1024.Name);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (16)
47
public
MLKemAlgorithm
Algorithm { get; }
58
protected MLKem(
MLKemAlgorithm
algorithm)
83
public static MLKem GenerateKey(
MLKemAlgorithm
algorithm)
339
/// <see cref="
MLKemAlgorithm
.PrivateSeedSizeInBytes" /> from <paramref name="algorithm" />.
351
public static MLKem ImportPrivateSeed(
MLKemAlgorithm
algorithm, ReadOnlySpan<byte> source)
370
/// <see cref="
MLKemAlgorithm
.PrivateSeedSizeInBytes" /> from <paramref name="algorithm" />.
384
public static MLKem ImportPrivateSeed(
MLKemAlgorithm
algorithm, byte[] source)
410
public static MLKem ImportDecapsulationKey(
MLKemAlgorithm
algorithm, ReadOnlySpan<byte> source)
442
public static MLKem ImportDecapsulationKey(
MLKemAlgorithm
algorithm, byte[] source)
467
public static MLKem ImportEncapsulationKey(
MLKemAlgorithm
algorithm, ReadOnlySpan<byte> source)
499
public static MLKem ImportEncapsulationKey(
MLKemAlgorithm
algorithm, byte[] source)
1212
MLKemAlgorithm
algorithm = GetAlgorithmIdentifier(in identifier);
1707
private static
MLKemAlgorithm
GetAlgorithmIdentifier(ref readonly AlgorithmIdentifierAsn identifier)
1709
MLKemAlgorithm
? algorithm =
MLKemAlgorithm
.FromOid(identifier.Algorithm);
1727
MLKemAlgorithm
algorithm = GetAlgorithmIdentifier(in algorithmIdentifier);
src\libraries\Common\src\System\Security\Cryptography\MLKemAlgorithm.cs (15)
14
public sealed class MLKemAlgorithm : IEquatable<
MLKemAlgorithm
>
38
public static
MLKemAlgorithm
MLKem512 { get; } = new("ML-KEM-512", 800, 1632, 768, Oids.MlKem512);
46
public static
MLKemAlgorithm
MLKem768 { get; } = new("ML-KEM-768", 1184, 2400, 1088, Oids.MlKem768);
54
public static
MLKemAlgorithm
MLKem1024 { get; } = new("ML-KEM-1024", 1568, 3168, 1568, Oids.MlKem1024);
111
/// Compares two <see cref="
MLKemAlgorithm
" /> objects.
114
/// An object to be compared to the current <see cref="
MLKemAlgorithm
"/> object.
120
public bool Equals([NotNullWhen(true)]
MLKemAlgorithm
? other) => other is not null && other.Name == Name;
123
public override bool Equals([NotNullWhen(true)] object? obj) => obj is
MLKemAlgorithm
alg && alg.Name == Name;
132
/// Determines whether two <see cref="
MLKemAlgorithm
" /> objects specify the same algorithm name.
143
public static bool operator ==(
MLKemAlgorithm
? left,
MLKemAlgorithm
? right)
149
/// Determines whether two <see cref="
MLKemAlgorithm
" /> objects do not specify the same algorithm name.
160
public static bool operator !=(
MLKemAlgorithm
? left,
MLKemAlgorithm
? right)
165
internal static
MLKemAlgorithm
? FromOid(string? oid)
src\libraries\Common\src\System\Security\Cryptography\MLKemCng.cs (2)
50
private static
MLKemAlgorithm
AlgorithmFromHandleWithPlatformCheck(CngKey key, out CngKey duplicateKey)
60
private static partial
MLKemAlgorithm
AlgorithmFromHandle(CngKey key, out CngKey duplicateKey);
src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
21
MLKemAlgorithm
alg = key.Algorithm;
System\Security\Cryptography\Cng.NotSupported.cs (1)
429
private static partial
MLKemAlgorithm
AlgorithmFromHandle(CngKey key, out CngKey duplicateKey)
System\Security\Cryptography\MLKemImplementation.OpenSsl.cs (9)
20
MLKemAlgorithm
algorithm,
30
internal static MLKemImplementation GenerateKeyImpl(
MLKemAlgorithm
algorithm)
38
internal static MLKemImplementation ImportPrivateSeedImpl(
MLKemAlgorithm
algorithm, ReadOnlySpan<byte> source)
47
internal static MLKemImplementation ImportDecapsulationKeyImpl(
MLKemAlgorithm
algorithm, ReadOnlySpan<byte> source)
56
internal static MLKemImplementation ImportEncapsulationKeyImpl(
MLKemAlgorithm
algorithm, ReadOnlySpan<byte> source)
115
private static string MapAlgorithmToName(
MLKemAlgorithm
algorithm)
119
if (algorithm ==
MLKemAlgorithm
.MLKem512)
123
else if (algorithm ==
MLKemAlgorithm
.MLKem768)
127
else if (algorithm ==
MLKemAlgorithm
.MLKem1024)
System\Security\Cryptography\MLKemOpenSsl.cs (1)
61
private static partial
MLKemAlgorithm
AlgorithmFromHandle(
System\Security\Cryptography\MLKemOpenSsl.OpenSsl.cs (4)
18
private static partial
MLKemAlgorithm
AlgorithmFromHandle(
43
return
MLKemAlgorithm
.MLKem512;
45
return
MLKemAlgorithm
.MLKem768;
47
return
MLKemAlgorithm
.MLKem1024;
System\Security\Cryptography\X509Certificates\PublicKey.cs (1)
365
if (
MLKemAlgorithm
.FromOid(_oid.Value) is null)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (3)
797
if (
MLKemAlgorithm
.FromOid(GetKeyAlgorithm()) is null)
818
MLKemAlgorithm
? algorithm =
MLKemAlgorithm
.FromOid(GetKeyAlgorithm());