himitsu-ssh(5)

πŸ“¦ version 0.10.0, in alpine 3.24

πŸ’… himitsu-ssh(5): the SSH key format tea, explained by your Unix bestie πŸ’…

πŸ’– NAME πŸ’–

himitsu-ssh β€” the format of SSH keys used by himitsu-ssh(7), bestie.

✨ DESCRIPTION ✨

Okay so this page is literally all about the format of SSH keys stored in the Himitsu key store by himitsu-ssh. That’s the whole assignment. If you want the actual β€œhow do I use himitsu-ssh” details, go read himitsu-ssh(7) instead, no cap.

πŸ”‘ KEY FORMAT πŸ”‘

The Himitsu keys used by himitsu-ssh use proto=ssh and define other fields that may vary depending on the type of key in use. The keys common to each key type are:

  • proto β€” ssh. That’s it. That’s the value.
  • type β€” the key algorithm, using the standard SSH name.
  • comment? β€” an arbitrary user-provided comment.

The type field defines the other parameters that are present. And key materials are stored directly in their "raw" form, rather than wrapped in the SSH standard key format. Slay, honestly.


🧚 ssh-ed25519 🧚

ssh-ed25519 keys add the following fields:

  • type β€” ssh-ed25519
  • pkey β€” the ed25519 public key, base64 encoded
  • skey! β€” the ed25519 secret key, base64 encoded

🌸 ssh-rsa 🌸

RSA integers are stored as a sequence of multi precision unsigned integers. Such an integer starts with the length as an big-endian 32bit word. Followed by the denoted number of bytes, also in big-endian. The highest value bit of the first byte has to be 0, thus the integer may be left-padded with a single zero value.

  • type β€” ssh-rsa
  • pkey β€” the rsa public key, base64 encoded. The key consists of the modulus n and the public exponent e.
  • skey! β€” the rsa secret key, base64 encoded. The secret key consists of the private exponent d, the coefficient iq, and the prime factors p and q.

πŸ¦‹ ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 πŸ¦‹

  • type β€” ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 or ecdsa-sha2-nistp521
  • pkey β€” the ec public key, base64 encoded. The key is stored in the umcompressed format defined in RFC 8422. The first byte is 0x04, followed by the curve points in big-endian format, each taking half of the remaining space. They may be left padded with 0. For p256 they each take 32 bytes. For p384 they take 48 bytes and for p521 they take 66 bytes each.
  • skey! β€” the ed25519 secret key is a scalar value as byte array in big-endian format, base64 encoded.
bestie, yes, that last one says ed25519 inside the ECDSA section. I’m just relaying the page exactly, don’t come for me πŸ’€

πŸ‘€ SEE ALSO πŸ‘€


β€” with love, from the File Formats Manual, page himitsu-ssh(5), dated 2026-03-23 🫢

πŸ“¦ where this page comes from