xref: /linux-6.15/lib/crypto/Kconfig (revision 7033b937)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Crypto library routines"
4
5config CRYPTO_LIB_UTILS
6	tristate
7
8config CRYPTO_LIB_AES
9	tristate
10
11config CRYPTO_LIB_ARC4
12	tristate
13
14config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
15	bool
16	help
17	  Declares whether the architecture provides an arch-specific
18	  accelerated implementation of the Blake2s library interface,
19	  either builtin or as a module.
20
21config CRYPTO_LIB_BLAKE2S_GENERIC
22	def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
23	help
24	  This symbol can be depended upon by arch implementations of the
25	  Blake2s library interface that require the generic code as a
26	  fallback, e.g., for SIMD implementations. If no arch specific
27	  implementation is enabled, this implementation serves the users
28	  of CRYPTO_LIB_BLAKE2S.
29
30config CRYPTO_ARCH_HAVE_LIB_CHACHA
31	tristate
32	help
33	  Declares whether the architecture provides an arch-specific
34	  accelerated implementation of the ChaCha library interface,
35	  either builtin or as a module.
36
37config CRYPTO_LIB_CHACHA_GENERIC
38	tristate
39	select XOR_BLOCKS
40	help
41	  This symbol can be depended upon by arch implementations of the
42	  ChaCha library interface that require the generic code as a
43	  fallback, e.g., for SIMD implementations. If no arch specific
44	  implementation is enabled, this implementation serves the users
45	  of CRYPTO_LIB_CHACHA.
46
47config CRYPTO_LIB_CHACHA
48	tristate "ChaCha library interface"
49	depends on CRYPTO
50	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
51	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
52	help
53	  Enable the ChaCha library interface. This interface may be fulfilled
54	  by either the generic implementation or an arch-specific one, if one
55	  is available and enabled.
56
57config CRYPTO_ARCH_HAVE_LIB_CURVE25519
58	tristate
59	help
60	  Declares whether the architecture provides an arch-specific
61	  accelerated implementation of the Curve25519 library interface,
62	  either builtin or as a module.
63
64config CRYPTO_LIB_CURVE25519_GENERIC
65	tristate
66	help
67	  This symbol can be depended upon by arch implementations of the
68	  Curve25519 library interface that require the generic code as a
69	  fallback, e.g., for SIMD implementations. If no arch specific
70	  implementation is enabled, this implementation serves the users
71	  of CRYPTO_LIB_CURVE25519.
72
73config CRYPTO_LIB_CURVE25519
74	tristate "Curve25519 scalar multiplication library"
75	depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
76	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
77	select CRYPTO_LIB_UTILS
78	help
79	  Enable the Curve25519 library interface. This interface may be
80	  fulfilled by either the generic implementation or an arch-specific
81	  one, if one is available and enabled.
82
83config CRYPTO_LIB_DES
84	tristate
85
86config CRYPTO_LIB_POLY1305_RSIZE
87	int
88	default 2 if MIPS
89	default 11 if X86_64
90	default 9 if ARM || ARM64
91	default 1
92
93config CRYPTO_ARCH_HAVE_LIB_POLY1305
94	tristate
95	help
96	  Declares whether the architecture provides an arch-specific
97	  accelerated implementation of the Poly1305 library interface,
98	  either builtin or as a module.
99
100config CRYPTO_LIB_POLY1305_GENERIC
101	tristate
102	help
103	  This symbol can be depended upon by arch implementations of the
104	  Poly1305 library interface that require the generic code as a
105	  fallback, e.g., for SIMD implementations. If no arch specific
106	  implementation is enabled, this implementation serves the users
107	  of CRYPTO_LIB_POLY1305.
108
109config CRYPTO_LIB_POLY1305
110	tristate "Poly1305 library interface"
111	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
112	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
113	help
114	  Enable the Poly1305 library interface. This interface may be fulfilled
115	  by either the generic implementation or an arch-specific one, if one
116	  is available and enabled.
117
118config CRYPTO_LIB_CHACHA20POLY1305
119	tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
120	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
121	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
122	depends on CRYPTO
123	select CRYPTO_LIB_CHACHA
124	select CRYPTO_LIB_POLY1305
125	select CRYPTO_ALGAPI
126
127config CRYPTO_LIB_SHA1
128	tristate
129
130config CRYPTO_LIB_SHA256
131	tristate
132
133endmenu
134