diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-20 17:43:35 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-21 01:39:55 +0200 |
commit | 70097ecfe54a9630e1e77fdc30204a5460228193 (patch) | |
tree | f43481a6ede0e0fcd81f8ba02006613d02d23032 /src/Crypto/Camellia.h | |
parent | ee5c1784ea0ed1328f7607bf3ea619ef3bd96d03 (diff) | |
download | VeraCrypt-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/Camellia.h')
-rw-r--r-- | src/Crypto/Camellia.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Crypto/Camellia.h b/src/Crypto/Camellia.h index 75e89b5f..988203d0 100644 --- a/src/Crypto/Camellia.h +++ b/src/Crypto/Camellia.h @@ -2,6 +2,7 @@ #define HEADER_Crypto_Camellia #include "Common/Tcdefs.h" +#include "config.h" #ifdef __cplusplus extern "C" @@ -16,6 +17,11 @@ void camellia_set_key(const unsigned __int8 userKey[], unsigned __int8 *ks); void camellia_encrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks); void camellia_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks); +#if CRYPTOPP_BOOL_X64 +void camellia_encrypt_blocks(unsigned __int8 *ks, const byte* in_blk, byte* out_blk, uint32 blockCount); +void camellia_decrypt_blocks(unsigned __int8 *ks, const byte* in_blk, byte* out_blk, uint32 blockCount); +#endif + #ifdef __cplusplus } #endif |