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.
| | ckfOpenSSH | 0 | | ckfOpenSSH2 | 1 | | ckfIETF | 2 | | ckfPuTTY | 3 | | ckfX509 | 4 | | ckfBinary | 5 | | ckfSSH1 | 6 | | ckfPGP | 7 | | ckfPKCS8 | 8 | |
|
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
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.
Loads public key from the Bytes buffer. Parameters StartIndex and Count specify the starting index of the key data and its length, correspondingly.
Loads private key from the stream. Provide a Password to decrypt the key.
Loads public key from the stream.
Loads private key from the file. Provide a Path to the file and Password to decrypt the key.
Loads public key from the file specified by Path .
Creates a new key.