6 types derived from MLDsa
System.Security.Cryptography (6)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.cs (1)
24
public sealed partial class MLDsaCng :
MLDsa
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (1)
14
public sealed partial class MLDsaCng :
MLDsa
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.cs (1)
10
internal sealed partial class MLDsaImplementation :
MLDsa
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.Windows.cs (1)
14
internal sealed partial class MLDsaImplementation :
MLDsa
System\Security\Cryptography\MLDsaOpenSsl.cs (1)
23
public sealed partial class MLDsaOpenSsl :
MLDsa
System\Security\Cryptography\MLDsaOpenSsl.NotSupported.cs (1)
8
public sealed partial class MLDsaOpenSsl :
MLDsa
93 references to MLDsa
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Certificates\CertificateConfigLoader.cs (4)
187
using
var
mlDsa = ImportMLDsaKeyFromFile(keyText, password);
286
private static
MLDsa
ImportMLDsaKeyFromFile(string keyText, string? password)
290
return
MLDsa
.ImportFromPem(keyText);
294
return
MLDsa
.ImportFromEncryptedPem(keyText, password);
Microsoft.Bcl.Cryptography (6)
Microsoft.Bcl.Cryptography.Forwards.cs (1)
14
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.
MLDsa
))]
System\Security\Cryptography\X509Certificates\X509CertificateKeyAccessors.cs (5)
135
/// Gets the <see cref="
MLDsa
"/> public key from this certificate.
152
public static
MLDsa
? GetMLDsaPublicKey(this X509Certificate2 certificate)
179
/// Gets the <see cref="
MLDsa
"/> private key from this certificate.
196
public static
MLDsa
? GetMLDsaPrivateKey(this X509Certificate2 certificate)
245
public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certificate,
MLDsa
privateKey)
System.Net.Security (1)
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
84
if (KeyHandle == null &&
MLDsa
.IsSupported)
System.Security.Cryptography (69)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (34)
21
/// Developers are encouraged to program against the <see cref="
MLDsa
"/> base class,
53
/// Initializes a new instance of the <see cref="
MLDsa
" /> class.
68
private protected void ThrowIfDisposed() => ObjectDisposedException.ThrowIf(_disposed, typeof(
MLDsa
));
79
/// Releases all resources used by the <see cref="
MLDsa
"/> class.
1319
public static
MLDsa
GenerateKey(MLDsaAlgorithm algorithm)
1357
public static
MLDsa
ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source)
1362
KeyFormatHelper.ReadSubjectPublicKeyInfo(KnownOids, source, SubjectPublicKeyReader, out int read, out
MLDsa
mldsa);
1366
static void SubjectPublicKeyReader(ReadOnlySpan<byte> key, in ValueAlgorithmIdentifierAsn identifier, out
MLDsa
mldsa)
1383
public static
MLDsa
ImportSubjectPublicKeyInfo(byte[] source)
1420
public static
MLDsa
ImportPkcs8PrivateKey(ReadOnlySpan<byte> source)
1425
KeyFormatHelper.ReadPkcs8(KnownOids, source, MLDsaKeyReader, out int read, out
MLDsa
dsa);
1434
public static
MLDsa
ImportPkcs8PrivateKey(byte[] source)
1483
public static
MLDsa
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, ReadOnlySpan<byte> source)
1532
public static
MLDsa
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> source)
1548
public static
MLDsa
ImportEncryptedPkcs8PrivateKey(string password, byte[] source)
1592
public static
MLDsa
ImportFromPem(ReadOnlySpan<char> source)
1596
return PemKeyHelpers.ImportFactoryPem<
MLDsa
>(source, label =>
1609
public static
MLDsa
ImportFromPem(string source)
1676
public static
MLDsa
ImportFromEncryptedPem(ReadOnlySpan<char> source, ReadOnlySpan<char> password)
1680
return PemKeyHelpers.ImportEncryptedFactoryPem<
MLDsa
, char>(
1740
public static
MLDsa
ImportFromEncryptedPem(ReadOnlySpan<char> source, ReadOnlySpan<byte> passwordBytes)
1744
return PemKeyHelpers.ImportEncryptedFactoryPem<
MLDsa
, byte>(
1754
public static
MLDsa
ImportFromEncryptedPem(string source, string password)
1767
public static
MLDsa
ImportFromEncryptedPem(string source, byte[] passwordBytes)
1801
public static
MLDsa
ImportMLDsaPublicKey(MLDsaAlgorithm algorithm, ReadOnlySpan<byte> source)
1818
public static
MLDsa
ImportMLDsaPublicKey(MLDsaAlgorithm algorithm, byte[] source)
1851
public static
MLDsa
ImportMLDsaPrivateKey(MLDsaAlgorithm algorithm, ReadOnlySpan<byte> source)
1868
public static
MLDsa
ImportMLDsaPrivateKey(MLDsaAlgorithm algorithm, byte[] source)
1901
public static
MLDsa
ImportMLDsaPrivateSeed(MLDsaAlgorithm algorithm, ReadOnlySpan<byte> source)
1918
public static
MLDsa
ImportMLDsaPrivateSeed(MLDsaAlgorithm algorithm, byte[] source)
1928
/// resources used by the current instance of the <see cref="
MLDsa
"/> class.
2179
out
MLDsa
dsa)
2212
MLDsa
key = MLDsaImplementation.ImportMLDsaPrivateSeed(algorithm, dsaKey.Both.Seed);
2263
throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(
MLDsa
)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.cs (1)
18
/// Developers are encouraged to program against the <see cref="
MLDsa
" /> base class,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (1)
195
using (
MLDsa
cloned = MLDsaImplementation.ImportSeed(algorithm, seedValue))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.cs (1)
24
internal static MLDsaImplementation DuplicatePrivateKey(
MLDsa
key)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
12
MLDsa
dsa,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
33
internal static TCertificate CopyWithPrivateKey(TCertificate certificate,
MLDsa
privateKey)
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.PrivateKey.cs (3)
83
public
MLDsa
? GetMLDsaPrivateKey()
85
return GetPrivateKey<
MLDsa
>(
195
public ICertificatePal CopyWithPrivateKey(
MLDsa
privateKey) => CertificateHelpers.CopyWithPrivateKey(this, privateKey);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (3)
198
MLDsa
key)
226
MLDsa
key)
704
case
MLDsa
mldsa:
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (1)
308
MLDsa
? mldsa = publicKey.GetMLDsaPublicKey();
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
204
MLDsa
? mldsa = issuerCertificate.GetMLDsaPrivateKey();
System\Security\Cryptography\X509Certificates\ICertificatePal.cs (2)
34
MLDsa
? GetMLDsaPrivateKey();
43
ICertificatePal CopyWithPrivateKey(
MLDsa
privateKey);
System\Security\Cryptography\X509Certificates\MLDsaX509SignatureGenerator.cs (2)
12
private readonly
MLDsa
_key;
14
internal MLDsaX509SignatureGenerator(
MLDsa
key)
System\Security\Cryptography\X509Certificates\PublicKey.cs (7)
78
/// using SubjectPublicKeyInfo from an <see cref="
MLDsa
" />.
81
/// An <see cref="
MLDsa
" /> key to obtain the SubjectPublicKeyInfo from.
85
/// <see cref="
MLDsa
.ExportSubjectPublicKeyInfo" /> must return a
88
public PublicKey(
MLDsa
key) : this(key.ExportSubjectPublicKeyInfo())
369
/// Gets the <see cref="
MLDsa
"/> public key, or <see langword="null" />
382
public
MLDsa
? GetMLDsaPublicKey()
387
return EncodeSubjectPublicKeyInfo().Encode(
MLDsa
.ImportSubjectPublicKeyInfo);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (10)
883
/// Gets the <see cref="
MLDsa
"/> public key from this certificate.
894
public
MLDsa
? GetMLDsaPublicKey()
908
/// Gets the <see cref="
MLDsa
"/> private key from this certificate.
916
public
MLDsa
? GetMLDsaPrivateKey()
948
public X509Certificate2 CopyWithPrivateKey(
MLDsa
privateKey)
955
using (
MLDsa
? publicKey = GetMLDsaPublicKey())
1383
ExtractKeyFromPem<
MLDsa
>(
1386
MLDsa
.ImportFromPem,
1471
ExtractKeyFromEncryptedPem<
MLDsa
>(
1474
MLDsa
.ImportFromEncryptedPem,
System\Security\Cryptography\X509Certificates\X509SignatureGenerator.cs (1)
51
public static X509SignatureGenerator CreateForMLDsa(
MLDsa
key)
System.Security.Cryptography.Cose (4)
System\Security\Cryptography\Cose\CoseKey.cs (4)
28
private
MLDsa
? _mldsaKey;
59
public CoseKey(
MLDsa
key)
95
else if (key is
MLDsa
mldsaKey)
105
CoseKey FromKeyWithExpectedAlgorithm(MLDsaAlgorithm expected,
MLDsa
key)
System.Security.Cryptography.Pkcs (9)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (2)
87
if (typeof(T) == typeof(
MLDsa
) &&
MLDsa
.IsSupported)
Internal\Cryptography\Pal\Windows\PkcsPalWindows.cs (1)
153
if (typeof(T) == typeof(
MLDsa
))
System\Security\Cryptography\Pkcs\CmsSignature.MLDsa.cs (4)
30
protected override bool VerifyKeyType(object key) => key is
MLDsa
;
53
using (
MLDsa
? publicKey = certificate.GetMLDsaPublicKey())
93
using (GetSigningKey(key, certificate, silent, static cert => cert.GetMLDsaPublicKey(), out
MLDsa
? signingKey))
107
using (
MLDsa
certKey = certificate.GetMLDsaPublicKey()!)
System\Security\Cryptography\Pkcs\CmsSigner.cs (2)
120
CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2? certificate,
MLDsa
? privateKey)
218
Debug.Assert(privateKey is null or AsymmetricAlgorithm or
MLDsa
or SlhDsa);