xref: /linux-6.15/lib/crypto/Kconfig (revision 66d7fb94)
1# SPDX-License-Identifier: GPL-2.0
2
3comment "Crypto library routines"
4
5config CRYPTO_LIB_AES
6	tristate
7
8config CRYPTO_LIB_ARC4
9	tristate
10
11config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
12	tristate
13	help
14	  Declares whether the architecture provides an arch-specific
15	  accelerated implementation of the Blake2s library interface,
16	  either builtin or as a module.
17
18config CRYPTO_LIB_BLAKE2S_GENERIC
19	tristate
20	help
21	  This symbol can be depended upon by arch implementations of the
22	  Blake2s library interface that require the generic code as a
23	  fallback, e.g., for SIMD implementations. If no arch specific
24	  implementation is enabled, this implementation serves the users
25	  of CRYPTO_LIB_BLAKE2S.
26
27config CRYPTO_LIB_BLAKE2S
28	tristate "BLAKE2s hash function library"
29	depends on CRYPTO_ARCH_HAVE_LIB_BLAKE2S || !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
30	select CRYPTO_LIB_BLAKE2S_GENERIC if CRYPTO_ARCH_HAVE_LIB_BLAKE2S=n
31	help
32	  Enable the Blake2s library interface. This interface may be fulfilled
33	  by either the generic implementation or an arch-specific one, if one
34	  is available and enabled.
35
36config CRYPTO_ARCH_HAVE_LIB_CHACHA
37	tristate
38	help
39	  Declares whether the architecture provides an arch-specific
40	  accelerated implementation of the ChaCha library interface,
41	  either builtin or as a module.
42
43config CRYPTO_LIB_CHACHA_GENERIC
44	tristate
45	select CRYPTO_ALGAPI
46	help
47	  This symbol can be depended upon by arch implementations of the
48	  ChaCha library interface that require the generic code as a
49	  fallback, e.g., for SIMD implementations. If no arch specific
50	  implementation is enabled, this implementation serves the users
51	  of CRYPTO_LIB_CHACHA.
52
53config CRYPTO_LIB_CHACHA
54	tristate "ChaCha library interface"
55	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
56	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
57	help
58	  Enable the ChaCha library interface. This interface may be fulfilled
59	  by either the generic implementation or an arch-specific one, if one
60	  is available and enabled.
61
62config CRYPTO_LIB_DES
63	tristate
64
65config CRYPTO_LIB_POLY1305_RSIZE
66	int
67	default 2 if MIPS
68	default 4 if X86_64
69	default 9 if ARM || ARM64
70	default 1
71
72config CRYPTO_ARCH_HAVE_LIB_POLY1305
73	tristate
74	help
75	  Declares whether the architecture provides an arch-specific
76	  accelerated implementation of the Poly1305 library interface,
77	  either builtin or as a module.
78
79config CRYPTO_LIB_POLY1305_GENERIC
80	tristate
81	help
82	  This symbol can be depended upon by arch implementations of the
83	  Poly1305 library interface that require the generic code as a
84	  fallback, e.g., for SIMD implementations. If no arch specific
85	  implementation is enabled, this implementation serves the users
86	  of CRYPTO_LIB_POLY1305.
87
88config CRYPTO_LIB_POLY1305
89	tristate "Poly1305 library interface"
90	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
91	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
92	help
93	  Enable the Poly1305 library interface. This interface may be fulfilled
94	  by either the generic implementation or an arch-specific one, if one
95	  is available and enabled.
96
97config CRYPTO_LIB_SHA256
98	tristate
99