[v2,4/4] OpenSSH: Order symmetric ciphers by strength

Message ID 20240921153000.706916-4-peter.mueller@ipfire.org
State Staged
Commit 68545eb2d1032e6b12b703b64fb7afe8329bdb5f
Headers
Series [v2,1/4] OpenSSH :Update to 9.9p1 |

Commit Message

Peter Müller Sept. 21, 2024, 3:30 p.m. UTC
  We also wish to prefer AES over Chacha/Poly, given the
prevalence of hardware accelaration for the former.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 config/ssh/ssh_config  | 2 +-
 config/ssh/sshd_config | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/config/ssh/ssh_config b/config/ssh/ssh_config
index 86f123e28..d5f63f315 100644
--- a/config/ssh/ssh_config
+++ b/config/ssh/ssh_config
@@ -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 chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
+        Ciphers aes256-gcm@openssh.com,aes256-ctr,chacha20-poly1305@openssh.com,aes192-ctr,aes128-gcm@openssh.com,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)
diff --git a/config/ssh/sshd_config b/config/ssh/sshd_config
index 421416705..e338f8cef 100644
--- a/config/ssh/sshd_config
+++ b/config/ssh/sshd_config
@@ -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 chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
+Ciphers aes256-gcm@openssh.com,aes256-ctr,chacha20-poly1305@openssh.com,aes192-ctr,aes128-gcm@openssh.com,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)