summaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/cipher.h1
-rw-r--r--src/gcrypt.h.in3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cipher.h b/src/cipher.h
index 34fc2e8a..74d59ba5 100644
--- a/src/cipher.h
+++ b/src/cipher.h
@@ -212,6 +212,7 @@ extern cipher_extra_spec_t _gcry_cipher_extraspec_salsa20;
extern gcry_md_spec_t _gcry_digest_spec_crc32;
extern gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510;
extern gcry_md_spec_t _gcry_digest_spec_crc24_rfc2440;
+extern gcry_md_spec_t _gcry_digest_spec_gost3411_94;
extern gcry_md_spec_t _gcry_digest_spec_md4;
extern gcry_md_spec_t _gcry_digest_spec_md5;
extern gcry_md_spec_t _gcry_digest_spec_rmd160;
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index b87dd0e0..0bf79fc8 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -1090,7 +1090,8 @@ enum gcry_md_algos
GCRY_MD_CRC24_RFC2440 = 304,
GCRY_MD_WHIRLPOOL = 305,
GCRY_MD_TIGER1 = 306, /* TIGER fixed. */
- GCRY_MD_TIGER2 = 307 /* TIGER2 variant. */
+ GCRY_MD_TIGER2 = 307, /* TIGER2 variant. */
+ GCRY_MD_GOSTR3411_94 = 308, /* GOST R 34.11-94. */
};
/* Flags used with the open function. */