VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/cpu.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-20 17:43:35 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-21 01:39:55 +0200
commit70097ecfe54a9630e1e77fdc30204a5460228193 (patch)
treef43481a6ede0e0fcd81f8ba02006613d02d23032 /src/Crypto/cpu.h
parentee5c1784ea0ed1328f7607bf3ea619ef3bd96d03 (diff)
downloadVeraCrypt-70097ecfe54a9630e1e77fdc30204a5460228193.tar.gz
VeraCrypt-70097ecfe54a9630e1e77fdc30204a5460228193.zip
Crypto: Add optimized Camellia assembly implementation for x86_64 based on work by Jussi Kivilinna (https://github.com/jkivilin/supercop-blockciphers). This improve speed by a factor of 2.5 when AES-NI supported by CPU and by 30% if AES-NI not supported.
Diffstat (limited to 'src/Crypto/cpu.h')
-rw-r--r--src/Crypto/cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h
index 05ce9d8f..68041190 100644
--- a/src/Crypto/cpu.h
+++ b/src/Crypto/cpu.h
@@ -196,6 +196,8 @@ extern int g_hasSSSE3;
extern int g_hasAESNI;
extern int g_hasCLMUL;
extern int g_isP4;
+extern int g_isIntel;
+extern int g_isAMD;
extern uint32 g_cacheLineSize;
void DetectX86Features(); // must be called at the start of the program/driver
int CpuId(uint32 input, uint32 *output);
@@ -225,6 +227,8 @@ extern int g_hasMMX;
#define HasAESNI() g_hasAESNI
#define HasCLMUL() g_hasCLMUL
#define IsP4() g_isP4
+#define IsCpuIntel() g_isIntel
+#define IsCpuAMD() g_isAMD
#define GetCacheLineSize() g_cacheLineSize
#if defined(__cplusplus)