xref: /linux/lib/crypto/Kconfig (revision e5e0e6bebef3a21081fd1057c40468d4cff1a60d)
1746b2e02SArd Biesheuvel# SPDX-License-Identifier: GPL-2.0
2746b2e02SArd Biesheuvel
3e56e1898SJustin M. Forbesmenu "Crypto library routines"
4e56e1898SJustin M. Forbes
57033b937SEric Biggersconfig CRYPTO_LIB_UTILS
67033b937SEric Biggers	tristate
77033b937SEric Biggers
8746b2e02SArd Biesheuvelconfig CRYPTO_LIB_AES
9746b2e02SArd Biesheuvel	tristate
10746b2e02SArd Biesheuvel
11f1354404SArd Biesheuvelconfig CRYPTO_LIB_AESCFB
12f1354404SArd Biesheuvel	tristate
13f1354404SArd Biesheuvel	select CRYPTO_LIB_AES
14f1354404SArd Biesheuvel	select CRYPTO_LIB_UTILS
15f1354404SArd Biesheuvel
16520af5daSArd Biesheuvelconfig CRYPTO_LIB_AESGCM
17520af5daSArd Biesheuvel	tristate
18520af5daSArd Biesheuvel	select CRYPTO_LIB_AES
19520af5daSArd Biesheuvel	select CRYPTO_LIB_GF128MUL
20520af5daSArd Biesheuvel	select CRYPTO_LIB_UTILS
21520af5daSArd Biesheuvel
22746b2e02SArd Biesheuvelconfig CRYPTO_LIB_ARC4
23746b2e02SArd Biesheuvel	tristate
24746b2e02SArd Biesheuvel
2561c581a4SArd Biesheuvelconfig CRYPTO_LIB_GF128MUL
2661c581a4SArd Biesheuvel	tristate
2761c581a4SArd Biesheuvel
2866d7fb94SJason A. Donenfeldconfig CRYPTO_ARCH_HAVE_LIB_BLAKE2S
296048fdccSJason A. Donenfeld	bool
3066d7fb94SJason A. Donenfeld	help
3166d7fb94SJason A. Donenfeld	  Declares whether the architecture provides an arch-specific
3266d7fb94SJason A. Donenfeld	  accelerated implementation of the Blake2s library interface,
3366d7fb94SJason A. Donenfeld	  either builtin or as a module.
3466d7fb94SJason A. Donenfeld
3566d7fb94SJason A. Donenfeldconfig CRYPTO_LIB_BLAKE2S_GENERIC
366048fdccSJason A. Donenfeld	def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
3766d7fb94SJason A. Donenfeld	help
3866d7fb94SJason A. Donenfeld	  This symbol can be depended upon by arch implementations of the
3966d7fb94SJason A. Donenfeld	  Blake2s library interface that require the generic code as a
4066d7fb94SJason A. Donenfeld	  fallback, e.g., for SIMD implementations. If no arch specific
4166d7fb94SJason A. Donenfeld	  implementation is enabled, this implementation serves the users
4266d7fb94SJason A. Donenfeld	  of CRYPTO_LIB_BLAKE2S.
4366d7fb94SJason A. Donenfeld
445fb8ef25SArd Biesheuvelconfig CRYPTO_ARCH_HAVE_LIB_CHACHA
451047e21aSHerbert Xu	bool
465fb8ef25SArd Biesheuvel	help
475fb8ef25SArd Biesheuvel	  Declares whether the architecture provides an arch-specific
485fb8ef25SArd Biesheuvel	  accelerated implementation of the ChaCha library interface,
495fb8ef25SArd Biesheuvel	  either builtin or as a module.
505fb8ef25SArd Biesheuvel
515fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA_GENERIC
525fb8ef25SArd Biesheuvel	tristate
536e78ad0bSEric Biggers	select CRYPTO_LIB_UTILS
545fb8ef25SArd Biesheuvel	help
555fb8ef25SArd Biesheuvel	  This symbol can be depended upon by arch implementations of the
565fb8ef25SArd Biesheuvel	  ChaCha library interface that require the generic code as a
575fb8ef25SArd Biesheuvel	  fallback, e.g., for SIMD implementations. If no arch specific
585fb8ef25SArd Biesheuvel	  implementation is enabled, this implementation serves the users
595fb8ef25SArd Biesheuvel	  of CRYPTO_LIB_CHACHA.
605fb8ef25SArd Biesheuvel
6117ec3e71SHerbert Xuconfig CRYPTO_LIB_CHACHA_INTERNAL
6217ec3e71SHerbert Xu	tristate
6317ec3e71SHerbert Xu	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
6417ec3e71SHerbert Xu
655fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA
66*edc8e80bSArnd Bergmann	tristate
6717ec3e71SHerbert Xu	select CRYPTO
6817ec3e71SHerbert Xu	select CRYPTO_LIB_CHACHA_INTERNAL
695fb8ef25SArd Biesheuvel	help
705fb8ef25SArd Biesheuvel	  Enable the ChaCha library interface. This interface may be fulfilled
715fb8ef25SArd Biesheuvel	  by either the generic implementation or an arch-specific one, if one
725fb8ef25SArd Biesheuvel	  is available and enabled.
735fb8ef25SArd Biesheuvel
740ed42a6fSJason A. Donenfeldconfig CRYPTO_ARCH_HAVE_LIB_CURVE25519
751047e21aSHerbert Xu	bool
760ed42a6fSJason A. Donenfeld	help
770ed42a6fSJason A. Donenfeld	  Declares whether the architecture provides an arch-specific
780ed42a6fSJason A. Donenfeld	  accelerated implementation of the Curve25519 library interface,
790ed42a6fSJason A. Donenfeld	  either builtin or as a module.
800ed42a6fSJason A. Donenfeld
810ed42a6fSJason A. Donenfeldconfig CRYPTO_LIB_CURVE25519_GENERIC
820ed42a6fSJason A. Donenfeld	tristate
8317ec3e71SHerbert Xu	select CRYPTO_LIB_UTILS
840ed42a6fSJason A. Donenfeld	help
850ed42a6fSJason A. Donenfeld	  This symbol can be depended upon by arch implementations of the
860ed42a6fSJason A. Donenfeld	  Curve25519 library interface that require the generic code as a
870ed42a6fSJason A. Donenfeld	  fallback, e.g., for SIMD implementations. If no arch specific
880ed42a6fSJason A. Donenfeld	  implementation is enabled, this implementation serves the users
890ed42a6fSJason A. Donenfeld	  of CRYPTO_LIB_CURVE25519.
900ed42a6fSJason A. Donenfeld
9117ec3e71SHerbert Xuconfig CRYPTO_LIB_CURVE25519_INTERNAL
9217ec3e71SHerbert Xu	tristate
9317ec3e71SHerbert Xu	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
9417ec3e71SHerbert Xu
950ed42a6fSJason A. Donenfeldconfig CRYPTO_LIB_CURVE25519
96*edc8e80bSArnd Bergmann	tristate
9717ec3e71SHerbert Xu	select CRYPTO
9817ec3e71SHerbert Xu	select CRYPTO_LIB_CURVE25519_INTERNAL
990ed42a6fSJason A. Donenfeld	help
1000ed42a6fSJason A. Donenfeld	  Enable the Curve25519 library interface. This interface may be
1010ed42a6fSJason A. Donenfeld	  fulfilled by either the generic implementation or an arch-specific
1020ed42a6fSJason A. Donenfeld	  one, if one is available and enabled.
1030ed42a6fSJason A. Donenfeld
104746b2e02SArd Biesheuvelconfig CRYPTO_LIB_DES
105746b2e02SArd Biesheuvel	tristate
106746b2e02SArd Biesheuvel
107a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305_RSIZE
108a1d93064SArd Biesheuvel	int
109a11d055eSArd Biesheuvel	default 2 if MIPS
110d7d7b853SJason A. Donenfeld	default 11 if X86_64
111a6b803b3SArd Biesheuvel	default 9 if ARM || ARM64
112a1d93064SArd Biesheuvel	default 1
113a1d93064SArd Biesheuvel
114a1d93064SArd Biesheuvelconfig CRYPTO_ARCH_HAVE_LIB_POLY1305
1151047e21aSHerbert Xu	bool
116a1d93064SArd Biesheuvel	help
117a1d93064SArd Biesheuvel	  Declares whether the architecture provides an arch-specific
118a1d93064SArd Biesheuvel	  accelerated implementation of the Poly1305 library interface,
119a1d93064SArd Biesheuvel	  either builtin or as a module.
120a1d93064SArd Biesheuvel
12148ea8c6eSArd Biesheuvelconfig CRYPTO_LIB_POLY1305_GENERIC
12248ea8c6eSArd Biesheuvel	tristate
123a1d93064SArd Biesheuvel	help
124a1d93064SArd Biesheuvel	  This symbol can be depended upon by arch implementations of the
125a1d93064SArd Biesheuvel	  Poly1305 library interface that require the generic code as a
126a1d93064SArd Biesheuvel	  fallback, e.g., for SIMD implementations. If no arch specific
127a1d93064SArd Biesheuvel	  implementation is enabled, this implementation serves the users
128a1d93064SArd Biesheuvel	  of CRYPTO_LIB_POLY1305.
129a1d93064SArd Biesheuvel
13017ec3e71SHerbert Xuconfig CRYPTO_LIB_POLY1305_INTERNAL
13117ec3e71SHerbert Xu	tristate
13217ec3e71SHerbert Xu	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
13317ec3e71SHerbert Xu
134a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305
135*edc8e80bSArnd Bergmann	tristate
13617ec3e71SHerbert Xu	select CRYPTO
13717ec3e71SHerbert Xu	select CRYPTO_LIB_POLY1305_INTERNAL
138a1d93064SArd Biesheuvel	help
139a1d93064SArd Biesheuvel	  Enable the Poly1305 library interface. This interface may be fulfilled
140a1d93064SArd Biesheuvel	  by either the generic implementation or an arch-specific one, if one
141a1d93064SArd Biesheuvel	  is available and enabled.
14248ea8c6eSArd Biesheuvel
143ed20078bSArd Biesheuvelconfig CRYPTO_LIB_CHACHA20POLY1305
144*edc8e80bSArnd Bergmann	tristate
145ed20078bSArd Biesheuvel	select CRYPTO_LIB_CHACHA
146ed20078bSArd Biesheuvel	select CRYPTO_LIB_POLY1305
14717ec3e71SHerbert Xu	select CRYPTO_LIB_UTILS
148ed20078bSArd Biesheuvel
149ec8f7f48SEric Biggersconfig CRYPTO_LIB_SHA1
150ec8f7f48SEric Biggers	tristate
151ec8f7f48SEric Biggers
152746b2e02SArd Biesheuvelconfig CRYPTO_LIB_SHA256
153746b2e02SArd Biesheuvel	tristate
1542b31277aSTianjia Zhang
155e56e1898SJustin M. Forbesendmenu
156