@blockchaincommons/components - v1.0.0-beta.4
    Preparing search index...

    Class SSHPrivateKey

    An OpenSSH private key (-----BEGIN OPENSSH PRIVATE KEY-----), unencrypted, for the algorithms in SshAlgorithm.

    Index

    The parsed key material by algorithm.

    comment: string

    The comment stored in the private-key section (may be empty).

    checkint: number

    32-bit checkint preserved on round-trip — ssh-key retains the parsed value, so to round-trip byte-identically we do too.

    • Construct an SSHPrivateKey from already-decoded parts. Used by PrivateKeyBase.sshSigningPrivateKey after generating key material from an HKDF-seeded RNG. The checkint should be derived deterministically from the private bytes (mirrors ssh-key 0.6.7's KeypairData::checkint).

      Parameters

      Returns SSHPrivateKey

    • The binary openssh-key-v1 blob, byte for byte as OpenSSH writes it.

      Returns Uint8Array

    • SHA-256 of the OpenSSH text form (the reference's Reference image).

      Returns Uint8Array

    • The first four bytes of digest() in hex, the reference's ref_hex_short.

      Returns string

    • SSHPrivateKey(<short reference>), the reference's Display.

      Returns string

    • Signs message in namespace with hashAlgorithm, producing an sshsig signature.

      RSA keys cannot sign: ssh-key 0.6.7 rebuilds the rsa private key from (p, p) instead of (p, q), so the reference's SigningPrivateKey::sign fails with cryptographic error for every RSA key, and so does this method.

      Parameters

      Returns SSHSignature