xref: /linux/arch/x86/crypto/Kconfig (revision 6f7e6393d1ce636bb7ec77a7fe7b77458fddf701)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (x86)"
4
5config CRYPTO_AES_NI_INTEL
6	tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XCTR, XTS, GCM (AES-NI/VAES)"
7	select CRYPTO_AEAD
8	select CRYPTO_LIB_AES
9	select CRYPTO_LIB_GF128MUL
10	select CRYPTO_SKCIPHER
11	help
12	  AEAD cipher: AES with GCM
13	  Length-preserving ciphers: AES with ECB, CBC, CTS, CTR, XCTR, XTS
14
15	  Architecture: x86 (32-bit and 64-bit) using:
16	  - AES-NI (AES new instructions)
17	  - VAES (Vector AES)
18
19	  Some algorithm implementations are supported only in 64-bit builds,
20	  and some have additional prerequisites such as AVX2 or AVX512.
21
22config CRYPTO_BLOWFISH_X86_64
23	tristate "Ciphers: Blowfish, modes: ECB, CBC"
24	depends on 64BIT
25	select CRYPTO_SKCIPHER
26	select CRYPTO_BLOWFISH_COMMON
27	imply CRYPTO_CTR
28	help
29	  Block cipher: Blowfish cipher algorithm
30	  Length-preserving ciphers: Blowfish with ECB and CBC modes
31
32	  Architecture: x86_64
33
34config CRYPTO_CAMELLIA_X86_64
35	tristate "Ciphers: Camellia with modes: ECB, CBC"
36	depends on 64BIT
37	select CRYPTO_SKCIPHER
38	imply CRYPTO_CTR
39	help
40	  Block cipher: Camellia cipher algorithms
41	  Length-preserving ciphers: Camellia with ECB and CBC modes
42
43	  Architecture: x86_64
44
45config CRYPTO_CAMELLIA_AESNI_AVX_X86_64
46	tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX)"
47	depends on 64BIT
48	select CRYPTO_SKCIPHER
49	select CRYPTO_CAMELLIA_X86_64
50	imply CRYPTO_XTS
51	help
52	  Length-preserving ciphers: Camellia with ECB and CBC modes
53
54	  Architecture: x86_64 using:
55	  - AES-NI (AES New Instructions)
56	  - AVX (Advanced Vector Extensions)
57
58config CRYPTO_CAMELLIA_AESNI_AVX2_X86_64
59	tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX2)"
60	depends on 64BIT
61	select CRYPTO_CAMELLIA_AESNI_AVX_X86_64
62	help
63	  Length-preserving ciphers: Camellia with ECB and CBC modes
64
65	  Architecture: x86_64 using:
66	  - AES-NI (AES New Instructions)
67	  - AVX2 (Advanced Vector Extensions 2)
68
69config CRYPTO_CAST5_AVX_X86_64
70	tristate "Ciphers: CAST5 with modes: ECB, CBC (AVX)"
71	depends on 64BIT
72	select CRYPTO_SKCIPHER
73	select CRYPTO_CAST5
74	select CRYPTO_CAST_COMMON
75	imply CRYPTO_CTR
76	help
77	  Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm
78	  (RFC2144) with ECB and CBC modes
79
80	  Architecture: x86_64 using:
81	  - AVX (Advanced Vector Extensions)
82
83	  Processes 16 blocks in parallel.
84
85config CRYPTO_CAST6_AVX_X86_64
86	tristate "Ciphers: CAST6 with modes: ECB, CBC (AVX)"
87	depends on 64BIT
88	select CRYPTO_SKCIPHER
89	select CRYPTO_CAST6
90	select CRYPTO_CAST_COMMON
91	imply CRYPTO_XTS
92	imply CRYPTO_CTR
93	help
94	  Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm
95	  (RFC2612) with ECB and CBC modes
96
97	  Architecture: x86_64 using:
98	  - AVX (Advanced Vector Extensions)
99
100	  Processes eight blocks in parallel.
101
102config CRYPTO_DES3_EDE_X86_64
103	tristate "Ciphers: Triple DES EDE with modes: ECB, CBC"
104	depends on 64BIT
105	select CRYPTO_SKCIPHER
106	select CRYPTO_LIB_DES
107	imply CRYPTO_CTR
108	help
109	  Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
110	  Length-preserving ciphers: Triple DES EDE with ECB and CBC modes
111
112	  Architecture: x86_64
113
114	  Processes one or three blocks in parallel.
115
116config CRYPTO_SERPENT_SSE2_X86_64
117	tristate "Ciphers: Serpent with modes: ECB, CBC (SSE2)"
118	depends on 64BIT
119	select CRYPTO_SKCIPHER
120	select CRYPTO_SERPENT
121	imply CRYPTO_CTR
122	help
123	  Length-preserving ciphers: Serpent cipher algorithm
124	  with ECB and CBC modes
125
126	  Architecture: x86_64 using:
127	  - SSE2 (Streaming SIMD Extensions 2)
128
129	  Processes eight blocks in parallel.
130
131config CRYPTO_SERPENT_SSE2_586
132	tristate "Ciphers: Serpent with modes: ECB, CBC (32-bit with SSE2)"
133	depends on !64BIT
134	select CRYPTO_SKCIPHER
135	select CRYPTO_SERPENT
136	imply CRYPTO_CTR
137	help
138	  Length-preserving ciphers: Serpent cipher algorithm
139	  with ECB and CBC modes
140
141	  Architecture: x86 (32-bit) using:
142	  - SSE2 (Streaming SIMD Extensions 2)
143
144	  Processes four blocks in parallel.
145
146config CRYPTO_SERPENT_AVX_X86_64
147	tristate "Ciphers: Serpent with modes: ECB, CBC (AVX)"
148	depends on 64BIT
149	select CRYPTO_SKCIPHER
150	select CRYPTO_SERPENT
151	imply CRYPTO_XTS
152	imply CRYPTO_CTR
153	help
154	  Length-preserving ciphers: Serpent cipher algorithm
155	  with ECB and CBC modes
156
157	  Architecture: x86_64 using:
158	  - AVX (Advanced Vector Extensions)
159
160	  Processes eight blocks in parallel.
161
162config CRYPTO_SERPENT_AVX2_X86_64
163	tristate "Ciphers: Serpent with modes: ECB, CBC (AVX2)"
164	depends on 64BIT
165	select CRYPTO_SERPENT_AVX_X86_64
166	help
167	  Length-preserving ciphers: Serpent cipher algorithm
168	  with ECB and CBC modes
169
170	  Architecture: x86_64 using:
171	  - AVX2 (Advanced Vector Extensions 2)
172
173	  Processes 16 blocks in parallel.
174
175config CRYPTO_SM4_AESNI_AVX_X86_64
176	tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX)"
177	depends on 64BIT
178	select CRYPTO_SKCIPHER
179	select CRYPTO_ALGAPI
180	select CRYPTO_SM4
181	help
182	  Length-preserving ciphers: SM4 cipher algorithms
183	  (OSCCA GB/T 32907-2016) with ECB, CBC, and CTR modes
184
185	  Architecture: x86_64 using:
186	  - AES-NI (AES New Instructions)
187	  - AVX (Advanced Vector Extensions)
188
189	  Through two affine transforms,
190	  we can use the AES S-Box to simulate the SM4 S-Box to achieve the
191	  effect of instruction acceleration.
192
193	  If unsure, say N.
194
195config CRYPTO_SM4_AESNI_AVX2_X86_64
196	tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX2)"
197	depends on 64BIT
198	select CRYPTO_SKCIPHER
199	select CRYPTO_ALGAPI
200	select CRYPTO_SM4
201	select CRYPTO_SM4_AESNI_AVX_X86_64
202	help
203	  Length-preserving ciphers: SM4 cipher algorithms
204	  (OSCCA GB/T 32907-2016) with ECB, CBC, and CTR modes
205
206	  Architecture: x86_64 using:
207	  - AES-NI (AES New Instructions)
208	  - AVX2 (Advanced Vector Extensions 2)
209
210	  Through two affine transforms,
211	  we can use the AES S-Box to simulate the SM4 S-Box to achieve the
212	  effect of instruction acceleration.
213
214	  If unsure, say N.
215
216config CRYPTO_TWOFISH_586
217	tristate "Ciphers: Twofish (32-bit)"
218	depends on !64BIT
219	select CRYPTO_ALGAPI
220	select CRYPTO_TWOFISH_COMMON
221	imply CRYPTO_CTR
222	help
223	  Block cipher: Twofish cipher algorithm
224
225	  Architecture: x86 (32-bit)
226
227config CRYPTO_TWOFISH_X86_64
228	tristate "Ciphers: Twofish"
229	depends on 64BIT
230	select CRYPTO_ALGAPI
231	select CRYPTO_TWOFISH_COMMON
232	imply CRYPTO_CTR
233	help
234	  Block cipher: Twofish cipher algorithm
235
236	  Architecture: x86_64
237
238config CRYPTO_TWOFISH_X86_64_3WAY
239	tristate "Ciphers: Twofish with modes: ECB, CBC (3-way parallel)"
240	depends on 64BIT
241	select CRYPTO_SKCIPHER
242	select CRYPTO_TWOFISH_COMMON
243	select CRYPTO_TWOFISH_X86_64
244	help
245	  Length-preserving cipher: Twofish cipher algorithm
246	  with ECB and CBC modes
247
248	  Architecture: x86_64
249
250	  Processes three blocks in parallel, better utilizing resources of
251	  out-of-order CPUs.
252
253config CRYPTO_TWOFISH_AVX_X86_64
254	tristate "Ciphers: Twofish with modes: ECB, CBC (AVX)"
255	depends on 64BIT
256	select CRYPTO_SKCIPHER
257	select CRYPTO_TWOFISH_COMMON
258	select CRYPTO_TWOFISH_X86_64
259	select CRYPTO_TWOFISH_X86_64_3WAY
260	imply CRYPTO_XTS
261	help
262	  Length-preserving cipher: Twofish cipher algorithm
263	  with ECB and CBC modes
264
265	  Architecture: x86_64 using:
266	  - AVX (Advanced Vector Extensions)
267
268	  Processes eight blocks in parallel.
269
270config CRYPTO_ARIA_AESNI_AVX_X86_64
271	tristate "Ciphers: ARIA with modes: ECB, CTR (AES-NI/AVX/GFNI)"
272	depends on 64BIT
273	select CRYPTO_SKCIPHER
274	select CRYPTO_ALGAPI
275	select CRYPTO_ARIA
276	help
277	  Length-preserving cipher: ARIA cipher algorithms
278	  (RFC 5794) with ECB and CTR modes
279
280	  Architecture: x86_64 using:
281	  - AES-NI (AES New Instructions)
282	  - AVX (Advanced Vector Extensions)
283	  - GFNI (Galois Field New Instructions)
284
285	  Processes 16 blocks in parallel.
286
287config CRYPTO_ARIA_AESNI_AVX2_X86_64
288	tristate "Ciphers: ARIA with modes: ECB, CTR (AES-NI/AVX2/GFNI)"
289	depends on 64BIT
290	select CRYPTO_SKCIPHER
291	select CRYPTO_ALGAPI
292	select CRYPTO_ARIA
293	select CRYPTO_ARIA_AESNI_AVX_X86_64
294	help
295	  Length-preserving cipher: ARIA cipher algorithms
296	  (RFC 5794) with ECB and CTR modes
297
298	  Architecture: x86_64 using:
299	  - AES-NI (AES New Instructions)
300	  - AVX2 (Advanced Vector Extensions)
301	  - GFNI (Galois Field New Instructions)
302
303	  Processes 32 blocks in parallel.
304
305config CRYPTO_ARIA_GFNI_AVX512_X86_64
306	tristate "Ciphers: ARIA with modes: ECB, CTR (AVX512/GFNI)"
307	depends on 64BIT
308	select CRYPTO_SKCIPHER
309	select CRYPTO_ALGAPI
310	select CRYPTO_ARIA
311	select CRYPTO_ARIA_AESNI_AVX_X86_64
312	select CRYPTO_ARIA_AESNI_AVX2_X86_64
313	help
314	  Length-preserving cipher: ARIA cipher algorithms
315	  (RFC 5794) with ECB and CTR modes
316
317	  Architecture: x86_64 using:
318	  - AVX512 (Advanced Vector Extensions)
319	  - GFNI (Galois Field New Instructions)
320
321	  Processes 64 blocks in parallel.
322
323config CRYPTO_AEGIS128_AESNI_SSE2
324	tristate "AEAD ciphers: AEGIS-128 (AES-NI/SSE4.1)"
325	depends on 64BIT
326	select CRYPTO_AEAD
327	help
328	  AEGIS-128 AEAD algorithm
329
330	  Architecture: x86_64 using:
331	  - AES-NI (AES New Instructions)
332	  - SSE4.1 (Streaming SIMD Extensions 4.1)
333
334config CRYPTO_SM3_AVX_X86_64
335	tristate "Hash functions: SM3 (AVX)"
336	depends on 64BIT
337	select CRYPTO_HASH
338	select CRYPTO_LIB_SM3
339	help
340	  SM3 secure hash function as defined by OSCCA GM/T 0004-2012 SM3
341
342	  Architecture: x86_64 using:
343	  - AVX (Advanced Vector Extensions)
344
345	  If unsure, say N.
346
347config CRYPTO_GHASH_CLMUL_NI_INTEL
348	tristate "Hash functions: GHASH (CLMUL-NI)"
349	depends on 64BIT
350	select CRYPTO_CRYPTD
351	help
352	  GCM GHASH hash function (NIST SP800-38D)
353
354	  Architecture: x86_64 using:
355	  - CLMUL-NI (carry-less multiplication new instructions)
356
357endmenu
358