7 types derived from AsymmetricAlgorithm
System.Security.Cryptography (7)
System\Security\Cryptography\DSA.Create.OpenSsl.cs (1)
6
public partial class DSA :
AsymmetricAlgorithm
System\Security\Cryptography\DSA.cs (1)
14
public abstract partial class DSA :
AsymmetricAlgorithm
System\Security\Cryptography\DSA.Xml.cs (1)
9
public abstract partial class DSA :
AsymmetricAlgorithm
System\Security\Cryptography\ECAlgorithm.cs (1)
14
public abstract class ECAlgorithm :
AsymmetricAlgorithm
System\Security\Cryptography\RSA.Create.OpenSsl.cs (1)
6
public partial class RSA :
AsymmetricAlgorithm
System\Security\Cryptography\RSA.cs (1)
16
public abstract partial class RSA :
AsymmetricAlgorithm
System\Security\Cryptography\RSA.Xml.cs (1)
8
public abstract partial class RSA :
AsymmetricAlgorithm
140 references to AsymmetricAlgorithm
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Certificates\CertificateConfigLoader.cs (1)
273
private static void ImportKeyFromFile(
AsymmetricAlgorithm
asymmetricAlgorithm, string keyText, string? password)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
KestrelConfigurationLoaderTests.cs (1)
943
private static string ExportKeyToPem(
AsymmetricAlgorithm
key, string password)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
858
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.
AsymmetricAlgorithm
))]
netstandard (1)
netstandard.cs (1)
1848
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.
AsymmetricAlgorithm
))]
PresentationUI (1)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
490
AsymmetricAlgorithm
testKey = x509Certificate2.PrivateKey;
System.Security.Cryptography (59)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (5)
87
public Pkcs12KeyBag AddKeyUnencrypted(
AsymmetricAlgorithm
key)
115
AsymmetricAlgorithm
key,
127
AsymmetricAlgorithm
key,
143
AsymmetricAlgorithm
key,
155
AsymmetricAlgorithm
key,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
59
public static Pkcs8PrivateKeyInfo Create(
AsymmetricAlgorithm
privateKey)
System\Security\Cryptography\AsymmetricAlgorithm.cs (7)
17
public static
AsymmetricAlgorithm
Create() =>
22
public static
AsymmetricAlgorithm
? Create(string algName) =>
23
CryptoConfig.CreateFromName<
AsymmetricAlgorithm
>(algName);
580
static bool Export(
AsymmetricAlgorithm
alg, Span<byte> destination, out int bytesWritten)
629
static bool Export(
AsymmetricAlgorithm
alg, Span<byte> destination, out int bytesWritten)
691
AsymmetricAlgorithm
alg,
753
AsymmetricAlgorithm
alg,
System\Security\Cryptography\AsymmetricKeyExchangeDeformatter.cs (1)
10
public abstract void SetKey(
AsymmetricAlgorithm
key);
System\Security\Cryptography\AsymmetricKeyExchangeFormatter.cs (1)
12
public abstract void SetKey(
AsymmetricAlgorithm
key);
System\Security\Cryptography\AsymmetricSignatureDeformatter.cs (1)
12
public abstract void SetKey(
AsymmetricAlgorithm
key);
System\Security\Cryptography\AsymmetricSignatureFormatter.cs (1)
12
public abstract void SetKey(
AsymmetricAlgorithm
key);
System\Security\Cryptography\DSASignatureDeformatter.cs (2)
12
public DSASignatureDeformatter(
AsymmetricAlgorithm
key) : this()
19
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\DSASignatureFormatter.cs (2)
12
public DSASignatureFormatter(
AsymmetricAlgorithm
key) : this()
19
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\RSA.cs (3)
74
/// <see cref="
AsymmetricAlgorithm
.KeySize" /> returned a value that is not a possible RSA key size.
147
/// The length of data is too long for the combination of <see cref="
AsymmetricAlgorithm
.KeySize" /> and the selected padding.
197
/// The length of data is too long for the combination of <see cref="
AsymmetricAlgorithm
.KeySize" /> and the selected padding.
System\Security\Cryptography\RSAOAEPKeyExchangeDeformatter.cs (2)
11
public RSAOAEPKeyExchangeDeformatter(
AsymmetricAlgorithm
key)
32
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\RSAOAEPKeyExchangeFormatter.cs (2)
13
public RSAOAEPKeyExchangeFormatter(
AsymmetricAlgorithm
key)
55
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\RSAPKCS1KeyExchangeDeformatter.cs (2)
15
public RSAPKCS1KeyExchangeDeformatter(
AsymmetricAlgorithm
key)
42
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\RSAPKCS1KeyExchangeFormatter.cs (2)
15
public RSAPKCS1KeyExchangeFormatter(
AsymmetricAlgorithm
key)
36
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\RSAPKCS1SignatureDeformatter.cs (2)
16
public RSAPKCS1SignatureDeformatter(
AsymmetricAlgorithm
key)
23
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\RSAPKCS1SignatureFormatter.cs (2)
17
public RSAPKCS1SignatureFormatter(
AsymmetricAlgorithm
key)
24
public override void SetKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\SignatureDescription.cs (2)
30
public virtual AsymmetricSignatureDeformatter CreateDeformatter(
AsymmetricAlgorithm
key)
38
public virtual AsymmetricSignatureFormatter CreateFormatter(
AsymmetricAlgorithm
key)
System\Security\Cryptography\X509Certificates\CertificateExtensionsCommon.cs (3)
13
where T :
AsymmetricAlgorithm
49
where T :
AsymmetricAlgorithm
76
private static string GetExpectedOidValue<T>() where T :
AsymmetricAlgorithm
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
891
AsymmetricAlgorithm
? key = null;
System\Security\Cryptography\X509Certificates\IX509Pal.cs (1)
8
AsymmetricAlgorithm
DecodePublicKey(Oid oid, byte[] encodedKeyValue, byte[]? encodedParameters, ICertificatePal? certificatePal);
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
35
AsymmetricAlgorithm
? alg = evpAlgId switch
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (1)
32
public
AsymmetricAlgorithm
DecodePublicKey(Oid oid, byte[] encodedKeyValue, byte[]? encodedParameters, ICertificatePal? certificatePal)
System\Security\Cryptography\X509Certificates\PublicKey.cs (6)
17
private
AsymmetricAlgorithm
? _key;
42
/// using SubjectPublicKeyInfo from an <see cref="
AsymmetricAlgorithm
" />.
49
/// <see cref="
AsymmetricAlgorithm
.ExportSubjectPublicKeyInfo" /> must return a
53
/// <see cref="
AsymmetricAlgorithm
.ExportSubjectPublicKeyInfo" /> has not been overridden
56
public PublicKey(
AsymmetricAlgorithm
key) : this(key.ExportSubjectPublicKeyInfo())
149
public
AsymmetricAlgorithm
Key
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
25
private volatile
AsymmetricAlgorithm
? _lazyPrivateKey;
270
public
AsymmetricAlgorithm
? PrivateKey
1901
private static TAlg CreateAndImport<TAlg>(ReadOnlySpan<char> keyPem, Func<TAlg> factory) where TAlg :
AsymmetricAlgorithm
1911
Func<TAlg> factory) where TAlg :
AsymmetricAlgorithm
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (4)
566
private static void ImportPrivateKey(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> pkcs8)
702
private readonly
AsymmetricAlgorithm
_key;
704
internal AsymmetricAlgorithmPkcs12PrivateKey(ReadOnlySpan<byte> pkcs8, Func<
AsymmetricAlgorithm
> factory)
734
internal override
AsymmetricAlgorithm
Key => _key;
System.Security.Cryptography.Cose (27)
System\Security\Cryptography\Cose\CoseKey.cs (1)
22
internal
AsymmetricAlgorithm
? AsymmetricAlgorithm { get; }
System\Security\Cryptography\Cose\CoseSign1Message.cs (12)
383
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, byte[], byte[])"/>
385
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, byte[]? associatedData = null)
426
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, ReadOnlySpan{byte}, ReadOnlySpan{byte})"/>
428
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> associatedData)
510
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, byte[])"/>
512
public bool VerifyDetached(
AsymmetricAlgorithm
key, byte[] detachedContent, byte[]? associatedData = null)
592
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, ReadOnlySpan{byte})"/>
594
public bool VerifyDetached(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> detachedContent, ReadOnlySpan<byte> associatedData = default)
684
/// <seealso cref="VerifyDetachedAsync(
AsymmetricAlgorithm
, Stream, ReadOnlyMemory{byte}, CancellationToken)"/>
686
public bool VerifyDetached(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlySpan<byte> associatedData = default)
851
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, Stream, ReadOnlySpan{byte})"/>
853
public Task<bool> VerifyDetachedAsync(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
System\Security\Cryptography\Cose\CoseSignature.cs (12)
98
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, ReadOnlySpan{byte}, ReadOnlySpan{byte})"/>
100
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> associatedData)
181
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, byte[], byte[])"/>
183
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, byte[]? associatedData = null)
225
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, byte[])"/>
227
public bool VerifyDetached(
AsymmetricAlgorithm
key, byte[] detachedContent, byte[]? associatedData = null)
308
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, ReadOnlySpan{byte})"/>
310
public bool VerifyDetached(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> detachedContent, ReadOnlySpan<byte> associatedData = default)
401
/// <seealso cref="VerifyDetachedAsync(
AsymmetricAlgorithm
, Stream, ReadOnlyMemory{byte}, CancellationToken)"/>
403
public bool VerifyDetached(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlySpan<byte> associatedData = default)
525
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, Stream, ReadOnlySpan{byte})"/>
527
public Task<bool> VerifyDetachedAsync(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
System\Security\Cryptography\Cose\CoseSigner.cs (2)
22
public
AsymmetricAlgorithm
? Key => CoseKey.AsymmetricAlgorithm;
71
public CoseSigner(
AsymmetricAlgorithm
key, HashAlgorithmName hashAlgorithm, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null)
System.Security.Cryptography.Pkcs (14)
Internal\Cryptography\DecryptorPal.cs (1)
36
AsymmetricAlgorithm
? privateKey,
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (1)
35
AsymmetricAlgorithm
? privateKey,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (5)
87
public Pkcs12KeyBag AddKeyUnencrypted(
AsymmetricAlgorithm
key)
115
AsymmetricAlgorithm
key,
127
AsymmetricAlgorithm
key,
143
AsymmetricAlgorithm
key,
155
AsymmetricAlgorithm
key,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
59
public static Pkcs8PrivateKeyInfo Create(
AsymmetricAlgorithm
privateKey)
System\Security\Cryptography\Pkcs\CmsSigner.cs (5)
28
public
AsymmetricAlgorithm
? PrivateKey
33
get => _privateKey as
AsymmetricAlgorithm
;
109
CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2? certificate,
AsymmetricAlgorithm
? privateKey)
175
: this(signerIdentifierType, certificate, (
AsymmetricAlgorithm
?)privateKey, signaturePadding)
218
Debug.Assert(privateKey is null or
AsymmetricAlgorithm
or MLDsa or SlhDsa);
System\Security\Cryptography\Pkcs\EnvelopedCms.cs (1)
205
void Decrypt(RecipientInfo recipientInfo,
AsymmetricAlgorithm
? privateKey)
System.Security.Cryptography.Primitives (1)
System.Security.Cryptography.Primitives.cs (1)
8
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.
AsymmetricAlgorithm
))]
System.Security.Cryptography.Xml (22)
System\Security\Cryptography\Xml\DSASignatureDescription.cs (2)
23
public sealed override AsymmetricSignatureDeformatter CreateDeformatter(
AsymmetricAlgorithm
key)
34
public sealed override AsymmetricSignatureFormatter CreateFormatter(
AsymmetricAlgorithm
key)
System\Security\Cryptography\Xml\RSAPKCS1SignatureDescription.cs (2)
21
public sealed override AsymmetricSignatureDeformatter CreateDeformatter(
AsymmetricAlgorithm
key)
32
public sealed override AsymmetricSignatureFormatter CreateFormatter(
AsymmetricAlgorithm
key)
System\Security\Cryptography\Xml\SignedXml.cs (14)
20
private
AsymmetricAlgorithm
? _signingKey;
166
public
AsymmetricAlgorithm
? SigningKey
253
public bool CheckSignatureReturningKey(out
AsymmetricAlgorithm
? signingKey)
259
AsymmetricAlgorithm
? key;
280
public bool CheckSignature(
AsymmetricAlgorithm
key)
368
using (
AsymmetricAlgorithm
? publicKey = Utils.GetAnyPublicKey(certificate))
388
AsymmetricAlgorithm
? key = SigningKey;
470
protected virtual
AsymmetricAlgorithm
? GetPublicKey()
477
AsymmetricAlgorithm
? key = GetNextCertificatePublicKey();
500
AsymmetricAlgorithm
? key = GetNextCertificatePublicKey();
528
private
AsymmetricAlgorithm
? GetNextCertificatePublicKey()
1008
private bool CheckSignedInfo(
AsymmetricAlgorithm
key)
1098
private static bool IsKeyTheCorrectAlgorithm(
AsymmetricAlgorithm
key, Type expectedType)
1118
while (expectedType != null && expectedType.BaseType != typeof(
AsymmetricAlgorithm
))
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (1)
857
AsymmetricAlgorithm
key,
System\Security\Cryptography\Xml\Utils.cs (3)
748
internal static
AsymmetricAlgorithm
? GetAnyPublicKey(X509Certificate2 certificate)
750
AsymmetricAlgorithm
? algorithm = (
AsymmetricAlgorithm
?)certificate.GetRSAPublicKey() ?? certificate.GetECDsaPublicKey();
System.ServiceModel.Primitives (12)
System\IdentityModel\Tokens\AsymmetricSecurityKey.cs (1)
11
public abstract
AsymmetricAlgorithm
GetAsymmetricAlgorithm(string algorithm, bool privateKey);
System\IdentityModel\Tokens\X509AsymmetricSecurityKey.cs (8)
16
private
AsymmetricAlgorithm
_privateKey;
18
private
AsymmetricAlgorithm
_publicKey;
31
private
AsymmetricAlgorithm
PrivateKey
81
private
AsymmetricAlgorithm
PublicKey
119
public override
AsymmetricAlgorithm
GetAsymmetricAlgorithm(string algorithm, bool privateKey)
311
AsymmetricAlgorithm
privateKey = PrivateKey;
419
AsymmetricAlgorithm
asymmetricAlgorithm = algorithmObject as
AsymmetricAlgorithm
;
System\ServiceModel\Security\WSSecurityOneDotZeroSendSecurityHeader.cs (3)
510
AsymmetricAlgorithm
asymmetricAlgorithm = null;
540
private void GetSigningAlgorithm(SecurityKey signatureKey, string algorithmName, out KeyedHashAlgorithm symmetricAlgorithm, out
AsymmetricAlgorithm
asymmetricAlgorithm)
604
AsymmetricAlgorithm
asymmetricAlgorithm = null;