aboutsummaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2024-06-06 10:07:08 +0200
committerJakob Unterwurzacher2024-06-06 10:07:08 +0200
commitf06f27e7bc098e334024c365004f9303e79997d9 (patch)
treed6af7efa28dc945a982dee096019549e489360c8 /init_dir.go
parentda873087dd7bcc54d96748a1f6e4e8ecf9e265e5 (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.go4
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)
}
}