From 23b1b90df264a1df9c6403fa1ad13fda18fdb152 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 1 Jul 2023 19:22:34 +0200 Subject: [PATCH] ssh: prefer sha256 based MAC algorithms sha256 is more optimized than sha512 in Go and is secure enough so prefer sha256 over sha512. Fixes golang/go#61138 Change-Id: I7658808655367f1ab5f4ac8b52e6b20bd30ebf87 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/507555 Run-TryBot: Filippo Valsorda Reviewed-by: Filippo Valsorda Auto-Submit: Filippo Valsorda Reviewed-by: Joedian Reid TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov --- ssh/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh/common.go b/ssh/common.go index 9ba6e10a4a..03ff0b3778 100644 --- a/ssh/common.go +++ b/ssh/common.go @@ -85,7 +85,7 @@ var supportedHostKeyAlgos = []string{ // This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed // because they have reached the end of their useful life. var supportedMACs = []string{ - "hmac-sha2-512-etm@openssh.com", "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha2-512", "hmac-sha1", "hmac-sha1-96", + "hmac-sha2-256-etm@openssh.com", "hmac-sha2-512-etm@openssh.com", "hmac-sha2-256", "hmac-sha2-512", "hmac-sha1", "hmac-sha1-96", } var supportedCompressions = []string{compressionNone}