crypto: ahash - ensure statesize is non-zero
[linux-drm-fsl-dcu.git] / crypto / Kconfig
index 362905e7c841ff55b204891e9e93748f2cfea96e..b582ea7f78d3f4dd71d8effef93d5db0d3f8cf92 100644 (file)
@@ -48,6 +48,8 @@ config CRYPTO_AEAD
 config CRYPTO_AEAD2
        tristate
        select CRYPTO_ALGAPI2
+       select CRYPTO_NULL2
+       select CRYPTO_RNG2
 
 config CRYPTO_BLKCIPHER
        tristate
@@ -78,6 +80,10 @@ config CRYPTO_RNG2
        tristate
        select CRYPTO_ALGAPI2
 
+config CRYPTO_RNG_DEFAULT
+       tristate
+       select CRYPTO_DRBG_MENU
+
 config CRYPTO_PCOMP
        tristate
        select CRYPTO_PCOMP2
@@ -87,6 +93,23 @@ config CRYPTO_PCOMP2
        tristate
        select CRYPTO_ALGAPI2
 
+config CRYPTO_AKCIPHER2
+       tristate
+       select CRYPTO_ALGAPI2
+
+config CRYPTO_AKCIPHER
+       tristate
+       select CRYPTO_AKCIPHER2
+       select CRYPTO_ALGAPI
+
+config CRYPTO_RSA
+       tristate "RSA algorithm"
+       select CRYPTO_AKCIPHER
+       select MPILIB
+       select ASN1
+       help
+         Generic implementation of the RSA public key algorithm.
+
 config CRYPTO_MANAGER
        tristate "Cryptographic algorithm manager"
        select CRYPTO_MANAGER2
@@ -100,6 +123,7 @@ config CRYPTO_MANAGER2
        select CRYPTO_HASH2
        select CRYPTO_BLKCIPHER2
        select CRYPTO_PCOMP2
+       select CRYPTO_AKCIPHER2
 
 config CRYPTO_USER
        tristate "Userspace cryptographic algorithm configuration"
@@ -128,12 +152,16 @@ config CRYPTO_GF128MUL
 
 config CRYPTO_NULL
        tristate "Null algorithms"
-       select CRYPTO_ALGAPI
-       select CRYPTO_BLKCIPHER
-       select CRYPTO_HASH
+       select CRYPTO_NULL2
        help
          These are 'Null' algorithms, used by IPsec, which do nothing.
 
+config CRYPTO_NULL2
+       tristate
+       select CRYPTO_ALGAPI2
+       select CRYPTO_BLKCIPHER2
+       select CRYPTO_HASH2
+
 config CRYPTO_PCRYPT
        tristate "Parallel crypto engine"
        depends on SMP
@@ -178,6 +206,7 @@ config CRYPTO_AUTHENC
        select CRYPTO_BLKCIPHER
        select CRYPTO_MANAGER
        select CRYPTO_HASH
+       select CRYPTO_NULL
        help
          Authenc: Combined mode wrapper for IPsec.
          This is required for IPSec.
@@ -217,15 +246,39 @@ config CRYPTO_GCM
          Support for Galois/Counter Mode (GCM) and Galois Message
          Authentication Code (GMAC). Required for IPSec.
 
+config CRYPTO_CHACHA20POLY1305
+       tristate "ChaCha20-Poly1305 AEAD support"
+       select CRYPTO_CHACHA20
+       select CRYPTO_POLY1305
+       select CRYPTO_AEAD
+       help
+         ChaCha20-Poly1305 AEAD support, RFC7539.
+
+         Support for the AEAD wrapper using the ChaCha20 stream cipher combined
+         with the Poly1305 authenticator. It is defined in RFC7539 for use in
+         IETF protocols.
+
 config CRYPTO_SEQIV
        tristate "Sequence Number IV Generator"
        select CRYPTO_AEAD
        select CRYPTO_BLKCIPHER
-       select CRYPTO_RNG
+       select CRYPTO_NULL
+       select CRYPTO_RNG_DEFAULT
        help
          This IV generator generates an IV based on a sequence number by
          xoring it with a salt.  This algorithm is mainly useful for CTR
 
+config CRYPTO_ECHAINIV
+       tristate "Encrypted Chain IV Generator"
+       select CRYPTO_AEAD
+       select CRYPTO_NULL
+       select CRYPTO_RNG_DEFAULT
+       default m
+       help
+         This IV generator generates an IV based on the encryption of
+         a sequence number xored with a salt.  This is the default
+         algorithm for CBC.
+
 comment "Block modes"
 
 config CRYPTO_CBC
@@ -415,6 +468,27 @@ config CRYPTO_GHASH
        help
          GHASH is message digest algorithm for GCM (Galois/Counter Mode).
 
