summaryrefslogtreecommitdiff
path: root/cipher/gostr3411-94.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2014-06-06 22:48:26 +0400
committerWerner Koch <wk@gnupg.org>2014-06-28 10:36:33 +0200
commit8b221cf5ce233c8c49a4e4ecebb70d523fc37837 (patch)
treea72118f1804ccec878da6e3542835e9b91e45c4e /cipher/gostr3411-94.c
parentf14fb5b427b5159fcd9603d2b3cde936889cf430 (diff)
downloadlibgcrypt-8b221cf5ce233c8c49a4e4ecebb70d523fc37837.tar.gz
GOST R 34.11-94 add OIDs
* cipher/gostr3411-94.c: Add OIDs for GOST R 34.11-94 from RFC 4357. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/gostr3411-94.c')
-rw-r--r--cipher/gostr3411-94.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/cipher/gostr3411-94.c b/cipher/gostr3411-94.c
index 9a39733d..73d570f0 100644
--- a/cipher/gostr3411-94.c
+++ b/cipher/gostr3411-94.c
@@ -294,10 +294,23 @@ gost3411_read (void *context)
return hd->h;
}
+
+static unsigned char asn[6] = /* Object ID is 1.2.643.2.2.3 */
+ { 0x2a, 0x85, 0x03, 0x02, 0x02, 0x03 };
+
+static gcry_md_oid_spec_t oid_spec_gostr3411[] =
+ {
+ /* iso.member-body.ru.rans.cryptopro.3 (gostR3411-94-with-gostR3410-2001) */
+ { "1.2.643.2.2.3" },
+ /* iso.member-body.ru.rans.cryptopro.9 (gostR3411-94) */
+ { "1.2.643.2.2.9" },
+ {NULL},
+ };
+
gcry_md_spec_t _gcry_digest_spec_gost3411_94 =
{
GCRY_MD_GOSTR3411_94, {0, 0},
- "GOSTR3411_94", NULL, 0, NULL, 32,
+ "GOSTR3411_94", asn, DIM (asn), oid_spec_gostr3411, 32,
gost3411_init, _gcry_md_block_write, gost3411_final, gost3411_read,
sizeof (GOSTR3411_CONTEXT)
};