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

    Class SSHSignature

    An OpenSSH sshsig signature (-----BEGIN SSH SIGNATURE-----), version 1.

    Index
    publicKey: SSHPublicKey

    The signing key, embedded in the signature.

    namespace: string

    The application namespace the signature was made in.

    reserved: Uint8Array

    The reserved field (empty in every signature OpenSSH writes).

    hashAlgorithm: SshHashAlgorithm

    The hash the message was digested with.

    signatureAlgorithm: string

    The algorithm name inside the signature blob: the key's wire name for Ed25519, DSA and ECDSA keys, and rsa-sha2-256 / rsa-sha2-512 (the hash the RSA signature was made with) for RSA keys.

    signatureBytes: Uint8Array

    Raw signature bytes specific to the algorithm: ed25519 → 64-byte concatenation r || s ecdsa → fixed-width r || s (64 / 96 / 132 bytes; the SSH mpint sign bytes are stripped on parse and re-added on serialize) dsa → 40-byte r || s rsa → the RSASSA-PKCS1-v1_5 signature as stored

    • The PEM-armoured text, wrapped at 70 columns like OpenSSH.

      Returns string

    • The binary sshsig blob, byte for byte as OpenSSH writes it.

      Returns Uint8Array

    • Build the message that gets signed/verified: the signed-data blob defined by PROTOCOL.sshsig §3.1.

      "SSHSIG" magic
      string  namespace
      string  reserved
      string  hash_algorithm
      string  H(message)        ← *digest*, not the raw message
      

      Parameters

      Returns Uint8Array

    • Construct from already-decoded parts (used by the sign path).

      signatureAlgorithm defaults to the key's wire name; for an RSA key it defaults to rsa-sha2-512, the algorithm ssh-key's RSA signer names.

      Parameters

      Returns SSHSignature

    • Fixed-string mirror of the reference's summarizer for TAG_SSH_TEXT_SIGNATURE.

      Returns string

    • SHA-256 digest of canonical PEM bytes — kept for parity with key types.

      Returns Uint8Array