diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2013-09-05 13:42:11 +0400 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-09-07 10:26:31 +0200 |
commit | ae6f6c47d2e0c536f3eab0823b5f23d26956cda2 (patch) | |
tree | ec202a360d6891f859ff69a6ea39e9153facfd49 /cipher/cipher.c | |
parent | 49d5b9dcd622cdc87fb02a211bd51e3d46345bf2 (diff) | |
download | libgcrypt-ae6f6c47d2e0c536f3eab0823b5f23d26956cda2.tar.gz |
Add support for Salsa20/12 - 12 round version of Salsa20
* src/gcrypt.h.in (GCRY_CIPHER_SALSA20R12): New.
* src/salsa20.c (salsa20_core, salsa20_do_encrypt_stream): Add support
for reduced round versions.
(salsa20r12_encrypt_stream, _gcry_cipher_spec_salsa20r12): Implement
Salsa20/12 - a 12 round version of Salsa20 selected by eStream.
* src/cipher.h: Declsare Salsa20/12 definition.
* cipher/cipher.c: Register Salsa20/12
* tests/basic.c: (check_stream_cipher, check_stream_cipher_large_block):
Populate Salsa20/12 tests with test vectors from ecrypt
(check_ciphers): Add simple test for Salsa20/12
--
Salsa20/12 is a reduced round version of Salsa20 that is amongst ciphers
selected by eSTREAM for Phase 3 of Profile 1 algorithm. Moreover it is
one of proposed ciphers for TLS (draft-josefsson-salsa20-tls-02).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/cipher.c')
-rw-r--r-- | cipher/cipher.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c index 2337c09f..6ddd58be 100644 --- a/cipher/cipher.c +++ b/cipher/cipher.c @@ -107,6 +107,8 @@ static struct cipher_table_entry #if USE_SALSA20 { &_gcry_cipher_spec_salsa20, &_gcry_cipher_extraspec_salsa20, GCRY_CIPHER_SALSA20 }, + { &_gcry_cipher_spec_salsa20r12, + &_gcry_cipher_extraspec_salsa20, GCRY_CIPHER_SALSA20R12 }, #endif { NULL } }; |