VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/Camellia.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-06-02 00:10:39 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-06-02 00:12:00 +0200
commit76d3bc631eff60841026f2526d69f6d661d218a3 (patch)
treececc43976a8c45029b35b08ba3af0819ebee3993 /src/Crypto/Camellia.h
parent99c4031d89ce4f72e3899b3cac660082a1820a48 (diff)
downloadVeraCrypt-76d3bc631eff60841026f2526d69f6d661d218a3.tar.gz
VeraCrypt-76d3bc631eff60841026f2526d69f6d661d218a3.zip
Crypto: Add support for Japanese encryption standard Camellia, including for system encryption.
Diffstat (limited to 'src/Crypto/Camellia.h')
-rw-r--r--src/Crypto/Camellia.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Crypto/Camellia.h b/src/Crypto/Camellia.h
new file mode 100644
index 00000000..75e89b5f
--- /dev/null
+++ b/src/Crypto/Camellia.h
@@ -0,0 +1,23 @@
+#ifndef HEADER_Crypto_Camellia
+#define HEADER_Crypto_Camellia
+
+#include "Common/Tcdefs.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define CAMELLIA_KS 34 * 8
+
+/* userKey is always 32-bytes long */
+/* size of ks is 34*8 bytes */
+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 // HEADER_Crypto_Camellia