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