diff options
author | Jakob Unterwurzacher | 2024-06-06 10:07:08 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2024-06-06 10:07:08 +0200 |
commit | f06f27e7bc098e334024c365004f9303e79997d9 (patch) | |
tree | d6af7efa28dc945a982dee096019549e489360c8 /init_dir.go | |
parent | da873087dd7bcc54d96748a1f6e4e8ecf9e265e5 (diff) |
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
Diffstat (limited to 'init_dir.go')
-rw-r--r-- | init_dir.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } } |