mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 01:55:19 +01:00
38a52bd3b5
Release notes are available at https://www.openssh.com/txt/release-9.1 9.1 contains fixes for three minor memory safety problems; these have lready been merged to the copy of OpenSSH 9.0 that is in the FreeBSD base system. Some highlights copied from the release notes: Potentially-incompatible changes -------------------------------- * ssh(1), sshd(8): SetEnv directives in ssh_config and sshd_config are now first-match-wins to match other directives. Previously if an environment variable was multiply specified the last set value would have been used. bz3438 * ssh-keygen(8): ssh-keygen -A (generate all default host key types) will no longer generate DSA keys, as these are insecure and have not been used by default for some years. New features ------------ * ssh(1), sshd(8): add a RequiredRSASize directive to set a minimum RSA key length. Keys below this length will be ignored for user authentication and for host authentication in sshd(8). * sftp-server(8): add a "users-groups-by-id@openssh.com" extension request that allows the client to obtain user/group names that correspond to a set of uids/gids. * sftp(1): use "users-groups-by-id@openssh.com" sftp-server extension (when available) to fill in user/group names for directory listings. * sftp-server(8): support the "home-directory" extension request defined in draft-ietf-secsh-filexfer-extensions-00. This overlaps a bit with the existing "expand-path@openssh.com", but some other clients support it. * ssh-keygen(1), sshd(8): allow certificate validity intervals, sshsig verification times and authorized_keys expiry-time options to accept dates in the UTC time zone in addition to the default of interpreting them in the system time zone. YYYYMMDD and YYMMDDHHMM[SS] dates/times will be interpreted as UTC if suffixed with a 'Z' character. Also allow certificate validity intervals to be specified in raw seconds-since-epoch as hex value, e.g. -V 0x1234:0x4567890. This is intended for use by regress tests and other tools that call ssh-keygen as part of a CA workflow. bz3468 * sftp(1): allow arguments to the sftp -D option, e.g. sftp -D "/usr/libexec/sftp-server -el debug3" * ssh-keygen(1): allow the existing -U (use agent) flag to work with "-Y sign" operations, where it will be interpreted to require that the private keys is hosted in an agent; bz3429 MFC after: 2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation
72 lines
1.6 KiB
Plaintext
72 lines
1.6 KiB
Plaintext
This document describes the private key format for OpenSSH.
|
|
|
|
1. Overall format
|
|
|
|
The key consists of a header, a list of public keys, and
|
|
an encrypted list of matching private keys.
|
|
|
|
#define AUTH_MAGIC "openssh-key-v1"
|
|
|
|
byte[] AUTH_MAGIC
|
|
string ciphername
|
|
string kdfname
|
|
string kdfoptions
|
|
uint32 number of keys N
|
|
string publickey1
|
|
string publickey2
|
|
...
|
|
string publickeyN
|
|
string encrypted, padded list of private keys
|
|
|
|
2. KDF options for kdfname "bcrypt"
|
|
|
|
The options:
|
|
|
|
string salt
|
|
uint32 rounds
|
|
|
|
are concatenated and represented as a string.
|
|
|
|
3. Unencrypted list of N private keys
|
|
|
|
The list of privatekey/comment pairs is padded with the
|
|
bytes 1, 2, 3, ... until the total length is a multiple
|
|
of the cipher block size.
|
|
|
|
uint32 checkint
|
|
uint32 checkint
|
|
byte[] privatekey1
|
|
string comment1
|
|
byte[] privatekey2
|
|
string comment2
|
|
...
|
|
string privatekeyN
|
|
string commentN
|
|
byte 1
|
|
byte 2
|
|
byte 3
|
|
...
|
|
byte padlen % 255
|
|
|
|
where each private key is encoded using the same rules as used for
|
|
SSH agent.
|
|
|
|
Before the key is encrypted, a random integer is assigned
|
|
to both checkint fields so successful decryption can be
|
|
quickly checked by verifying that both checkint fields
|
|
hold the same value.
|
|
|
|
4. Encryption
|
|
|
|
The KDF is used to derive a key, IV (and other values required by
|
|
the cipher) from the passphrase. These values are then used to
|
|
encrypt the unencrypted list of private keys.
|
|
|
|
5. No encryption
|
|
|
|
For unencrypted keys the cipher "none" and the KDF "none"
|
|
are used with empty passphrases. The options if the KDF "none"
|
|
are the empty string.
|
|
|
|
$OpenBSD: PROTOCOL.key,v 1.3 2022/07/01 04:45:50 djm Exp $
|