summaryrefslogtreecommitdiffstats
path: root/lib/crypto/Kconfig
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-11-08 13:22:39 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-17 09:02:44 +0800
commited20078b7e3331e82828be357147af6a3282e4ce (patch)
tree329bf5e186f765e308c9db1d06593a5f5d959f68 /lib/crypto/Kconfig
parentd8f1308a025fc7e00414194ed742d5f05a21e13c (diff)
downloadlinux-ed20078b7e3331e82828be357147af6a3282e4ce.tar.bz2
crypto: chacha20poly1305 - import construction and selftest from Zinc
This incorporates the chacha20poly1305 from the Zinc library, retaining the library interface, but replacing the implementation with calls into the code that already existed in the kernel's crypto API. Note that this library API does not implement RFC7539 fully, given that it is limited to 64-bit nonces. (The 96-bit nonce version that was part of the selftest only has been removed, along with the 96-bit nonce test vectors that only tested the selftest but not the actual library itself) Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/crypto/Kconfig')
-rw-r--r--lib/crypto/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index b1d830dc1c9e..0b2c4fce26d9 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -119,5 +119,12 @@ config CRYPTO_LIB_POLY1305
by either the generic implementation or an arch-specific one, if one
is available and enabled.
+config CRYPTO_LIB_CHACHA20POLY1305
+ tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
+ depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
+ depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
+ select CRYPTO_LIB_CHACHA
+ select CRYPTO_LIB_POLY1305
+
config CRYPTO_LIB_SHA256
tristate