Introduction
This is the private key format of OpenSSH, the one
ssh-keygen keys are stored in. A file holds one or more public keys and the matching private
keys, normally encrypted with a passphrase.
Such files usually have no extension (for example id_ed25519); some people name them
.key. The matching public key is described under
.pub.
Structure
The key data starts with the magic string openssh-key-v1. A header names the cipher, the key
derivation function and its options, then gives the number of keys and the public keys. The private keys
follow as one list, padded and, if a passphrase is set, encrypted. With the bcrypt derivation
the options hold a salt and a round count; an unencrypted key uses none for both.
Not described
Known, not yet covered
- Reference: the layout of the format is not yet described here: the text armour, the byte-level fields and the private key records of each key type are in OpenSSH's PROTOCOL.key and source code.
- Viewer: the site has no viewer for this format.
Also used for
- Apple Keynote presentation – Apple Keynote presentation: a ZIP package of IWA files and media.
- PEM private key – Keys and certificates as base64 text between BEGIN and END lines.
Links
Software
- OpenSSH – the SSH suite that writes and reads these keys
Reference
- PROTOCOL.key – OpenSSH's description of the format