VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/cpu.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2025-01-17 00:58:54 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2025-01-17 00:58:54 +0100
commit54bd81999007b467420acab780c704c91bc1b057 (patch)
treefb2e3dbc899e6acd89f82406d6712508c015e1c8 /src/Crypto/cpu.h
parentc79f8102e094f512ac5c706fa30a2741d697b003 (diff)
downloadVeraCrypt-54bd81999007b467420acab780c704c91bc1b057.tar.gz
VeraCrypt-54bd81999007b467420acab780c704c91bc1b057.zip
Windows/Linux/macOS: implement AES hardware support on ARM64 (ARMv8)
Diffstat (limited to 'src/Crypto/cpu.h')
-rw-r--r--src/Crypto/cpu.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h
index b0df6462..761258f2 100644
--- a/src/Crypto/cpu.h
+++ b/src/Crypto/cpu.h
@@ -288,6 +288,24 @@ void DisableCPUExtendedFeatures ();
}
#endif
+#elif CRYPTOPP_BOOL_ARMV8
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if !defined(CRYPTOPP_DISABLE_AESNI) && !defined(WOLFCRYPT_BACKEND)
+#define TC_AES_HW_CPU
+#endif
+
+extern volatile int g_hasAESARM;
+void DetectArmFeatures();
+
+#define HasAESNI() g_hasAESARM
+
+#if defined(__cplusplus)
+}
+#endif
+
#else
#define HasSSE2() 0