xref: /kernel/linux/linux-6.6/lib/crypto/Kconfig (revision 62306a36)
162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_cimenu "Crypto library routines"
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciconfig CRYPTO_LIB_UTILS
662306a36Sopenharmony_ci	tristate
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciconfig CRYPTO_LIB_AES
962306a36Sopenharmony_ci	tristate
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciconfig CRYPTO_LIB_AESGCM
1262306a36Sopenharmony_ci	tristate
1362306a36Sopenharmony_ci	select CRYPTO_LIB_AES
1462306a36Sopenharmony_ci	select CRYPTO_LIB_GF128MUL
1562306a36Sopenharmony_ci	select CRYPTO_LIB_UTILS
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciconfig CRYPTO_LIB_ARC4
1862306a36Sopenharmony_ci	tristate
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciconfig CRYPTO_LIB_GF128MUL
2162306a36Sopenharmony_ci	tristate
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciconfig CRYPTO_ARCH_HAVE_LIB_BLAKE2S
2462306a36Sopenharmony_ci	bool
2562306a36Sopenharmony_ci	help
2662306a36Sopenharmony_ci	  Declares whether the architecture provides an arch-specific
2762306a36Sopenharmony_ci	  accelerated implementation of the Blake2s library interface,
2862306a36Sopenharmony_ci	  either builtin or as a module.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciconfig CRYPTO_LIB_BLAKE2S_GENERIC
3162306a36Sopenharmony_ci	def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
3262306a36Sopenharmony_ci	help
3362306a36Sopenharmony_ci	  This symbol can be depended upon by arch implementations of the
3462306a36Sopenharmony_ci	  Blake2s library interface that require the generic code as a
3562306a36Sopenharmony_ci	  fallback, e.g., for SIMD implementations. If no arch specific
3662306a36Sopenharmony_ci	  implementation is enabled, this implementation serves the users
3762306a36Sopenharmony_ci	  of CRYPTO_LIB_BLAKE2S.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciconfig CRYPTO_ARCH_HAVE_LIB_CHACHA
4062306a36Sopenharmony_ci	tristate
4162306a36Sopenharmony_ci	help
4262306a36Sopenharmony_ci	  Declares whether the architecture provides an arch-specific
4362306a36Sopenharmony_ci	  accelerated implementation of the ChaCha library interface,
4462306a36Sopenharmony_ci	  either builtin or as a module.
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciconfig CRYPTO_LIB_CHACHA_GENERIC
4762306a36Sopenharmony_ci	tristate
4862306a36Sopenharmony_ci	select CRYPTO_LIB_UTILS
4962306a36Sopenharmony_ci	help
5062306a36Sopenharmony_ci	  This symbol can be depended upon by arch implementations of the
5162306a36Sopenharmony_ci	  ChaCha library interface that require the generic code as a
5262306a36Sopenharmony_ci	  fallback, e.g., for SIMD implementations. If no arch specific
5362306a36Sopenharmony_ci	  implementation is enabled, this implementation serves the users
5462306a36Sopenharmony_ci	  of CRYPTO_LIB_CHACHA.
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciconfig CRYPTO_LIB_CHACHA
5762306a36Sopenharmony_ci	tristate "ChaCha library interface"
5862306a36Sopenharmony_ci	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
5962306a36Sopenharmony_ci	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
6062306a36Sopenharmony_ci	help
6162306a36Sopenharmony_ci	  Enable the ChaCha library interface. This interface may be fulfilled
6262306a36Sopenharmony_ci	  by either the generic implementation or an arch-specific one, if one
6362306a36Sopenharmony_ci	  is available and enabled.
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciconfig CRYPTO_ARCH_HAVE_LIB_CURVE25519
6662306a36Sopenharmony_ci	tristate
6762306a36Sopenharmony_ci	help
6862306a36Sopenharmony_ci	  Declares whether the architecture provides an arch-specific
6962306a36Sopenharmony_ci	  accelerated implementation of the Curve25519 library interface,
7062306a36Sopenharmony_ci	  either builtin or as a module.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciconfig CRYPTO_LIB_CURVE25519_GENERIC
7362306a36Sopenharmony_ci	tristate
7462306a36Sopenharmony_ci	help
7562306a36Sopenharmony_ci	  This symbol can be depended upon by arch implementations of the
7662306a36Sopenharmony_ci	  Curve25519 library interface that require the generic code as a
7762306a36Sopenharmony_ci	  fallback, e.g., for SIMD implementations. If no arch specific
7862306a36Sopenharmony_ci	  implementation is enabled, this implementation serves the users
7962306a36Sopenharmony_ci	  of CRYPTO_LIB_CURVE25519.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciconfig CRYPTO_LIB_CURVE25519
8262306a36Sopenharmony_ci	tristate "Curve25519 scalar multiplication library"
8362306a36Sopenharmony_ci	depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
8462306a36Sopenharmony_ci	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
8562306a36Sopenharmony_ci	select CRYPTO_LIB_UTILS
8662306a36Sopenharmony_ci	help
8762306a36Sopenharmony_ci	  Enable the Curve25519 library interface. This interface may be
8862306a36Sopenharmony_ci	  fulfilled by either the generic implementation or an arch-specific
8962306a36Sopenharmony_ci	  one, if one is available and enabled.
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciconfig CRYPTO_LIB_DES
9262306a36Sopenharmony_ci	tristate
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ciconfig CRYPTO_LIB_POLY1305_RSIZE
9562306a36Sopenharmony_ci	int
9662306a36Sopenharmony_ci	default 2 if MIPS
9762306a36Sopenharmony_ci	default 11 if X86_64
9862306a36Sopenharmony_ci	default 9 if ARM || ARM64
9962306a36Sopenharmony_ci	default 1
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ciconfig CRYPTO_ARCH_HAVE_LIB_POLY1305
10262306a36Sopenharmony_ci	tristate
10362306a36Sopenharmony_ci	help
10462306a36Sopenharmony_ci	  Declares whether the architecture provides an arch-specific
10562306a36Sopenharmony_ci	  accelerated implementation of the Poly1305 library interface,
10662306a36Sopenharmony_ci	  either builtin or as a module.
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciconfig CRYPTO_LIB_POLY1305_GENERIC
10962306a36Sopenharmony_ci	tristate
11062306a36Sopenharmony_ci	help
11162306a36Sopenharmony_ci	  This symbol can be depended upon by arch implementations of the
11262306a36Sopenharmony_ci	  Poly1305 library interface that require the generic code as a
11362306a36Sopenharmony_ci	  fallback, e.g., for SIMD implementations. If no arch specific
11462306a36Sopenharmony_ci	  implementation is enabled, this implementation serves the users
11562306a36Sopenharmony_ci	  of CRYPTO_LIB_POLY1305.
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ciconfig CRYPTO_LIB_POLY1305
11862306a36Sopenharmony_ci	tristate "Poly1305 library interface"
11962306a36Sopenharmony_ci	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
12062306a36Sopenharmony_ci	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
12162306a36Sopenharmony_ci	help
12262306a36Sopenharmony_ci	  Enable the Poly1305 library interface. This interface may be fulfilled
12362306a36Sopenharmony_ci	  by either the generic implementation or an arch-specific one, if one
12462306a36Sopenharmony_ci	  is available and enabled.
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ciconfig CRYPTO_LIB_CHACHA20POLY1305
12762306a36Sopenharmony_ci	tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
12862306a36Sopenharmony_ci	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
12962306a36Sopenharmony_ci	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
13062306a36Sopenharmony_ci	depends on CRYPTO
13162306a36Sopenharmony_ci	select CRYPTO_LIB_CHACHA
13262306a36Sopenharmony_ci	select CRYPTO_LIB_POLY1305
13362306a36Sopenharmony_ci	select CRYPTO_ALGAPI
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ciconfig CRYPTO_LIB_SHA1
13662306a36Sopenharmony_ci	tristate
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ciconfig CRYPTO_LIB_SHA256
13962306a36Sopenharmony_ci	tristate
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ciendmenu
142