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
170 references to AsymmetricAlgorithm
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Certificates\CertificateConfigLoader.cs (1)
165
private static void ImportKeyFromFile(
AsymmetricAlgorithm
asymmetricAlgorithm, string keyText, string? password)
Microsoft.Build.Tasks.Core (13)
ManifestUtil\CngLightup.cs (4)
437
where T :
AsymmetricAlgorithm
449
AsymmetricAlgorithm
publicKey = publicKeyInfo.Key;
467
where T :
AsymmetricAlgorithm
483
AsymmetricAlgorithm
privateKey = cert.PrivateKey;
ManifestUtil\mansign2.cs (7)
494
private static void ReplacePublicKeyToken(XmlDocument manifestDom,
AsymmetricAlgorithm
snKey, bool useSha256)
1092
private
AsymmetricAlgorithm
_strongNameKey;
1103
internal CmiManifestSigner2(
AsymmetricAlgorithm
strongNameKey) :
1107
internal CmiManifestSigner2(
AsymmetricAlgorithm
strongNameKey, X509Certificate2 certificate, bool useSha256)
1137
internal
AsymmetricAlgorithm
StrongNameKey
1233
private
AsymmetricAlgorithm
_snKey = null;
1269
internal
AsymmetricAlgorithm
PublicKey
ManifestUtil\RSAPKCS1SHA256SignatureDescription.cs (2)
27
public override AsymmetricSignatureDeformatter CreateDeformatter(
AsymmetricAlgorithm
key)
39
public override AsymmetricSignatureFormatter CreateFormatter(
AsymmetricAlgorithm
key)
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)
493
AsymmetricAlgorithm
testKey = x509Certificate2.PrivateKey;
System.Security.Cryptography (68)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (5)
93
public Pkcs12KeyBag AddKeyUnencrypted(
AsymmetricAlgorithm
key)
127
AsymmetricAlgorithm
key,
139
AsymmetricAlgorithm
key,
158
AsymmetricAlgorithm
key,
170
AsymmetricAlgorithm
key,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
62
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
CryptoConfigForwarder.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 (2)
23
private readonly
AsymmetricAlgorithm
? _key;
696
AsymmetricAlgorithm
? key = null;
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
176
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)
31
public
AsymmetricAlgorithm
DecodePublicKey(Oid oid, byte[] encodedKeyValue, byte[] encodedParameters, ICertificatePal? certificatePal)
System\Security\Cryptography\X509Certificates\PublicKey.cs (6)
15
private
AsymmetricAlgorithm
? _key;
40
/// using SubjectPublicKeyInfo from an <see cref="
AsymmetricAlgorithm
" />.
47
/// <see cref="
AsymmetricAlgorithm
.ExportSubjectPublicKeyInfo" /> must return a
51
/// <see cref="
AsymmetricAlgorithm
.ExportSubjectPublicKeyInfo" /> has not been overridden
54
public PublicKey(
AsymmetricAlgorithm
key)
76
public
AsymmetricAlgorithm
Key
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
24
private volatile
AsymmetricAlgorithm
? _lazyPrivateKey;
269
public
AsymmetricAlgorithm
? PrivateKey
1433
Func<TAlg, X509Certificate2> import) where TAlg :
AsymmetricAlgorithm
1467
Func<TAlg, X509Certificate2> import) where TAlg :
AsymmetricAlgorithm
System\Security\Cryptography\X509Certificates\X509CertificateLoader.OpenSsl.cs (2)
62
private static partial
AsymmetricAlgorithm
? CreateKey(string algorithm)
73
internal static SafeEvpPKeyHandle GetPrivateKey(
AsymmetricAlgorithm
key)
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (9)
17
private static partial
AsymmetricAlgorithm
? CreateKey(string algorithm);
199
internal
AsymmetricAlgorithm
? Key;
212
private
AsymmetricAlgorithm
?[] _keys;
250
_keys = ArrayPool<
AsymmetricAlgorithm
?>.Shared.Rent(bagState.KeyCount);
254
AsymmetricAlgorithm
? key = null;
379
AsymmetricAlgorithm
? key = CreateKey(cert.KeyAlgorithm);
505
AsymmetricAlgorithm
key,
551
ArrayPool<
AsymmetricAlgorithm
?>.Shared.Return(_keys, clearArray: true);
565
private static void ImportPrivateKey(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> pkcs8)
System.Security.Cryptography.Cose (34)
System\Security\Cryptography\Cose\CoseHelpers.cs (2)
109
AsymmetricAlgorithm
key = signer.Key;
298
internal static KeyType GetKeyType(
AsymmetricAlgorithm
key)
System\Security\Cryptography\Cose\CoseSign1Message.cs (15)
392
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, byte[], byte[])"/>
394
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, byte[]? associatedData = null)
434
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, ReadOnlySpan{byte}, ReadOnlySpan{byte})"/>
436
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> associatedData)
478
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, byte[])"/>
480
public bool VerifyDetached(
AsymmetricAlgorithm
key, byte[] detachedContent, byte[]? associatedData = null)
526
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, ReadOnlySpan{byte})"/>
528
public bool VerifyDetached(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> detachedContent, ReadOnlySpan<byte> associatedData = default)
578
/// <seealso cref="VerifyDetachedAsync(
AsymmetricAlgorithm
, Stream, ReadOnlyMemory{byte}, CancellationToken)"/>
580
public bool VerifyDetached(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlySpan<byte> associatedData = default)
609
private bool VerifyCore(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> contentBytes, Stream? contentStream, ReadOnlySpan<byte> associatedData, KeyType keyType)
679
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, Stream, ReadOnlySpan{byte})"/>
681
public Task<bool> VerifyDetachedAsync(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
710
private async Task<bool> VerifyAsyncCore(
AsymmetricAlgorithm
key, Stream content, ReadOnlyMemory<byte> associatedData, KeyType keyType, CancellationToken cancellationToken)
741
private bool VerifyHash(
AsymmetricAlgorithm
key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding)
System\Security\Cryptography\Cose\CoseSignature.cs (15)
98
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, ReadOnlySpan{byte}, ReadOnlySpan{byte})"/>
100
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> associatedData)
141
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, byte[], byte[])"/>
143
public bool VerifyEmbedded(
AsymmetricAlgorithm
key, byte[]? associatedData = null)
185
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, byte[])"/>
187
public bool VerifyDetached(
AsymmetricAlgorithm
key, byte[] detachedContent, byte[]? associatedData = null)
234
/// <seealso cref="VerifyEmbedded(
AsymmetricAlgorithm
, ReadOnlySpan{byte})"/>
236
public bool VerifyDetached(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> detachedContent, ReadOnlySpan<byte> associatedData = default)
286
/// <seealso cref="VerifyDetachedAsync(
AsymmetricAlgorithm
, Stream, ReadOnlyMemory{byte}, CancellationToken)"/>
288
public bool VerifyDetached(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlySpan<byte> associatedData = default)
354
/// <seealso cref="VerifyDetached(
AsymmetricAlgorithm
, Stream, ReadOnlySpan{byte})"/>
356
public Task<bool> VerifyDetachedAsync(
AsymmetricAlgorithm
key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default)
385
private async Task<bool> VerifyAsyncCore(
AsymmetricAlgorithm
key, Stream content, ReadOnlyMemory<byte> associatedData, KeyType keyType, CancellationToken cancellationToken)
419
private bool VerifyCore(
AsymmetricAlgorithm
key, ReadOnlySpan<byte> contentBytes, Stream? contentStream, ReadOnlySpan<byte> associatedData, KeyType keyType)
451
private bool VerifyHash(
AsymmetricAlgorithm
key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding)
System\Security\Cryptography\Cose\CoseSigner.cs (2)
22
public
AsymmetricAlgorithm
Key { get; }
65
public CoseSigner(
AsymmetricAlgorithm
key, HashAlgorithmName hashAlgorithm, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null)
System.Security.Cryptography.Pkcs (28)
Internal\Cryptography\DecryptorPal.cs (1)
36
AsymmetricAlgorithm
? privateKey,
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (1)
77
private static T? GetPrivateKey<T>(X509Certificate2 certificate) where T :
AsymmetricAlgorithm
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (1)
35
AsymmetricAlgorithm
? privateKey,
Internal\Cryptography\PkcsPal.cs (2)
79
public abstract T? GetPrivateKeyForSigning<T>(X509Certificate2 certificate, bool silent) where T :
AsymmetricAlgorithm
;
84
public abstract T? GetPrivateKeyForDecryption<T>(X509Certificate2 certificate, bool silent) where T :
AsymmetricAlgorithm
;
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (5)
93
public Pkcs12KeyBag AddKeyUnencrypted(
AsymmetricAlgorithm
key)
127
AsymmetricAlgorithm
key,
139
AsymmetricAlgorithm
key,
158
AsymmetricAlgorithm
key,
170
AsymmetricAlgorithm
key,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
62
public static Pkcs8PrivateKeyInfo Create(
AsymmetricAlgorithm
privateKey)
System\Security\Cryptography\Pkcs\CmsSignature.cs (4)
30
protected abstract bool VerifyKeyType(
AsymmetricAlgorithm
key);
53
AsymmetricAlgorithm
? key,
61
AsymmetricAlgorithm
? key,
122
AsymmetricAlgorithm
? key,
System\Security\Cryptography\Pkcs\CmsSignature.DSA.cs (2)
40
protected override bool VerifyKeyType(
AsymmetricAlgorithm
key)
111
AsymmetricAlgorithm
? key,
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (2)
41
protected override bool VerifyKeyType(
AsymmetricAlgorithm
key)
115
AsymmetricAlgorithm
? certKey,
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (4)
42
protected override bool VerifyKeyType(
AsymmetricAlgorithm
key)
107
AsymmetricAlgorithm
? key,
207
AsymmetricAlgorithm
? key,
327
AsymmetricAlgorithm
? key,
System\Security\Cryptography\Pkcs\CmsSigner.cs (4)
26
public
AsymmetricAlgorithm
? PrivateKey { get; set; }
101
CmsSigner(SubjectIdentifierType signerIdentifierType, X509Certificate2? certificate,
AsymmetricAlgorithm
? privateKey)
133
: this(signerIdentifierType, certificate, (
AsymmetricAlgorithm
?)privateKey, signaturePadding)
140
AsymmetricAlgorithm
? privateKey,
System\Security\Cryptography\Pkcs\EnvelopedCms.cs (1)
232
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;
175
public
AsymmetricAlgorithm
? SigningKey
265
public bool CheckSignatureReturningKey(out
AsymmetricAlgorithm
? signingKey)
271
AsymmetricAlgorithm
? key;
292
public bool CheckSignature(
AsymmetricAlgorithm
key)
377
using (
AsymmetricAlgorithm
? publicKey = Utils.GetAnyPublicKey(certificate))
397
AsymmetricAlgorithm
? key = SigningKey;
482
protected virtual
AsymmetricAlgorithm
? GetPublicKey()
489
AsymmetricAlgorithm
? key = GetNextCertificatePublicKey();
512
AsymmetricAlgorithm
? key = GetNextCertificatePublicKey();
540
private
AsymmetricAlgorithm
? GetNextCertificatePublicKey()
1020
private bool CheckSignedInfo(
AsymmetricAlgorithm
key)
1116
private static bool IsKeyTheCorrectAlgorithm(
AsymmetricAlgorithm
key, Type expectedType)
1136
while (expectedType != null && expectedType.BaseType != typeof(
AsymmetricAlgorithm
))
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (1)
857
AsymmetricAlgorithm
key,
System\Security\Cryptography\Xml\Utils.cs (3)
760
internal static
AsymmetricAlgorithm
? GetAnyPublicKey(X509Certificate2 certificate)
762
AsymmetricAlgorithm
? algorithm = (
AsymmetricAlgorithm
?)certificate.GetRSAPublicKey() ?? certificate.GetECDsaPublicKey();