]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
OpenSSH: Prefer AES-GCM ciphers over AES-CTR
authorPeter Müller <peter.mueller@ipfire.org>
Sun, 28 Sep 2025 21:05:00 +0000 (21:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Sep 2025 08:55:53 +0000 (08:55 +0000)
This reflects the following change made upstream in OpenSSH 9.9:

 * ssh(1): prefer AES-GCM to AES-CTR mode when selecting a cipher
   for the connection. The default cipher preference list is now
   Chacha20/Poly1305, AES-GCM (128/256) followed by AES-CTR
   (128/192/256).

However, we keep preferring AES-GCM over Chacha/Poly, as hardware
acceleration often grants the former a better performance, while there
is no security advance of Chacha/Poly usage over 256 bit AES-GCM.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/ssh/ssh_config
config/ssh/sshd_config

index d5f63f315c624230ccec8d524616ec2e3d98b117..a248001ff89fe87cb36aa0247d4b4e1fe63e4b37 100644 (file)
@@ -10,7 +10,7 @@ Host *
 
         # Only use secure crypto algorithms
         KexAlgorithms sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
-        Ciphers aes256-gcm@openssh.com,aes256-ctr,chacha20-poly1305@openssh.com,aes192-ctr,aes128-gcm@openssh.com,aes128-ctr
+        Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
         MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
 
         # Always visualise server host keys (helps to identify key based MITM attacks)
index 7b687457c85648eb07148bacfbc751d50b378acc..25e5b18380a0799c8d3ad06d64fa39bd884a6227 100644 (file)
@@ -21,7 +21,7 @@ MaxStartups 5
 
 # Only allow safe crypto algorithms
 KexAlgorithms sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
-Ciphers aes256-gcm@openssh.com,aes256-ctr,chacha20-poly1305@openssh.com,aes192-ctr,aes128-gcm@openssh.com,aes128-ctr
+Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
 MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
 
 # Only allow cryptographically safe SSH host keys (adjust paths if needed)