From f9894240bed36eab17fabf5aa482799b148618e2 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Tue, 12 Nov 2019 16:50:04 +0300 Subject: 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 --- cipher/gostr3411-94.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cipher/gostr3411-94.c') 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) -- cgit v1.2.1