From b0579baaa04fb91eabbbdc295bcabea04cf84056 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Wed, 18 Sep 2013 14:21:13 +0200 Subject: Add basic implementation of GOST R 34.11-94 message digest * src/gcrypt.h.in (GCRY_MD_GOSTR3411_94): New. * cipher/gostr3411-94.c: New. * configure.ac (available_digests): Add gostr3411-94. * src/cipher.h: Add gostr3411-94 definitions. * cipher/md.c: Register GOST R 34.11-94. * tests/basic.c (check_digests): Add 4 tests for GOST R 34.11-94 hash algo. Two are defined in the standard itself, two other are more or less common tests - an empty string an exclamation mark. * doc/gcrypt.texi: Add an entry describing GOST R 34.11-94 to the MD algorithms table. -- Add simple implementation of GOST R 34.11-94 hash function. Currently there is no way to specify hash parameters (it always uses GOST R 34.11-94 test parameters). Signed-off-by: Dmitry Eremin-Solenikov Stack burn value in gost3411_init added by wk. --- cipher/md.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cipher/md.c') diff --git a/cipher/md.c b/cipher/md.c index 44dc6dc4..0d6a7c23 100644 --- a/cipher/md.c +++ b/cipher/md.c @@ -57,6 +57,10 @@ static struct digest_table_entry { &_gcry_digest_spec_crc24_rfc2440, &dummy_extra_spec, GCRY_MD_CRC24_RFC2440, 1 }, #endif +#ifdef USE_GOST_R_3411_94 + { &_gcry_digest_spec_gost3411_94, + &dummy_extra_spec, GCRY_MD_GOSTR3411_94 }, +#endif #if USE_MD4 { &_gcry_digest_spec_md4, &dummy_extra_spec, GCRY_MD_MD4 }, -- cgit v1.2.1