xref: /linux/lib/crypto/Kconfig (revision ed20078b7e3331e82828be357147af6a3282e4ce)
1746b2e02SArd Biesheuvel# SPDX-License-Identifier: GPL-2.0
2746b2e02SArd Biesheuvel
3746b2e02SArd Biesheuvelcomment "Crypto library routines"
4746b2e02SArd Biesheuvel
5746b2e02SArd Biesheuvelconfig CRYPTO_LIB_AES
6746b2e02SArd Biesheuvel	tristate
7746b2e02SArd Biesheuvel
8746b2e02SArd Biesheuvelconfig CRYPTO_LIB_ARC4
9746b2e02SArd Biesheuvel	tristate
10746b2e02SArd Biesheuvel
1166d7fb94SJason A. Donenfeldconfig CRYPTO_ARCH_HAVE_LIB_BLAKE2S
1266d7fb94SJason A. Donenfeld	tristate
1366d7fb94SJason A. Donenfeld	help
1466d7fb94SJason A. Donenfeld	  Declares whether the architecture provides an arch-specific
1566d7fb94SJason A. Donenfeld	  accelerated implementation of the Blake2s library interface,
1666d7fb94SJason A. Donenfeld	  either builtin or as a module.
1766d7fb94SJason A. Donenfeld
1866d7fb94SJason A. Donenfeldconfig CRYPTO_LIB_BLAKE2S_GENERIC
1966d7fb94SJason A. Donenfeld	tristate
2066d7fb94SJason A. Donenfeld	help
2166d7fb94SJason A. Donenfeld	  This symbol can be depended upon by arch implementations of the
2266d7fb94SJason A. Donenfeld	  Blake2s library interface that require the generic code as a
2366d7fb94SJason A. Donenfeld	  fallback, e.g., for SIMD implementations. If no arch specific
2466d7fb94SJason A. Donenfeld	  implementation is enabled, this implementation serves the users
2566d7fb94SJason A. Donenfeld	  of CRYPTO_LIB_BLAKE2S.
2666d7fb94SJason A. Donenfeld
2766d7fb94SJason A. Donenfeldconfig CRYPTO_LIB_BLAKE2S
2866d7fb94SJason A. Donenfeld	tristate "BLAKE2s hash function library"
2966d7fb94SJason A. Donenfeld	depends on CRYPTO_ARCH_HAVE_LIB_BLAKE2S || !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
3066d7fb94SJason A. Donenfeld	select CRYPTO_LIB_BLAKE2S_GENERIC if CRYPTO_ARCH_HAVE_LIB_BLAKE2S=n
3166d7fb94SJason A. Donenfeld	help
3266d7fb94SJason A. Donenfeld	  Enable the Blake2s library interface. This interface may be fulfilled
3366d7fb94SJason A. Donenfeld	  by either the generic implementation or an arch-specific one, if one
3466d7fb94SJason A. Donenfeld	  is available and enabled.
3566d7fb94SJason A. Donenfeld
365fb8ef25SArd Biesheuvelconfig CRYPTO_ARCH_HAVE_LIB_CHACHA
375fb8ef25SArd Biesheuvel	tristate
385fb8ef25SArd Biesheuvel	help
395fb8ef25SArd Biesheuvel	  Declares whether the architecture provides an arch-specific
405fb8ef25SArd Biesheuvel	  accelerated implementation of the ChaCha library interface,
415fb8ef25SArd Biesheuvel	  either builtin or as a module.
425fb8ef25SArd Biesheuvel
435fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA_GENERIC
445fb8ef25SArd Biesheuvel	tristate
455fb8ef25SArd Biesheuvel	select CRYPTO_ALGAPI
465fb8ef25SArd Biesheuvel	help
475fb8ef25SArd Biesheuvel	  This symbol can be depended upon by arch implementations of the
485fb8ef25SArd Biesheuvel	  ChaCha library interface that require the generic code as a
495fb8ef25SArd Biesheuvel	  fallback, e.g., for SIMD implementations. If no arch specific
505fb8ef25SArd Biesheuvel	  implementation is enabled, this implementation serves the users
515fb8ef25SArd Biesheuvel	  of CRYPTO_LIB_CHACHA.
525fb8ef25SArd Biesheuvel
535fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA
545fb8ef25SArd Biesheuvel	tristate "ChaCha library interface"
555fb8ef25SArd Biesheuvel	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
565fb8ef25SArd Biesheuvel	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
575fb8ef25SArd Biesheuvel	help
585fb8ef25SArd Biesheuvel	  Enable the ChaCha library interface. This interface may be fulfilled
595fb8ef25SArd Biesheuvel	  by either the generic implementation or an arch-specific one, if one
605fb8ef25SArd Biesheuvel	  is available and enabled.
615fb8ef25SArd Biesheuvel
620ed42a6fSJason A. Donenfeldconfig CRYPTO_ARCH_HAVE_LIB_CURVE25519
630ed42a6fSJason A. Donenfeld	tristate
640ed42a6fSJason A. Donenfeld	help
650ed42a6fSJason A. Donenfeld	  Declares whether the architecture provides an arch-specific
660ed42a6fSJason A. Donenfeld	  accelerated implementation of the Curve25519 library interface,
670ed42a6fSJason A. Donenfeld	  either builtin or as a module.
680ed42a6fSJason A. Donenfeld
690ed42a6fSJason A. Donenfeldconfig CRYPTO_LIB_CURVE25519_GENERIC
700ed42a6fSJason A. Donenfeld	tristate
710ed42a6fSJason A. Donenfeld	help
720ed42a6fSJason A. Donenfeld	  This symbol can be depended upon by arch implementations of the
730ed42a6fSJason A. Donenfeld	  Curve25519 library interface that require the generic code as a
740ed42a6fSJason A. Donenfeld	  fallback, e.g., for SIMD implementations. If no arch specific
750ed42a6fSJason A. Donenfeld	  implementation is enabled, this implementation serves the users
760ed42a6fSJason A. Donenfeld	  of CRYPTO_LIB_CURVE25519.
770ed42a6fSJason A. Donenfeld
780ed42a6fSJason A. Donenfeldconfig CRYPTO_LIB_CURVE25519
790ed42a6fSJason A. Donenfeld	tristate "Curve25519 scalar multiplication library"
800ed42a6fSJason A. Donenfeld	depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
810ed42a6fSJason A. Donenfeld	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
820ed42a6fSJason A. Donenfeld	help
830ed42a6fSJason A. Donenfeld	  Enable the Curve25519 library interface. This interface may be
840ed42a6fSJason A. Donenfeld	  fulfilled by either the generic implementation or an arch-specific
850ed42a6fSJason A. Donenfeld	  one, if one is available and enabled.
860ed42a6fSJason A. Donenfeld
87746b2e02SArd Biesheuvelconfig CRYPTO_LIB_DES
88746b2e02SArd Biesheuvel	tristate
89746b2e02SArd Biesheuvel
90a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305_RSIZE
91a1d93064SArd Biesheuvel	int
92a11d055eSArd Biesheuvel	default 2 if MIPS
93f0e89bcfSArd Biesheuvel	default 4 if X86_64
94a6b803b3SArd Biesheuvel	default 9 if ARM || ARM64
95a1d93064SArd Biesheuvel	default 1
96a1d93064SArd Biesheuvel
97a1d93064SArd Biesheuvelconfig CRYPTO_ARCH_HAVE_LIB_POLY1305
98a1d93064SArd Biesheuvel	tristate
99a1d93064SArd Biesheuvel	help
100a1d93064SArd Biesheuvel	  Declares whether the architecture provides an arch-specific
101a1d93064SArd Biesheuvel	  accelerated implementation of the Poly1305 library interface,
102a1d93064SArd Biesheuvel	  either builtin or as a module.
103a1d93064SArd Biesheuvel
10448ea8c6eSArd Biesheuvelconfig CRYPTO_LIB_POLY1305_GENERIC
10548ea8c6eSArd Biesheuvel	tristate
106a1d93064SArd Biesheuvel	help
107a1d93064SArd Biesheuvel	  This symbol can be depended upon by arch implementations of the
108a1d93064SArd Biesheuvel	  Poly1305 library interface that require the generic code as a
109a1d93064SArd Biesheuvel	  fallback, e.g., for SIMD implementations. If no arch specific
110a1d93064SArd Biesheuvel	  implementation is enabled, this implementation serves the users
111a1d93064SArd Biesheuvel	  of CRYPTO_LIB_POLY1305.
112a1d93064SArd Biesheuvel
113a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305
114a1d93064SArd Biesheuvel	tristate "Poly1305 library interface"
115a1d93064SArd Biesheuvel	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
116a1d93064SArd Biesheuvel	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
117a1d93064SArd Biesheuvel	help
118a1d93064SArd Biesheuvel	  Enable the Poly1305 library interface. This interface may be fulfilled
119a1d93064SArd Biesheuvel	  by either the generic implementation or an arch-specific one, if one
120a1d93064SArd Biesheuvel	  is available and enabled.
12148ea8c6eSArd Biesheuvel
122*ed20078bSArd Biesheuvelconfig CRYPTO_LIB_CHACHA20POLY1305
123*ed20078bSArd Biesheuvel	tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
124*ed20078bSArd Biesheuvel	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
125*ed20078bSArd Biesheuvel	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
126*ed20078bSArd Biesheuvel	select CRYPTO_LIB_CHACHA
127*ed20078bSArd Biesheuvel	select CRYPTO_LIB_POLY1305
128*ed20078bSArd Biesheuvel
129746b2e02SArd Biesheuvelconfig CRYPTO_LIB_SHA256
130746b2e02SArd Biesheuvel	tristate
131