summaryrefslogtreecommitdiff
path: root/crypto/Kconfig
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-24 18:28:31 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-01 13:38:31 +0800
commit3c197bb20a977bce48dbec3d4a18f8bc702a7360 (patch)
treec48c8921203ae9c78e7cd799761a0fcb89b07080 /crypto/Kconfig
parent262777c0da63572461859a155024cf5c52023afb (diff)
downloadlinux-crypto-3c197bb20a977bce48dbec3d4a18f8bc702a7360.tar.gz
linux-crypto-3c197bb20a977bce48dbec3d4a18f8bc702a7360.zip
crypto: blake2b - add blake2b generic implementation
The patch brings support of several BLAKE2 variants (2b with various digest lengths). The keyed digest is supported, using tfm->setkey call. The in-tree user will be btrfs (for checksumming), we're going to use the BLAKE2b-256 variant. The code is reference implementation taken from the official sources and modified in terms of kernel coding style (whitespace, comments, uintXX_t -> uXX types, removed unused prototypes and #ifdefs, removed testing code, changed secure_zero_memory -> memzero_explicit, used own helpers for unaligned reads/writes and rotations). Further changes removed sanity checks of key length or output size, these values are verified in the crypto API callbacks or hardcoded in shash_alg and not exposed to users. Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/Kconfig')
-rw-r--r--crypto/Kconfig17
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 320548b4..083e9ffc 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -639,6 +639,23 @@ config CRYPTO_XXHASH
xxHash non-cryptographic hash algorithm. Extremely fast, working at
speeds close to RAM limits.
+config CRYPTO_BLAKE2B
+ tristate "BLAKE2b digest algorithm"
+ select CRYPTO_HASH
+ help
+ Implementation of cryptographic hash function BLAKE2b (or just BLAKE2),
+ optimized for 64bit platforms and can produce digests of any size
+ between 1 to 64. The keyed hash is also implemented.
+
+ This module provides the following algorithms:
+
+ - blake2b-160
+ - blake2b-256
+ - blake2b-384
+ - blake2b-512
+
+ See https://blake2.net for further information.
+
config CRYPTO_CRCT10DIF
tristate "CRCT10DIF algorithm"
select CRYPTO_HASH