[PATCH 1/3] Use correct blocksize of 32 bytes for GOSTR3411-94 HMAC

Jussi Kivilinna jussi.kivilinna at iki.fi
Sat Nov 16 13:15:46 CET 2013


* cipher/md.c (md_open): Set macpads_Bsize to 32 for
GCRY_MD_GOST24311_94.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 cipher/md.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/cipher/md.c b/cipher/md.c
index 3bfa3bd..65dadd1 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -326,6 +326,9 @@ md_open (gcry_md_hd_t *h, int algo, int secure, int hmac)
               case GCRY_MD_SHA512:
                 ctx->macpads_Bsize = 128;
                 break;
+              case GCRY_MD_GOSTR3411_94:
+                ctx->macpads_Bsize = 32;
+                break;
               default:
                 ctx->macpads_Bsize = 64;
                 break;




More information about the Gcrypt-devel mailing list