VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/kuznyechik.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-11-27 09:10:17 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-11-27 16:16:35 +0100
commitf53eb8e260d174153bb3fc24ff1fff7966dcfbee (patch)
treeb8e5263c7fc7e90177ca7c296f6bc493fc735877 /src/Crypto/kuznyechik.h
parent685fad2d5d56ff1049ba2f5c8b901bca5a4a07bd (diff)
downloadVeraCrypt-f53eb8e260d174153bb3fc24ff1fff7966dcfbee.tar.gz
VeraCrypt-f53eb8e260d174153bb3fc24ff1fff7966dcfbee.zip
SIMD speed optimization for Kuznyechik cipher implementation (up to 2x speedup). Based on https://github.com/aprelev/libgost15.
Diffstat (limited to 'src/Crypto/kuznyechik.h')
-rw-r--r--src/Crypto/kuznyechik.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Crypto/kuznyechik.h b/src/Crypto/kuznyechik.h
index 79ca539b..f0b45b64 100644
--- a/src/Crypto/kuznyechik.h
+++ b/src/Crypto/kuznyechik.h
@@ -16,14 +16,16 @@ extern "C" {
typedef struct _kuznyechik_kds
{
- uint64 rke[10][2];
- uint64 rkd[10][2];
+ uint64 rke[20];
+ uint64 rkd[20];
} kuznyechik_kds;
#define KUZNYECHIK_KS (sizeof(kuznyechik_kds))
void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
+void kuznyechik_encrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
+void kuznyechik_decrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
void kuznyechik_set_key(const byte* key, kuznyechik_kds *kds);
#ifdef __cplusplus