Add support for Salsa20/12 - 12 round version of Salsa20
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Thu, 5 Sep 2013 09:42:11 +0000 (13:42 +0400)
committerWerner Koch <wk@gnupg.org>
Sat, 7 Sep 2013 08:26:31 +0000 (10:26 +0200)
commitae6f6c47d2e0c536f3eab0823b5f23d26956cda2
treeec202a360d6891f859ff69a6ea39e9153facfd49
parent49d5b9dcd622cdc87fb02a211bd51e3d46345bf2
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>
NEWS
cipher/cipher.c
cipher/salsa20.c
doc/gcrypt.texi
src/cipher.h
src/gcrypt.h.in
tests/basic.c