Supported ciphers
ZestSSH’s SSH engine (zest_ssh_core) supports the symmetric encryption algorithms (ciphers) below for the SSH transport layer, and the MAC algorithms that go with the ciphers that need one.
ZestSSH offers a modern-only set by default. The per-host Compatibility mode switch adds the legacy CBC ciphers and hmac-md5 for older servers. Each list below is in the order ZestSSH offers it, most preferred first. The server picks the first cipher on ZestSSH’s list that it also has.
Offered by default
Section titled “Offered by default”| Cipher | Key size | Mode | AEAD |
|---|---|---|---|
chacha20-poly1305@openssh.com |
512-bit (two 256-bit keys) | Stream cipher + Poly1305 | Yes |
aes256-ctr |
256-bit | CTR | No |
aes128-ctr |
128-bit | CTR | No |
aes256-gcm@openssh.com |
256-bit | GCM | Yes |
aes128-gcm@openssh.com |
128-bit | GCM | Yes |
The two AES-GCM ciphers come after the three that were offered before them. Because the server takes the first cipher on ZestSSH’s list that it also has, a server with any of the first three connects exactly as it would without GCM. GCM is chosen only by a server set to GCM ciphers alone.
chacha20-poly1305@openssh.com (first choice)
Section titled “chacha20-poly1305@openssh.com (first choice)”| Property | Value |
|---|---|
| Algorithm | ChaCha20 stream cipher + Poly1305 |
| Key size | 512 bits (two 256-bit keys) |
| Nonce | Derived from the packet sequence number |
| Tag size | 16 bytes |
| AEAD | Yes |
ZestSSH’s first choice. It is an AEAD construction (Authenticated Encryption with Associated Data): encryption and integrity in one, so no separate MAC is used. One key encrypts the packet, the other encrypts the packet length on its own.
aes256-ctr and aes128-ctr
Section titled “aes256-ctr and aes128-ctr”| Property | Value |
|---|---|
| Algorithm | AES in counter mode |
| Key size | 256 bits (aes256-ctr), 128 bits (aes128-ctr) |
| IV size | 16 bytes |
| Block size | 16 bytes |
| AEAD | No (a MAC algorithm is agreed on as well, see below) |
ZestSSH offers the 256-bit key before the 128-bit one, so a server that has both agrees on aes256-ctr.
aes256-gcm@openssh.com and aes128-gcm@openssh.com
Section titled “aes256-gcm@openssh.com and aes128-gcm@openssh.com”| Property | Value |
|---|---|
| Algorithm | AES in Galois/Counter Mode |
| Key size | 256 bits / 128 bits |
| IV size | 12 bytes |
| Tag size | 16 bytes |
| AEAD | Yes |
Compatibility mode ciphers (legacy)
Section titled “Compatibility mode ciphers (legacy)”These CBC (Cipher Block Chaining) ciphers are offered only when the host has Compatibility mode turned on, after the five default ciphers, in this order:
| Cipher | Key size |
|---|---|
aes128-cbc |
128-bit |
aes192-cbc |
192-bit |
aes256-cbc |
256-bit |
They exist for older servers, for example default Proxmox LXC templates, OpenWrt routers and OpenSSH older than 7.6. CBC is off by default because of the SSH CBC plaintext-recovery attack (CVE-2008-5161) when it is not paired with an Encrypt-then-MAC algorithm. Turn Compatibility mode on only for servers that cannot be updated.
Compatibility mode is a switch in the host editor: on a computer under Auth > Show advanced options, on a phone under Advanced options. It applies to the host’s sessions, to every jump host on the way to it, to automation runs on the host, and to the editor’s Test full connection.
MAC algorithms
Section titled “MAC algorithms”A MAC (message authentication code) is used only with a cipher that is not AEAD: aes256-ctr, aes128-ctr and the CBC ciphers. ChaCha20-Poly1305 and AES-GCM bring their own integrity.
Offered by default, in this order:
| MAC | Notes |
|---|---|
hmac-sha2-512-etm@openssh.com |
Encrypt-then-MAC |
hmac-sha2-256-etm@openssh.com |
Encrypt-then-MAC |
hmac-sha2-512 |
|
hmac-sha2-256 |
|
hmac-sha1 |
|
hmac-sha2-512-96 |
Truncated to 96 bits |
hmac-sha2-256-96 |
Truncated to 96 bits |
Compatibility mode adds hmac-md5 after these.
Implemented but not offered
Section titled “Implemented but not offered”aes192-ctr is implemented in the engine but is not offered to servers, with or without Compatibility mode. It is used to read old-style PEM private keys that are encrypted with AES-192-CTR.
Not supported
Section titled “Not supported”These ciphers are not implemented:
| Cipher | Why not |
|---|---|
3des-cbc |
Small (64-bit) block size, slow |
arcfour, arcfour128, arcfour256 |
RC4 is broken |
blowfish-cbc |
64-bit block size |
cast128-cbc |
64-bit block size |
none |
No encryption at all |
Seeing which cipher a session used
Section titled “Seeing which cipher a session used”- On a computer: open the session’s Inspector from the session header. Under Details, the Cipher row names the cipher. A MAC row appears only when the cipher uses one.
- On every device: the connection log lists the ciphers and MACs ZestSSH offered (
ssh_cipher: Offering ciphers:,ssh_mac: Offering MACs:) and, after sign-in, the one agreed on (ssh_kex: Negotiated ..., with the cipher). See Reading connection logs.
When no cipher matches
Section titled “When no cipher matches”If the server and ZestSSH have no cipher (or MAC) in common, the connection is not made and the error, Algorithm mismatch, says which kind did not match. Where Compatibility mode has something the server offers, the error tells you to turn it on. Where it would not help, the error says that no setting in ZestSSH changes this and that the server has to offer something ZestSSH has (for example a server that offers only 3des-cbc). Copy details on the error lists what each side offered.
To see which ciphers a server supports, run this on the server:
ssh -Q cipher