From 76d3bc631eff60841026f2526d69f6d661d218a3 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 2 Jun 2016 00:10:39 +0200 Subject: Crypto: Add support for Japanese encryption standard Camellia, including for system encryption. --- src/Crypto/CamelliaSmall.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/Crypto/CamelliaSmall.h (limited to 'src/Crypto/CamelliaSmall.h') diff --git a/src/Crypto/CamelliaSmall.h b/src/Crypto/CamelliaSmall.h new file mode 100644 index 00000000..3781ac02 --- /dev/null +++ b/src/Crypto/CamelliaSmall.h @@ -0,0 +1,23 @@ +#ifndef SMALL_CAMELLIA_H +#define SMALL_CAMELLIA_H + +#include "Common/Tcdefs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define CAMELLIA_KS 34 * 8 * 2 + +/* userKey is always 32-bytes long */ +/* size of ks is 34 */ +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); + +#ifdef __cplusplus +} +#endif + + +#endif /* camellia.h */ -- cgit v1.2.3