xref: /linux/lib/crypto/Kconfig (revision edc8e80bf862a7282da017e7f16e63b52585c793)
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_AESCFB
12	tristate
13	select CRYPTO_LIB_AES
14	select CRYPTO_LIB_UTILS
15
16config CRYPTO_LIB_AESGCM
17	tristate
18	select CRYPTO_LIB_AES
19	select CRYPTO_LIB_GF128MUL
20	select CRYPTO_LIB_UTILS
21
22config CRYPTO_LIB_ARC4
23	tristate
24
25config CRYPTO_LIB_GF128MUL
26	tristate
27
28config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
29	bool
30	help
31	  Declares whether the architecture provides an arch-specific
32	  accelerated implementation of the Blake2s library interface,
33	  either builtin or as a module.
34
35config CRYPTO_LIB_BLAKE2S_GENERIC
36	def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
37	help
38	  This symbol can be depended upon by arch implementations of the
39	  Blake2s library interface that require the generic code as a
40	  fallback, e.g., for SIMD implementations. If no arch specific
41	  implementation is enabled, this implementation serves the users
42	  of CRYPTO_LIB_BLAKE2S.
43
44config CRYPTO_ARCH_HAVE_LIB_CHACHA
45	bool
46	help
47	  Declares whether the architecture provides an arch-specific
48	  accelerated implementation of the ChaCha library interface,
49	  either builtin or as a module.
50
51config CRYPTO_LIB_CHACHA_GENERIC
52	tristate
53	select CRYPTO_LIB_UTILS
54	help
55	  This symbol can be depended upon by arch implementations of the
56	  ChaCha library interface that require the generic code as a
57	  fallback, e.g., for SIMD implementations. If no arch specific
58	  implementation is enabled, this implementation serves the users
59	  of CRYPTO_LIB_CHACHA.
60
61config CRYPTO_LIB_CHACHA_INTERNAL
62	tristate
63	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
64
65config CRYPTO_LIB_CHACHA
66	tristate
67	select CRYPTO
68	select CRYPTO_LIB_CHACHA_INTERNAL
69	help
70	  Enable the ChaCha library interface. This interface may be fulfilled
71	  by either the generic implementation or an arch-specific one, if one
72	  is available and enabled.
73
74config CRYPTO_ARCH_HAVE_LIB_CURVE25519
75	bool
76	help
77	  Declares whether the architecture provides an arch-specific
78	  accelerated implementation of the Curve25519 library interface,
79	  either builtin or as a module.
80
81config CRYPTO_LIB_CURVE25519_GENERIC
82	tristate
83	select CRYPTO_LIB_UTILS
84	help
85	  This symbol can be depended upon by arch implementations of the
86	  Curve25519 library interface that require the generic code as a
87	  fallback, e.g., for SIMD implementations. If no arch specific
88	  implementation is enabled, this implementation serves the users
89	  of CRYPTO_LIB_CURVE25519.
90
91config CRYPTO_LIB_CURVE25519_INTERNAL
92	tristate
93	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
94
95config CRYPTO_LIB_CURVE25519
96	tristate
97	select CRYPTO
98	select CRYPTO_LIB_CURVE25519_INTERNAL
99	help
100	  Enable the Curve25519 library interface. This interface may be
101	  fulfilled by either the generic implementation or an arch-specific
102	  one, if one is available and enabled.
103
104config CRYPTO_LIB_DES
105	tristate
106
107config CRYPTO_LIB_POLY1305_RSIZE
108	int
109	default 2 if MIPS
110	default 11 if X86_64
111	default 9 if ARM || ARM64
112	default 1
113
114config CRYPTO_ARCH_HAVE_LIB_POLY1305
115	bool
116	help
117	  Declares whether the architecture provides an arch-specific
118	  accelerated implementation of the Poly1305 library interface,
119	  either builtin or as a module.
120
121config CRYPTO_LIB_POLY1305_GENERIC
122	tristate
123	help
124	  This symbol can be depended upon by arch implementations of the
125	  Poly1305 library interface that require the generic code as a
126	  fallback, e.g., for SIMD implementations. If no arch specific
127	  implementation is enabled, this implementation serves the users
128	  of CRYPTO_LIB_POLY1305.
129
130config CRYPTO_LIB_POLY1305_INTERNAL
131	tristate
132	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
133
134config CRYPTO_LIB_POLY1305
135	tristate
136	select CRYPTO
137	select CRYPTO_LIB_POLY1305_INTERNAL
138	help
139	  Enable the Poly1305 library interface. This interface may be fulfilled
140	  by either the generic implementation or an arch-specific one, if one
141	  is available and enabled.
142
143config CRYPTO_LIB_CHACHA20POLY1305
144	tristate
145	select CRYPTO_LIB_CHACHA
146	select CRYPTO_LIB_POLY1305
147	select CRYPTO_LIB_UTILS
148
149config CRYPTO_LIB_SHA1
150	tristate
151
152config CRYPTO_LIB_SHA256
153	tristate
154
155endmenu
156