1 This document describes the private key format for OpenSSH.
5 The key consists of a header, a list of public keys, and
6 an encrypted list of matching private keys.
8 #define AUTH_MAGIC "openssh-key-v1"
14 uint32 number of keys N
19 string encrypted, padded list of private keys
21 2. KDF options for kdfname "bcrypt"
28 are concatenated and represented as a string.
30 3. Unencrypted list of N private keys
32 The list of privatekey/comment pairs is padded with the
33 bytes 1, 2, 3, ... until the total length is a multiple
34 of the cipher block size.
51 where each private key is encoded using the same rules as used for
54 Before the key is encrypted, a random integer is assigned
55 to both checkint fields so successful decryption can be
56 quickly checked by verifying that both checkint fields
61 The KDF is used to derive a key, IV (and other values required by
62 the cipher) from the passphrase. These values are then used to
63 encrypt the unencrypted list of private keys.
67 For unencrypted keys the cipher "none" and the KDF "none"
68 are used with empty passphrases. The options if the KDF "none"
71 $OpenBSD: PROTOCOL.key,v 1.4 2024/03/30 05:56:22 djm Exp $