summaryrefslogtreecommitdiff
path: root/cipher/gostr3411-94.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2019-11-12 16:50:04 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2019-11-21 17:59:30 +0200
commitf9894240bed36eab17fabf5aa482799b148618e2 (patch)
treefbfdf053d42c89b99c5148814e22c102ee6f94c7 /cipher/gostr3411-94.c
parentd164a8e7f6829163f1279517f07b61805311f8f2 (diff)
downloadlibgcrypt-f9894240bed36eab17fabf5aa482799b148618e2.tar.gz
gost28147: do not use GOST28147_CONTEXT outside of GOST 28147 calculation
* cipher/gost28147.c (_gcry_gost_enc_data): remove unused context argument * cipher/gostr3411-94.c (GOSTR3411_CONTEXT, gostr3411_init, do_hash_step): remove unused GOST 28147-89 context. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/gostr3411-94.c')
-rw-r--r--cipher/gostr3411-94.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cipher/gostr3411-94.c b/cipher/gostr3411-94.c
index c5a0aef6..7cf0637e 100644
--- a/cipher/gostr3411-94.c
+++ b/cipher/gostr3411-94.c
@@ -35,7 +35,6 @@
typedef struct {
gcry_md_block_ctx_t bctx;
- GOST28147_context hd;
union {
u32 h[8];
byte result[32];
@@ -55,7 +54,6 @@ gost3411_init (void *context, unsigned int flags)
(void)flags;
- memset (&hd->hd, 0, sizeof(hd->hd));
memset (hd->h, 0, 32);
memset (hd->sigma, 0, 32);
@@ -228,7 +226,7 @@ do_hash_step (GOSTR3411_CONTEXT *hd, u32 *h, u32 *m)
for (i = 0; i < 4; i++) {
do_p (k, u, v);
- burn = _gcry_gost_enc_data (&hd->hd, k, &s[2*i], &s[2*i+1], h[2*i], h[2*i+1], hd->cryptopro);
+ burn = _gcry_gost_enc_data (k, &s[2*i], &s[2*i+1], h[2*i], h[2*i+1], hd->cryptopro);
do_a (u);
if (i == 1)