+config CRYPTO_POLY1305
+       tristate "Poly1305 authenticator algorithm"
+       help
+         Poly1305 authenticator algorithm, RFC7539.
+
+         Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
+         It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
+         in IETF protocols. This is the portable C implementation of Poly1305.
+
+config CRYPTO_POLY1305_X86_64
+       tristate "Poly1305 authenticator algorithm (x86_64/SSE2/AVX2)"
+       depends on X86 && 64BIT
+       select CRYPTO_POLY1305
+       help
+         Poly1305 authenticator algorithm, RFC7539.
+
+         Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
+         It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
+         in IETF protocols. This is the x86_64 assembler implementation using SIMD
+         instructions.
+
 config CRYPTO_MD4
        tristate "MD4 digest algorithm"
        select CRYPTO_HASH
@@ -1145,6 +1219,34 @@ config CRYPTO_SALSA20_X86_64
          The Salsa20 stream cipher algorithm is designed by Daniel J.
          Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html>
 
+config CRYPTO_CHACHA20
+       tristate "ChaCha20 cipher algorithm"
+       select CRYPTO_BLKCIPHER
+       help
+         ChaCha20 cipher algorithm, RFC7539.
+
+         ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
+         Bernstein and further specified in RFC7539 for use in IETF protocols.
+         This is the portable C implementation of ChaCha20.
+
+         See also:
+         <http://cr.yp.to/chacha/chacha-20080128.pdf>
+
+config CRYPTO_CHACHA20_X86_64
+       tristate "ChaCha20 cipher algorithm (x86_64/SSSE3/AVX2)"
+       depends on X86 && 64BIT
+       select CRYPTO_BLKCIPHER
+       select CRYPTO_CHACHA20
+       help
+         ChaCha20 cipher algorithm, RFC7539.
+
+         ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
+         Bernstein and further specified in RFC7539 for use in IETF protocols.
+         This is the x86_64 assembler implementation using SIMD instructions.
+
+         See also:
+         <http://cr.yp.to/chacha/chacha-20080128.pdf>
+
 config CRYPTO_SEED
        tristate "SEED cipher algorithm"
        select CRYPTO_ALGAPI
@@ -1412,10 +1514,9 @@ config CRYPTO_LZO
 
 config CRYPTO_842
        tristate "842 compression algorithm"
-       depends on CRYPTO_DEV_NX_COMPRESS
-       # 842 uses lzo if the hardware becomes unavailable
-       select LZO_COMPRESS
-       select LZO_DECOMPRESS
+       select CRYPTO_ALGAPI
+       select 842_COMPRESS
+       select 842_DECOMPRESS
        help
          This is the 842 algorithm.
 
@@ -1439,7 +1540,6 @@ comment "Random Number Generation"
 
 config CRYPTO_ANSI_CPRNG
        tristate "Pseudo Random Number Generation for Cryptographic modules"
-       default m
        select CRYPTO_AES
        select CRYPTO_RNG
        help
@@ -1457,15 +1557,14 @@ menuconfig CRYPTO_DRBG_MENU
 if CRYPTO_DRBG_MENU
 
 config CRYPTO_DRBG_HMAC
-       bool "Enable HMAC DRBG"
+       bool
        default y
        select CRYPTO_HMAC
-       help
-         Enable the HMAC DRBG variant as defined in NIST SP800-90A.
+       select CRYPTO_SHA256
 
 config CRYPTO_DRBG_HASH
        bool "Enable Hash DRBG"
-       select CRYPTO_HASH
+       select CRYPTO_SHA256
        help
          Enable the Hash DRBG variant as defined in NIST SP800-90A.
 
@@ -1477,11 +1576,21 @@ config CRYPTO_DRBG_CTR
 
 config CRYPTO_DRBG
        tristate
-       default CRYPTO_DRBG_MENU if (CRYPTO_DRBG_HMAC || CRYPTO_DRBG_HASH || CRYPTO_DRBG_CTR)
+       default CRYPTO_DRBG_MENU
        select CRYPTO_RNG
+       select CRYPTO_JITTERENTROPY
 
 endif  # if CRYPTO_DRBG_MENU
 
+config CRYPTO_JITTERENTROPY
+       tristate "Jitterentropy Non-Deterministic Random Number Generator"
+       help
+         The Jitterentropy RNG is a noise that is intended
+         to provide seed to another RNG. The RNG does not
+         perform any cryptographic whitening of the generated
+         random numbers. This Jitterentropy RNG registers with
+         the kernel crypto API and can be used by any caller.
+
 config CRYPTO_USER_API
        tristate
 
@@ -1512,6 +1621,15 @@ config CRYPTO_USER_API_RNG
          This option enables the user-spaces interface for random
          number generator algorithms.
 
+config CRYPTO_USER_API_AEAD
+       tristate "User-space interface for AEAD cipher algorithms"
+       depends on NET
+       select CRYPTO_AEAD
+       select CRYPTO_USER_API
+       help
+         This option enables the user-spaces interface for AEAD
+         cipher algorithms.
+
 config CRYPTO_HASH_INFO
        bool