]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: chacha20 - Add a generic ChaCha20 stream cipher implementation
authorMartin Willi <martin@strongswan.org>
Mon, 1 Jun 2015 11:43:56 +0000 (13:43 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2015 07:04:49 +0000 (15:04 +0800)
commitc08d0e647305c3f8f640010a56c9e4bafb9488d3
treef6d862fda8608a41677ec721f5dc280a1899a320
parentfb43f69401fef8ed2f72d7ea4a25910a0f2138bc
crypto: chacha20 - Add a generic ChaCha20 stream cipher implementation

ChaCha20 is a high speed 256-bit key size stream cipher algorithm designed by
Daniel J. Bernstein. It is further specified in RFC7539 for use in IETF
protocols as a building block for the ChaCha20-Poly1305 AEAD.

This is a portable C implementation without any architecture specific
optimizations. It uses a 16-byte IV, which includes the 12-byte ChaCha20 nonce
prepended by the initial block counter. Some algorithms require an explicit
counter value, for example the mentioned AEAD construction.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
crypto/Makefile
crypto/chacha20_generic.c [new file with mode: 0644]