SecureBlackbox Lite 2020 Kotlin 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
Int

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
ByteArray?

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

DSSP
ByteArray?

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

DSSQ
ByteArray?

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

DSSX
ByteArray?

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
ByteArray?

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

ECCD
ByteArray?

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
ByteArray?

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
ByteArray?

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
ByteArray?

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

EdPublic
ByteArray?

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
Int

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

KDFSalt
ByteArray?

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
ByteArray?

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

RSAIQMP
ByteArray?

Returns the iqmp parameter of the RSA key.

RSAModulus
ByteArray?

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

RSAP
ByteArray?

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

RSAPrivateExponent
ByteArray?

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

RSAQ
ByteArray?

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 constructor(bytes: ByteArray?, startIndex: Int, count: Int, password: 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 constructor(bytes: ByteArray?, startIndex: Int, count: Int)

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

public constructor(stream: InputStream?, password: String?)

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

public constructor(stream: InputStream?)

Loads public key from the stream.

public constructor(path: String?, password: String?)

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

public constructor(path: String?)

Loads public key from the file specified by Path .

public constructor()

Creates a new key.

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