2using System.Collections.Generic;
4using System.Security.Cryptography;
13 private readonly RSA rsa;
43 RSAParameters Parameters = this.rsa.ExportParameters(
false);
46 Output.
INTEGER(Parameters.Modulus,
false);
47 Output.
INTEGER(Parameters.Exponent,
false);
57 RSAParameters Parameters = this.rsa.ExportParameters(
true);
61 Output.
INTEGER(Parameters.Modulus,
false);
62 Output.
INTEGER(Parameters.Exponent,
false);
63 Output.
INTEGER(Parameters.D,
false);
64 Output.
INTEGER(Parameters.P,
false);
65 Output.
INTEGER(Parameters.Q,
false);
66 Output.
INTEGER(Parameters.DP,
false);
67 Output.
INTEGER(Parameters.DQ,
false);
68 Output.
INTEGER(Parameters.InverseQ,
false);
77 public override byte[]
Sign(
byte[] Data)
79 return this.rsa.SignData(Data, this.
HashAlgorithmName, RSASignaturePadding.Pkcs1);
Encodes data using the Distinguished Encoding Rules (DER), as defined in X.690
void EndSEQUENCE()
Ends the current SEQUENCE.
void INTEGER(long Value)
Encodes an INTEGER value.
void StartSEQUENCE()
Starts a SEQUENCE.
Base class for RSA algorithms
override void ExportPrivateKey(DerEncoder Output)
Exports the private key using DER.
Rsa(RSA RSA)
Base class for RSA algorithms
abstract HashAlgorithmName HashAlgorithmName
Name of hash algorithm to use for signatues.
override void ExportPublicKey(DerEncoder Output)
Exports the public key using DER.
override byte[] Sign(byte[] Data)
Signs data.
override string PkiAlgorithmOID
Object Identity for the PKI algorithm.
Abstract base class for signature algorithms