VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/SerpentFast.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-08 08:53:37 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-17 18:40:25 +0200
commit2a10640f42420683ca59feaca2ec43dc6977f1ae (patch)
treefa8a20a9f7873da9d72b762f4527feea58842152 /src/Crypto/SerpentFast.h
parent6e94286b39cbfab21f9ee43256e8b5667f6a11de (diff)
downloadVeraCrypt-2a10640f42420683ca59feaca2ec43dc6977f1ae.tar.gz
VeraCrypt-2a10640f42420683ca59feaca2ec43dc6977f1ae.zip
Add missing fast Serpent implementation sources.
Diffstat (limited to 'src/Crypto/SerpentFast.h')
-rw-r--r--src/Crypto/SerpentFast.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Crypto/SerpentFast.h b/src/Crypto/SerpentFast.h
new file mode 100644
index 00000000..a5937b6e
--- /dev/null
+++ b/src/Crypto/SerpentFast.h
@@ -0,0 +1,28 @@
+/*
+* Serpent
+* (C) 1999-2007 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#include "Common/Tcdefs.h"
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* userKey is always 32-bytes long */
+void serpent_set_key(const unsigned __int8 userKey[], unsigned __int8 *ks);
+void serpent_encrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks);
+void serpent_decrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks);
+
+#define serpent_encrypt(inBlock,outBlock,ks) serpent_encrypt_blocks(inBlock,outBlock,1,ks)
+#define serpent_decrypt(inBlock,outBlock,ks) serpent_decrypt_blocks(inBlock,outBlock,1,ks)
+
+#ifdef __cplusplus
+}
+#endif
+