summaryrefslogtreecommitdiff
path: root/cipher/gost28147.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2014-06-06 22:48:28 +0400
committerWerner Koch <wk@gnupg.org>2014-06-28 10:37:29 +0200
commit34a58010000288515636706811c3837f32957b2e (patch)
tree194888f2a4a464a868f30a0c183fe2e509a7e8a7 /cipher/gost28147.c
parent8b221cf5ce233c8c49a4e4ecebb70d523fc37837 (diff)
downloadlibgcrypt-34a58010000288515636706811c3837f32957b2e.tar.gz
gost28147: add OIDs used to define cipher mode
* cipher/gost28147 (oids_gost28147): Add OID from RFC4357. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/gost28147.c')
-rw-r--r--cipher/gost28147.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/cipher/gost28147.c b/cipher/gost28147.c
index c094209c..1e48eb09 100644
--- a/cipher/gost28147.c
+++ b/cipher/gost28147.c
@@ -441,10 +441,20 @@ gost_decrypt_block (void *c, byte *outbuf, const byte *inbuf)
4*sizeof(void*) /* gost_val call */;
}
+static gcry_cipher_oid_spec_t oids_gost28147[] =
+ {
+ /* { "1.2.643.2.2.31.0", GCRY_CIPHER_MODE_CNTGOST }, */
+ { "1.2.643.2.2.31.1", GCRY_CIPHER_MODE_CFB },
+ { "1.2.643.2.2.31.2", GCRY_CIPHER_MODE_CFB },
+ { "1.2.643.2.2.31.3", GCRY_CIPHER_MODE_CFB },
+ { "1.2.643.2.2.31.4", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
gcry_cipher_spec_t _gcry_cipher_spec_gost28147 =
{
GCRY_CIPHER_GOST28147, {0, 0},
- "GOST28147", NULL, NULL, 8, 256,
+ "GOST28147", NULL, oids_gost28147, 8, 256,
sizeof (GOST28147_context),
gost_setkey,
gost_encrypt_block,