xref: /linux/arch/x86/crypto/Kconfig (revision 4b132aacb0768ac1e652cf517097ea6f237214b9)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (x86)"
4
5config CRYPTO_CURVE25519_X86
6	tristate "Public key crypto: Curve25519 (ADX)"
7	depends on X86 && 64BIT
8	select CRYPTO_LIB_CURVE25519_GENERIC
9	select CRYPTO_ARCH_HAVE_LIB_CURVE25519
10	help
11	  Curve25519 algorithm
12
13	  Architecture: x86_64 using:
14	  - ADX (large integer arithmetic)
15
16config CRYPTO_AES_NI_INTEL
17	tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XTR, XTS, GCM (AES-NI)"
18	depends on X86
19	select CRYPTO_AEAD
20	select CRYPTO_LIB_AES
21	select CRYPTO_LIB_GF128MUL
22	select CRYPTO_ALGAPI
23	select CRYPTO_SKCIPHER
24	select CRYPTO_SIMD
25	help
26	  Block cipher: AES cipher algorithms
27	  AEAD cipher: AES with GCM
28	  Length-preserving ciphers: AES with ECB, CBC, CTS, CTR, XTR, XTS
29
30	  Architecture: x86 (32-bit and 64-bit) using:
31	  - AES-NI (AES new instructions)
32
33config CRYPTO_BLOWFISH_X86_64
34	tristate "Ciphers: Blowfish, modes: ECB, CBC"
35	depends on X86 && 64BIT
36	select CRYPTO_SKCIPHER
37	select CRYPTO_BLOWFISH_COMMON
38	imply CRYPTO_CTR
39	help
40	  Block cipher: Blowfish cipher algorithm
41	  Length-preserving ciphers: Blowfish with ECB and CBC modes
42
43	  Architecture: x86_64
44
45config CRYPTO_CAMELLIA_X86_64
46	tristate "Ciphers: Camellia with modes: ECB, CBC"
47	depends on X86 && 64BIT
48	select CRYPTO_SKCIPHER
49	imply CRYPTO_CTR
50	help
51	  Block cipher: Camellia cipher algorithms
52	  Length-preserving ciphers: Camellia with ECB and CBC modes
53
54	  Architecture: x86_64
55
56config CRYPTO_CAMELLIA_AESNI_AVX_X86_64
57	tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX)"
58	depends on X86 && 64BIT
59	select CRYPTO_SKCIPHER
60	select CRYPTO_CAMELLIA_X86_64
61	select CRYPTO_SIMD
62	imply CRYPTO_XTS
63	help
64	  Length-preserving ciphers: Camellia with ECB and CBC modes
65
66	  Architecture: x86_64 using:
67	  - AES-NI (AES New Instructions)
68	  - AVX (Advanced Vector Extensions)
69
70config CRYPTO_CAMELLIA_AESNI_AVX2_X86_64
71	tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX2)"
72	depends on X86 && 64BIT
73	select CRYPTO_CAMELLIA_AESNI_AVX_X86_64
74	help
75	  Length-preserving ciphers: Camellia with ECB and CBC modes
76
77	  Architecture: x86_64 using:
78	  - AES-NI (AES New Instructions)
79	  - AVX2 (Advanced Vector Extensions 2)
80
81config CRYPTO_CAST5_AVX_X86_64
82	tristate "Ciphers: CAST5 with modes: ECB, CBC (AVX)"
83	depends on X86 && 64BIT
84	select CRYPTO_SKCIPHER
85	select CRYPTO_CAST5
86	select CRYPTO_CAST_COMMON
87	select CRYPTO_SIMD
88	imply CRYPTO_CTR
89	help
90	  Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm
91	  (RFC2144) with ECB and CBC modes
92
93	  Architecture: x86_64 using:
94	  - AVX (Advanced Vector Extensions)
95
96	  Processes 16 blocks in parallel.
97
98config CRYPTO_CAST6_AVX_X86_64
99	tristate "Ciphers: CAST6 with modes: ECB, CBC (AVX)"
100	depends on X86 && 64BIT
101	select CRYPTO_SKCIPHER
102	select CRYPTO_CAST6
103	select CRYPTO_CAST_COMMON
104	select CRYPTO_SIMD
105	imply CRYPTO_XTS
106	imply CRYPTO_CTR
107	help
108	  Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm
109	  (RFC2612) with ECB and CBC modes
110
111	  Architecture: x86_64 using:
112	  - AVX (Advanced Vector Extensions)
113
114	  Processes eight blocks in parallel.
115
116config CRYPTO_DES3_EDE_X86_64
117	tristate "Ciphers: Triple DES EDE with modes: ECB, CBC"
118	depends on X86 && 64BIT
119	select CRYPTO_SKCIPHER
120	select CRYPTO_LIB_DES
121	imply CRYPTO_CTR
122	help
123	  Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
124	  Length-preserving ciphers: Triple DES EDE with ECB and CBC modes
125
126	  Architecture: x86_64
127
128	  Processes one or three blocks in parallel.
129
130config CRYPTO_SERPENT_SSE2_X86_64
131	tristate "Ciphers: Serpent with modes: ECB, CBC (SSE2)"
132	depends on X86 && 64BIT
133	select CRYPTO_SKCIPHER
134	select CRYPTO_SERPENT
135	select CRYPTO_SIMD
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 X86 && !64BIT
149	select CRYPTO_SKCIPHER
150	select CRYPTO_SERPENT
151	select CRYPTO_SIMD
152	imply CRYPTO_CTR
153	help
154	  Length-preserving ciphers: Serpent cipher algorithm
155	  with ECB and CBC modes
156
157	  Architecture: x86 (32-bit) using:
158	  - SSE2 (Streaming SIMD Extensions 2)
159
160	  Processes four blocks in parallel.
161
162config CRYPTO_SERPENT_AVX_X86_64
163	tristate "Ciphers: Serpent with modes: ECB, CBC (AVX)"
164	depends on X86 && 64BIT
165	select CRYPTO_SKCIPHER
166	select CRYPTO_SERPENT
167	select CRYPTO_SIMD
168	imply CRYPTO_XTS
169	imply CRYPTO_CTR
170	help
171	  Length-preserving ciphers: Serpent cipher algorithm
172	  with ECB and CBC modes
173
174	  Architecture: x86_64 using:
175	  - AVX (Advanced Vector Extensions)
176
177	  Processes eight blocks in parallel.
178
179config CRYPTO_SERPENT_AVX2_X86_64
180	tristate "Ciphers: Serpent with modes: ECB, CBC (AVX2)"
181	depends on X86 && 64BIT
182	select CRYPTO_SERPENT_AVX_X86_64
183	help
184	  Length-preserving ciphers: Serpent cipher algorithm
185	  with ECB and CBC modes
186
187	  Architecture: x86_64 using:
188	  - AVX2 (Advanced Vector Extensions 2)
189
190	  Processes 16 blocks in parallel.
191
192config CRYPTO_SM4_AESNI_AVX_X86_64
193	tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX)"
194	depends on X86 && 64BIT
195	select CRYPTO_SKCIPHER
196	select CRYPTO_SIMD
197	select CRYPTO_ALGAPI
198	select CRYPTO_SM4
199	help
200	  Length-preserving ciphers: SM4 cipher algorithms
201	  (OSCCA GB/T 32907-2016) with ECB, CBC, and CTR modes
202
203	  Architecture: x86_64 using:
204	  - AES-NI (AES New Instructions)
205	  - AVX (Advanced Vector Extensions)
206
207	  Through two affine transforms,
208	  we can use the AES S-Box to simulate the SM4 S-Box to achieve the
209	  effect of instruction acceleration.
210
211	  If unsure, say N.
212
213config CRYPTO_SM4_AESNI_AVX2_X86_64
214	tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX2)"
215	depends on X86 && 64BIT
216	select CRYPTO_SKCIPHER
217	select CRYPTO_SIMD
218	select CRYPTO_ALGAPI
219	select CRYPTO_SM4
220	select CRYPTO_SM4_AESNI_AVX_X86_64
221	help
222	  Length-preserving ciphers: SM4 cipher algorithms
223	  (OSCCA GB/T 32907-2016) with ECB, CBC, and CTR modes
224
225	  Architecture: x86_64 using:
226	  - AES-NI (AES New Instructions)
227	  - AVX2 (Advanced Vector Extensions 2)
228
229	  Through two affine transforms,
230	  we can use the AES S-Box to simulate the SM4 S-Box to achieve the
231	  effect of instruction acceleration.
232
233	  If unsure, say N.
234
235config CRYPTO_TWOFISH_586
236	tristate "Ciphers: Twofish (32-bit)"
237	depends on (X86 || UML_X86) && !64BIT
238	select CRYPTO_ALGAPI
239	select CRYPTO_TWOFISH_COMMON
240	imply CRYPTO_CTR
241	help
242	  Block cipher: Twofish cipher algorithm
243
244	  Architecture: x86 (32-bit)
245
246config CRYPTO_TWOFISH_X86_64
247	tristate "Ciphers: Twofish"
248	depends on (X86 || UML_X86) && 64BIT
249	select CRYPTO_ALGAPI
250	select CRYPTO_TWOFISH_COMMON
251	imply CRYPTO_CTR
252	help
253	  Block cipher: Twofish cipher algorithm
254
255	  Architecture: x86_64
256
257config CRYPTO_TWOFISH_X86_64_3WAY
258	tristate "Ciphers: Twofish with modes: ECB, CBC (3-way parallel)"
259	depends on X86 && 64BIT
260	select CRYPTO_SKCIPHER
261	select CRYPTO_TWOFISH_COMMON
262	select CRYPTO_TWOFISH_X86_64
263	help
264	  Length-preserving cipher: Twofish cipher algorithm
265	  with ECB and CBC modes
266
267	  Architecture: x86_64
268
269	  Processes three blocks in parallel, better utilizing resources of
270	  out-of-order CPUs.
271
272config CRYPTO_TWOFISH_AVX_X86_64
273	tristate "Ciphers: Twofish with modes: ECB, CBC (AVX)"
274	depends on X86 && 64BIT
275	select CRYPTO_SKCIPHER
276	select CRYPTO_SIMD
277	select CRYPTO_TWOFISH_COMMON
278	select CRYPTO_TWOFISH_X86_64
279	select CRYPTO_TWOFISH_X86_64_3WAY
280	imply CRYPTO_XTS
281	help
282	  Length-preserving cipher: Twofish cipher algorithm
283	  with ECB and CBC modes
284
285	  Architecture: x86_64 using:
286	  - AVX (Advanced Vector Extensions)
287
288	  Processes eight blocks in parallel.
289
290config CRYPTO_ARIA_AESNI_AVX_X86_64
291	tristate "Ciphers: ARIA with modes: ECB, CTR (AES-NI/AVX/GFNI)"
292	depends on X86 && 64BIT
293	select CRYPTO_SKCIPHER
294	select CRYPTO_SIMD
295	select CRYPTO_ALGAPI
296	select CRYPTO_ARIA
297	help
298	  Length-preserving cipher: ARIA cipher algorithms
299	  (RFC 5794) with ECB and CTR modes
300
301	  Architecture: x86_64 using:
302	  - AES-NI (AES New Instructions)
303	  - AVX (Advanced Vector Extensions)
304	  - GFNI (Galois Field New Instructions)
305
306	  Processes 16 blocks in parallel.
307
308config CRYPTO_ARIA_AESNI_AVX2_X86_64
309	tristate "Ciphers: ARIA with modes: ECB, CTR (AES-NI/AVX2/GFNI)"
310	depends on X86 && 64BIT
311	select CRYPTO_SKCIPHER
312	select CRYPTO_SIMD
313	select CRYPTO_ALGAPI
314	select CRYPTO_ARIA
315	select CRYPTO_ARIA_AESNI_AVX_X86_64
316	help
317	  Length-preserving cipher: ARIA cipher algorithms
318	  (RFC 5794) with ECB and CTR modes
319
320	  Architecture: x86_64 using:
321	  - AES-NI (AES New Instructions)
322	  - AVX2 (Advanced Vector Extensions)
323	  - GFNI (Galois Field New Instructions)
324
325	  Processes 32 blocks in parallel.
326
327config CRYPTO_ARIA_GFNI_AVX512_X86_64
328	tristate "Ciphers: ARIA with modes: ECB, CTR (AVX512/GFNI)"
329	depends on X86 && 64BIT && AS_AVX512 && AS_GFNI
330	select CRYPTO_SKCIPHER
331	select CRYPTO_SIMD
332	select CRYPTO_ALGAPI
333	select CRYPTO_ARIA
334	select CRYPTO_ARIA_AESNI_AVX_X86_64
335	select CRYPTO_ARIA_AESNI_AVX2_X86_64
336	help
337	  Length-preserving cipher: ARIA cipher algorithms
338	  (RFC 5794) with ECB and CTR modes
339
340	  Architecture: x86_64 using:
341	  - AVX512 (Advanced Vector Extensions)
342	  - GFNI (Galois Field New Instructions)
343
344	  Processes 64 blocks in parallel.
345
346config CRYPTO_CHACHA20_X86_64
347	tristate "Ciphers: ChaCha20, XChaCha20, XChaCha12 (SSSE3/AVX2/AVX-512VL)"
348	depends on X86 && 64BIT
349	select CRYPTO_SKCIPHER
350	select CRYPTO_LIB_CHACHA_GENERIC
351	select CRYPTO_ARCH_HAVE_LIB_CHACHA
352	help
353	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
354	  stream cipher algorithms
355
356	  Architecture: x86_64 using:
357	  - SSSE3 (Supplemental SSE3)
358	  - AVX2 (Advanced Vector Extensions 2)
359	  - AVX-512VL (Advanced Vector Extensions-512VL)
360
361config CRYPTO_AEGIS128_AESNI_SSE2
362	tristate "AEAD ciphers: AEGIS-128 (AES-NI/SSE2)"
363	depends on X86 && 64BIT
364	select CRYPTO_AEAD
365	select CRYPTO_SIMD
366	help
367	  AEGIS-128 AEAD algorithm
368
369	  Architecture: x86_64 using:
370	  - AES-NI (AES New Instructions)
371	  - SSE2 (Streaming SIMD Extensions 2)
372
373config CRYPTO_NHPOLY1305_SSE2
374	tristate "Hash functions: NHPoly1305 (SSE2)"
375	depends on X86 && 64BIT
376	select CRYPTO_NHPOLY1305
377	help
378	  NHPoly1305 hash function for Adiantum
379
380	  Architecture: x86_64 using:
381	  - SSE2 (Streaming SIMD Extensions 2)
382
383config CRYPTO_NHPOLY1305_AVX2
384	tristate "Hash functions: NHPoly1305 (AVX2)"
385	depends on X86 && 64BIT
386	select CRYPTO_NHPOLY1305
387	help
388	  NHPoly1305 hash function for Adiantum
389
390	  Architecture: x86_64 using:
391	  - AVX2 (Advanced Vector Extensions 2)
392
393config CRYPTO_BLAKE2S_X86
394	bool "Hash functions: BLAKE2s (SSSE3/AVX-512)"
395	depends on X86 && 64BIT
396	select CRYPTO_LIB_BLAKE2S_GENERIC
397	select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
398	help
399	  BLAKE2s cryptographic hash function (RFC 7693)
400
401	  Architecture: x86_64 using:
402	  - SSSE3 (Supplemental SSE3)
403	  - AVX-512 (Advanced Vector Extensions-512)
404
405config CRYPTO_POLYVAL_CLMUL_NI
406	tristate "Hash functions: POLYVAL (CLMUL-NI)"
407	depends on X86 && 64BIT
408	select CRYPTO_POLYVAL
409	help
410	  POLYVAL hash function for HCTR2
411
412	  Architecture: x86_64 using:
413	  - CLMUL-NI (carry-less multiplication new instructions)
414
415config CRYPTO_POLY1305_X86_64
416	tristate "Hash functions: Poly1305 (SSE2/AVX2)"
417	depends on X86 && 64BIT
418	select CRYPTO_LIB_POLY1305_GENERIC
419	select CRYPTO_ARCH_HAVE_LIB_POLY1305
420	help
421	  Poly1305 authenticator algorithm (RFC7539)
422
423	  Architecture: x86_64 using:
424	  - SSE2 (Streaming SIMD Extensions 2)
425	  - AVX2 (Advanced Vector Extensions 2)
426
427config CRYPTO_SHA1_SSSE3
428	tristate "Hash functions: SHA-1 (SSSE3/AVX/AVX2/SHA-NI)"
429	depends on X86 && 64BIT
430	select CRYPTO_SHA1
431	select CRYPTO_HASH
432	help
433	  SHA-1 secure hash algorithm (FIPS 180)
434
435	  Architecture: x86_64 using:
436	  - SSSE3 (Supplemental SSE3)
437	  - AVX (Advanced Vector Extensions)
438	  - AVX2 (Advanced Vector Extensions 2)
439	  - SHA-NI (SHA Extensions New Instructions)
440
441config CRYPTO_SHA256_SSSE3
442	tristate "Hash functions: SHA-224 and SHA-256 (SSSE3/AVX/AVX2/SHA-NI)"
443	depends on X86 && 64BIT
444	select CRYPTO_SHA256
445	select CRYPTO_HASH
446	help
447	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
448
449	  Architecture: x86_64 using:
450	  - SSSE3 (Supplemental SSE3)
451	  - AVX (Advanced Vector Extensions)
452	  - AVX2 (Advanced Vector Extensions 2)
453	  - SHA-NI (SHA Extensions New Instructions)
454
455config CRYPTO_SHA512_SSSE3
456	tristate "Hash functions: SHA-384 and SHA-512 (SSSE3/AVX/AVX2)"
457	depends on X86 && 64BIT
458	select CRYPTO_SHA512
459	select CRYPTO_HASH
460	help
461	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180)
462
463	  Architecture: x86_64 using:
464	  - SSSE3 (Supplemental SSE3)
465	  - AVX (Advanced Vector Extensions)
466	  - AVX2 (Advanced Vector Extensions 2)
467
468config CRYPTO_SM3_AVX_X86_64
469	tristate "Hash functions: SM3 (AVX)"
470	depends on X86 && 64BIT
471	select CRYPTO_HASH
472	select CRYPTO_SM3
473	help
474	  SM3 secure hash function as defined by OSCCA GM/T 0004-2012 SM3
475
476	  Architecture: x86_64 using:
477	  - AVX (Advanced Vector Extensions)
478
479	  If unsure, say N.
480
481config CRYPTO_GHASH_CLMUL_NI_INTEL
482	tristate "Hash functions: GHASH (CLMUL-NI)"
483	depends on X86 && 64BIT
484	select CRYPTO_CRYPTD
485	help
486	  GCM GHASH hash function (NIST SP800-38D)
487
488	  Architecture: x86_64 using:
489	  - CLMUL-NI (carry-less multiplication new instructions)
490
491config CRYPTO_CRC32C_INTEL
492	tristate "CRC32c (SSE4.2/PCLMULQDQ)"
493	depends on X86
494	select CRYPTO_HASH
495	help
496	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
497
498	  Architecture: x86 (32-bit and 64-bit) using:
499	  - SSE4.2 (Streaming SIMD Extensions 4.2) CRC32 instruction
500	  - PCLMULQDQ (carry-less multiplication)
501
502config CRYPTO_CRC32_PCLMUL
503	tristate "CRC32 (PCLMULQDQ)"
504	depends on X86
505	select CRYPTO_HASH
506	select CRC32
507	help
508	  CRC32 CRC algorithm (IEEE 802.3)
509
510	  Architecture: x86 (32-bit and 64-bit) using:
511	  - PCLMULQDQ (carry-less multiplication)
512
513config CRYPTO_CRCT10DIF_PCLMUL
514	tristate "CRCT10DIF (PCLMULQDQ)"
515	depends on X86 && 64BIT && CRC_T10DIF
516	select CRYPTO_HASH
517	help
518	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
519
520	  Architecture: x86_64 using:
521	  - PCLMULQDQ (carry-less multiplication)
522
523endmenu
524