diff options
Diffstat (limited to 'src/Crypto')
-rw-r--r-- | src/Crypto/GostCipher.c | 2 | ||||
-rw-r--r-- | src/Crypto/GostCipher.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Crypto/GostCipher.c b/src/Crypto/GostCipher.c index 4d7e5070..0fd3941a 100644 --- a/src/Crypto/GostCipher.c +++ b/src/Crypto/GostCipher.c @@ -102,7 +102,7 @@ void gost_set_key(const byte *key, gost_kds *ks, int useDynamicSbox) #endif //Generate pseudorandom data based on the key STREEBOG_init(&sctx); - STREEBOG_add(&sctx, key, 32); + STREEBOG_add(&sctx, ks->key, 32); STREEBOG_finalize(&sctx, sbox_seed); #if defined (DEVICE_DRIVER) && !defined (_WIN64) diff --git a/src/Crypto/GostCipher.h b/src/Crypto/GostCipher.h index 36afb777..6031c438 100644 --- a/src/Crypto/GostCipher.h +++ b/src/Crypto/GostCipher.h @@ -13,6 +13,7 @@ #define GOST_CIPHER_H #include "Common/Tcdefs.h" +#include "config.h" #ifdef __cplusplus extern "C" { @@ -47,7 +48,7 @@ typedef unsigned int gst_udword; typedef struct gost_kds { - byte key[32]; + CRYPTOPP_ALIGN_DATA(16) byte key[32]; gst_udword sbox_cvt[256 * 4]; byte sbox[8][16]; } gost_kds; |