VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/kuznyechik.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto/kuznyechik.h')
-rw-r--r--src/Crypto/kuznyechik.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Crypto/kuznyechik.h b/src/Crypto/kuznyechik.h
new file mode 100644
index 00000000..ad67f957
--- /dev/null
+++ b/src/Crypto/kuznyechik.h
@@ -0,0 +1,26 @@
+/*
+This code is written by kerukuro for cppcrypto library (http://cppcrypto.sourceforge.net/)
+and released into public domain.
+*/
+
+/* Adapted to VeraCrypt */
+
+#ifndef CPPCRYPTO_KUZNYECHIK_H
+#define CPPCRYPTO_KUZNYECHIK_H
+
+#include "Common/Tcdefs.h"
+
+typedef struct _kuznyechik_kds
+{
+ uint64 rke[10][2];
+ uint64 rkd[10][2];
+} kuznyechik_kds;
+
+#define KUZNYECHIK_KS (sizeof(kuznyechik_kds))
+
+void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
+void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
+void kuznyechik_set_key(const byte* key, kuznyechik_kds *kds);
+
+
+#endif