VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/Streebog.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-09 14:25:52 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-15 01:09:11 +0200
commite90e24b30b379752bf6531c663085de1d2a653d7 (patch)
tree6ff3a18a2e9dedb9e506d67f2c560e1c8f657e47 /src/Crypto/Streebog.h
parent0b2c8b09c6eb3ddce22fa88c34a640881f8f2177 (diff)
downloadVeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.tar.gz
VeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.zip
Windows: Add support for Streebog (hash) and kuznyechik (encryption)
Diffstat (limited to 'src/Crypto/Streebog.h')
-rw-r--r--src/Crypto/Streebog.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Crypto/Streebog.h b/src/Crypto/Streebog.h
new file mode 100644
index 00000000..61630234
--- /dev/null
+++ b/src/Crypto/Streebog.h
@@ -0,0 +1,33 @@
+
+/*
+* Copyright (c) 2013, Alexey Degtyarev.
+* All rights reserved.
+*/
+
+/* Adapted to VeraCrypt */
+
+#ifndef STREEBOG_H
+#define STREEBOG_H
+
+#include "Common/Tcdefs.h"
+#include "config.h"
+
+#define ALIGN(a) CRYPTOPP_ALIGN_DATA(a)
+
+typedef ALIGN(16) struct _STREEBOG_CTX
+{
+ ALIGN(16) unsigned char buffer[64];
+ ALIGN(16) unsigned long long hash[8];
+ ALIGN(16) unsigned long long h[8];
+ ALIGN(16) unsigned long long N[8];
+ ALIGN(16) unsigned long long Sigma[8];
+ size_t bufsize;
+ unsigned int digest_size;
+} STREEBOG_CTX;
+
+void STREEBOG_init(STREEBOG_CTX *ctx);
+void STREEBOG_init256(STREEBOG_CTX *ctx);
+void STREEBOG_add(STREEBOG_CTX *ctx, byte *msg, size_t len);
+void STREEBOG_finalize(STREEBOG_CTX *ctx, byte *out);
+
+#endif