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