From 23f33d57c9b6f2295a8ddfc9a8eee5a2c30cf406 Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Sun, 11 May 2014 12:00:19 +0300 Subject: Add ChaCha20 stream cipher * cipher/Makefile.am: Add 'chacha20.c'. * cipher/chacha20.c: New. * cipher/cipher.c (cipher_list): Add ChaCha20. * configure.ac: Add ChaCha20. * doc/gcrypt.texi: Add ChaCha20. * src/cipher.h (_gcry_cipher_spec_chacha20): New. * src/gcrypt.h.in (GCRY_CIPHER_CHACHA20): Add new algo. * tests/basic.c (MAX_DATA_LEN): Increase to 128 from 100. (check_stream_cipher): Add ChaCha20 test-vectors. (check_ciphers): Add ChaCha20. -- Patch adds Bernstein's ChaCha20 cipher to libgcrypt. Implementation is based on public domain implementations. Signed-off-by: Jussi Kivilinna --- doc/gcrypt.texi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index c5c3b452..d202b8b4 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -1564,6 +1564,10 @@ This is the Salsa20/12 - reduced round version of Salsa20 stream cipher. The GOST 28147-89 cipher, defined in the respective GOST standard. Translation of this GOST into English is provided in the RFC-5830. +@item GCRY_CIPHER_CHACHA20 +@cindex ChaCha20 +This is the ChaCha20 stream cipher. + @end table @node Available cipher modes @@ -1720,9 +1724,9 @@ vector is passed as the buffer @var{K} of length @var{l} bytes and copied to internal data structures. The function checks that the IV matches the requirement of the selected algorithm and mode. -This function is also used with the Salsa20 stream cipher to set or -update the required nonce. In this case it needs to be called after -setting the key. +This function is also used with Salsa20 and ChaCha20 stream ciphers +to set or update the required nonce. In this case it needs to be +called after setting the key. This function is also used with the AEAD cipher modes to set or update the required nonce. -- cgit v1.2.1