summaryrefslogtreecommitdiff
path: root/cipher/md.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2013-09-18 14:21:13 +0200
committerWerner Koch <wk@gnupg.org>2013-09-18 14:32:20 +0200
commitb0579baaa04fb91eabbbdc295bcabea04cf84056 (patch)
treecb29c9defb3d1aedcb90dec639ce5d22ddc9fb96 /cipher/md.c
parentecde77ad98690540abb21db08e5531297ed72bd0 (diff)
downloadlibgcrypt-b0579baaa04fb91eabbbdc295bcabea04cf84056.tar.gz
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 <dbaryshkov@gmail.com> Stack burn value in gost3411_init added by wk.
Diffstat (limited to 'cipher/md.c')
-rw-r--r--cipher/md.c4
1 files changed, 4 insertions, 0 deletions
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 },