diff options
author | Stephan Müller <smueller@chronox.de> | 2021-11-19 07:55:58 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-11-26 16:25:17 +1100 |
commit | 3422d95e2c3371bb2325141672b0c885a7049c90 (patch) | |
tree | aaee311158c57762b469ac0c9b87083094e9cce4 /crypto/Kconfig | |
parent | 9c758f9fab4451fd415356591b69591b3e072f39 (diff) | |
download | linux-crypto-3422d95e2c3371bb2325141672b0c885a7049c90.tar.gz linux-crypto-3422d95e2c3371bb2325141672b0c885a7049c90.zip |
crypto: kdf - add SP800-108 counter key derivation function
SP800-108 defines three KDFs - this patch provides the counter KDF
implementation.
The KDF is implemented as a service function where the caller has to
maintain the hash / HMAC state. Apart from this hash/HMAC state, no
additional state is required to be maintained by either the caller or
the KDF implementation.
The key for the KDF is set with the crypto_kdf108_setkey function which
is intended to be invoked before the caller requests a key derivation
operation via crypto_kdf108_ctr_generate.
SP800-108 allows the use of either a HMAC or a hash as crypto primitive
for the KDF. When a HMAC primtive is intended to be used,
crypto_kdf108_setkey must be used to set the HMAC key. Otherwise, for a
hash crypto primitve crypto_kdf108_ctr_generate can be used immediately
after allocating the hash handle.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/Kconfig')
-rw-r--r-- | crypto/Kconfig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 285f8264..01b9ca08 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1845,6 +1845,10 @@ config CRYPTO_JITTERENTROPY random numbers. This Jitterentropy RNG registers with the kernel crypto API and can be used by any caller. +config CRYPTO_KDF800108_CTR + tristate + select CRYPTO_HASH + config CRYPTO_USER_API tristate |