summaryrefslogtreecommitdiff
path: root/cipher/cipher.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2013-09-02 13:28:48 +0400
committerWerner Koch <wk@gnupg.org>2013-09-18 13:46:00 +0200
commit56b5949f71f501744998f5ebc12488ebf6f1c0b5 (patch)
treedb7cf299f646bb52d1d47639e60797576186b97d /cipher/cipher.c
parent63cd3474425cb5a7ec4d1a56be15b248ecda4680 (diff)
downloadlibgcrypt-56b5949f71f501744998f5ebc12488ebf6f1c0b5.tar.gz
Add limited implementation of GOST 28147-89 cipher
* src/gcrypt.h.in (GCRY_CIPHER_GOST28147): New. * cipher/gost.h, cipher/gost28147.c: New. * configure.ac (available_ciphers): Add gost28147. * src/cipher.h: Add gost28147 definitions. * cipher/cipher.c: Register gost28147. * tests/basic.c (check_ciphers): Enable simple test for gost28147. * doc/gcrypt.texi: document GCRY_CIPHER_GOST28147. -- Add a very basic implementation of GOST 28147-89 cipher: from modes defined in standard only ECB and CFB are supported, sbox is limited to the "test variant" as provided in GOST 34.11-94. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/cipher.c')
-rw-r--r--cipher/cipher.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c
index 6ddd58be..a17ca9b2 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -110,6 +110,10 @@ static struct cipher_table_entry
{ &_gcry_cipher_spec_salsa20r12,
&_gcry_cipher_extraspec_salsa20, GCRY_CIPHER_SALSA20R12 },
#endif
+#if USE_GOST28147
+ { &_gcry_cipher_spec_gost28147,
+ &dummy_extra_spec, GCRY_CIPHER_GOST28147 },
+#endif
{ NULL }
};