Table of Contents

Class RsaKey

Namespace
Renci.SshNet.Security
Assembly
Renci.SshNet.dll

Contains the RSA private and public key.

public class RsaKey : Key, IDisposable

Inheritance

Key

Implements

Inherited Members

Constructors

RsaKey(SshKeyData)

Initializes a new instance of the Renci.SshNet.Security.RsaKey class.

public RsaKey(SshKeyData publicKeyData)

Parameters

publicKeyData SshKeyData

The encoded public key data.

RsaKey(byte[])

Initializes a new instance of the Renci.SshNet.Security.RsaKey class.

public RsaKey(byte[] privateKeyData)

Parameters

privateKeyData byte[]

DER encoded private key data.

RsaKey(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger)

Initializes a new instance of the Renci.SshNet.Security.RsaKey class.

public RsaKey(BigInteger modulus, BigInteger exponent, BigInteger d, BigInteger p, BigInteger q, BigInteger inverseQ)

Parameters

modulus BigInteger

The modulus.

exponent BigInteger

The exponent.

d BigInteger

The d.

p BigInteger

The p.

q BigInteger

The q.

inverseQ BigInteger

The inverse Q.

Properties

D

Gets the D.

public BigInteger D { get; }

Property Value

BigInteger

DP

Gets the DP.

public BigInteger DP { get; }

Property Value

BigInteger

DQ

Gets the DQ.

public BigInteger DQ { get; }

Property Value

BigInteger

DigitalSignature

Gets the digital signature implementation for this key.

protected override DigitalSignature DigitalSignature { get; }

Property Value

DigitalSignature

Exponent

Gets the exponent.

public BigInteger Exponent { get; }

Property Value

BigInteger

InverseQ

Gets the inverse Q.

public BigInteger InverseQ { get; }

Property Value

BigInteger

KeyLength

Gets the length of the key in bits.

public override int KeyLength { get; }

Property Value

int

Modulus

Gets the modulus.

public BigInteger Modulus { get; }

Property Value

BigInteger

P

Gets the P.

public BigInteger P { get; }

Property Value

BigInteger

Public

Gets the RSA public key.

public override BigInteger[] Public { get; }

Property Value

BigInteger[]

Q

Gets the Q.

public BigInteger Q { get; }

Property Value

BigInteger

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

ToString()

Gets the name of the key.

public override string ToString()

Returns

string

The name of the key.