From f06f27e7bc098e334024c365004f9303e79997d9 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 6 Jun 2024 10:07:08 +0200 Subject: stupidgcm: detect AES-GCM acceleration like crypto/tls Instead of just looking for AES, also look for PCLMULQDQ, like crypto/tls does. Fixes: https://github.com/rfjakob/gocryptfs/issues/822 --- init_dir.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init_dir.go') diff --git a/init_dir.go b/init_dir.go index 9ba1a01..d79a4b7 100644 --- a/init_dir.go +++ b/init_dir.go @@ -68,9 +68,9 @@ func initDir(args *argContainer) { tlog.Fatal.Printf("Invalid cipherdir: %v", err) os.Exit(exitcodes.CipherDir) } - if !args.xchacha && !stupidgcm.CpuHasAES() { + if !args.xchacha && !stupidgcm.HasAESGCMHardwareSupport() { tlog.Info.Printf(tlog.ColorYellow + - "Notice: Your CPU does not have AES acceleration. Consider using -xchacha for better performance." + + "Notice: Your CPU does not have AES-GCM acceleration. Consider using -xchacha for better performance." + tlog.ColorReset) } } -- cgit v1.2.3