SecureBlackbox 2020 .NET Edition

Questions / Feedback?

SSHKey Type

SSHKey is used to store information about single compound public-key algorithm (such as RSA or DSA) key.

Remarks

SSH keys are used to secure the SSH protocol flow. They support different algorithms and key lengths, a very typical example being RSA-2048 bits.

Fields

Algorithm
String

Specifies the key algorithm.

Bits
Integer

The number of bits in the key: the more the better, 2048 or 4096 are typical values.

Comment
String

The comment for the public key.

Curve
String

Specifies the elliptical curve when EC cryptography is used.

DSSG
Byte()

The G (Generator) parameter of the DSS signature key. The string should contain the binary data of G.

DSSP
Byte()

The P (Prime) parameter of the DSS signature key. The string should contain the binary data of P.

DSSQ
Byte()

The Q (Prime Factor) parameter of the DSS signature key. The string should contain the binary data of Q.

DSSX
Byte()

The X (Private key) parameter of the DSS signature key. The string should contain the binary data of X.

This parameter may be empty if there's no need to sign data with this key (e.g. if the key is a server public key needed only to authenticate the server).

DSSY
Byte()

The Y (Public key) parameter of the DSS signature key. The string should contain the binary data of Y.

ECCD
Byte()

The value of the secret key (the order of the public key, D) if elliptic curve (EC) cryptography is used. The string should contain the binary data of D.

ECCQX
Byte()

The value of the X coordinate of the public key if elliptic curve (EC) cryptography is used. The string should contain the binary data of X.

ECCQY
Byte()

The value of the Y coordinate of the public key if elliptic curve (EC) cryptography is used. The string should contain the binary data of Y.

EdPrivate
Byte()

The value of the private key if EdDSA (Edwards-curve Digital Signature Algorithm) algorithm is used.

EdPublic
Byte()

The value of the public key if EdDSA (Edwards-curve Digital Signature Algorithm) algorithm is used.

FingerprintMD5
String

Contains the MD5 fingerprint (hash) of the key.

FingerprintSHA1
String

Contains the SHA-1 fingerprint (hash) of the key.

FingerprintSHA256
String

Contains the SHA-256 fingerprint (hash) of the key.

IsExtractable
Boolean

Whether the key is extractable (e.g., from a security token), or not.

IsPrivate
Boolean

Whether this key is a private key or not.

IsPublic
Boolean

Whether this key is a public key or not.

KDFRounds
Integer

Returns the number of iterations of the Key Derivation Function (KDF) used to generate this key.

KDFSalt
Byte()

The salt value used by the Key Derivation Function (KDF) to generate this key.

KeyFormat
SSHKeyFormats

Specifies the format in which the key is stored.

ckfOpenSSH0
ckfOpenSSH21
ckfIETF2
ckfPuTTY3
ckfX5094
ckfBinary5
ckfSSH16
ckfPGP7
ckfPKCS88

KeyProtectionAlgorithm
String

Specifies the key protection algorithm.

RSAExponent
Byte()

Returns the e parameter (public exponent) of the RSA key.

RSAIQMP
Byte()

Returns the iqmp parameter of the RSA key.

RSAModulus
Byte()

Returns the m parameter (public modulus) of the RSA key.

RSAP
Byte()

Returns the p parameter (first factor of the common modulus n) of the RSA key.

RSAPrivateExponent
Byte()

Returns the d parameter (private exponent) of the RSA key.

RSAQ
Byte()

Returns the q parameter (second factor of the common modulus n) of the RSA key.

Subject
String

Specifies the public key owner (subject). This property is used only for IETF-keys.

Constructors

public SSHKey(byte[] bytes, int startIndex, int count, string password);
Public SSHKey(ByVal Bytes As Byte(), ByVal StartIndex As Integer, ByVal Count As Integer, ByVal Password As String)

Loads private key from the Bytes buffer. Parameters StartIndex and Count specify the starting index of the key data and its length, correspondingly. Provide a Password to decrypt the key.

public SSHKey(byte[] bytes, int startIndex, int count);
Public SSHKey(ByVal Bytes As Byte(), ByVal StartIndex As Integer, ByVal Count As Integer)

Loads public key from the Bytes buffer. Parameters StartIndex and Count specify the starting index of the key data and its length, correspondingly.

public SSHKey(System.IO.Stream stream, string password);
Public SSHKey(ByVal Stream As System.IO.Stream, ByVal Password As String)

Loads private key from the stream. Provide a Password to decrypt the key.

public SSHKey(System.IO.Stream stream);
Public SSHKey(ByVal Stream As System.IO.Stream)

Loads public key from the stream.

public SSHKey(string path, string password);
Public SSHKey(ByVal Path As String, ByVal Password As String)

Loads private key from the file. Provide a Path to the file and Password to decrypt the key.

public SSHKey(string path);
Public SSHKey(ByVal Path As String)

Loads public key from the file specified by Path .

public SSHKey();
Public SSHKey()

Creates a new key.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 .NET Edition - Version 20.0 [Build 8165]