From 70097ecfe54a9630e1e77fdc30204a5460228193 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 20 Jun 2017 17:43:35 +0200 Subject: 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. --- src/Crypto/Camellia.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Crypto/Camellia.h') 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 -- cgit v1.2.3