linux/include/crypto/internal
Ard Biesheuvel 2aa92dfe28 UPSTREAM: crypto: chacha - move existing library code into lib/crypto
Currently, our generic ChaCha implementation consists of a permute
function in lib/chacha.c that operates on the 64-byte ChaCha state
directly [and which is always included into the core kernel since it
is used by the /dev/random driver], and the crypto API plumbing to
expose it as a skcipher.

In order to support in-kernel users that need the ChaCha streamcipher
but have no need [or tolerance] for going through the abstractions of
the crypto API, let's expose the streamcipher bits via a library API
as well, in a way that permits the implementation to be superseded by
an architecture specific one if provided.

So move the streamcipher code into a separate module in lib/crypto,
and expose the init() and crypt() routines to users of the library.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 5fb8ef2580)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7fe321d1fcbaea1dc3f9f65dec74a6f40da2d489
2020-10-24 14:43:29 +02:00
..
acompress.h crypto: acomp - allow registration of multiple acomps 2017-04-21 20:30:50 +08:00
aead.h crypto: aead - Add chunk size 2016-07-18 17:35:38 +08:00
akcipher.h crypto: Add akcipher_set_reqsize() function 2017-07-28 17:58:04 +08:00
chacha.h UPSTREAM: crypto: chacha - move existing library code into lib/crypto 2020-10-24 14:43:29 +02:00
geniv.h crypto: aead - Remove blkcipher null for IV generators 2016-07-18 17:35:43 +08:00
hash.h crypto: mcryptd - remove pointless wrapper functions 2018-02-15 23:26:45 +08:00
kpp.h crypto: kpp - Key-agreement Protocol Primitives API (KPP) 2016-06-23 18:29:56 +08:00
rng.h crypto: rng - Do not free default RNG when it becomes unused 2015-06-22 15:49:18 +08:00
rsa.h crypto: rsa - Store rest of the private key components 2016-07-05 23:05:26 +08:00
scompress.h crypto: scomp - delete unused comments 2017-12-28 17:56:50 +11:00
simd.h crypto: simd - allow registering multiple algorithms at once 2018-03-03 00:03:17 +08:00
skcipher.h crypto: skcipher - introduce walksize attribute for SIMD algos 2016-12-30 19:52:47 +08:00