xref: /linux/crypto/Kconfig (revision b85966adbf5de0668a815c6e3527f87e0c387fb4)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Generic algorithms support
4#
5
6#
7# async_tx api: hardware offloaded memory transfer/transform support
8#
9source "crypto/async_tx/Kconfig"
10
11#
12# Cryptographic API Configuration
13#
14menuconfig CRYPTO
15	tristate "Cryptographic API"
16	select CRYPTO_LIB_UTILS
17	help
18	  This option provides the core Cryptographic API.
19
20if CRYPTO
21
22menu "Crypto core or helper"
23
24config CRYPTO_FIPS
25	bool "FIPS 200 compliance"
26	depends on CRYPTO_DRBG=y && CRYPTO_SELFTESTS
27	depends on (MODULE_SIG || !MODULES)
28	help
29	  This option enables the fips boot option which is
30	  required if you want the system to operate in a FIPS 200
31	  certification.  You should say no unless you know what
32	  this is.
33
34config CRYPTO_FIPS_NAME
35	string "FIPS Module Name"
36	default "Linux Kernel Cryptographic API"
37	depends on CRYPTO_FIPS
38	help
39	  This option sets the FIPS Module name reported by the Crypto API via
40	  the /proc/sys/crypto/fips_name file.
41
42config CRYPTO_FIPS_CUSTOM_VERSION
43	bool "Use Custom FIPS Module Version"
44	depends on CRYPTO_FIPS
45	default n
46
47config CRYPTO_FIPS_VERSION
48	string "FIPS Module Version"
49	default "(none)"
50	depends on CRYPTO_FIPS_CUSTOM_VERSION
51	help
52	  This option provides the ability to override the FIPS Module Version.
53	  By default the KERNELRELEASE value is used.
54
55config CRYPTO_ALGAPI
56	tristate
57	select CRYPTO_ALGAPI2
58	help
59	  This option provides the API for cryptographic algorithms.
60
61config CRYPTO_ALGAPI2
62	tristate
63
64config CRYPTO_AEAD
65	tristate
66	select CRYPTO_AEAD2
67	select CRYPTO_ALGAPI
68
69config CRYPTO_AEAD2
70	tristate
71	select CRYPTO_ALGAPI2
72
73config CRYPTO_SIG
74	tristate
75	select CRYPTO_SIG2
76	select CRYPTO_ALGAPI
77
78config CRYPTO_SIG2
79	tristate
80	select CRYPTO_ALGAPI2
81
82config CRYPTO_SKCIPHER
83	tristate
84	select CRYPTO_SKCIPHER2
85	select CRYPTO_ALGAPI
86	select CRYPTO_ECB
87
88config CRYPTO_SKCIPHER2
89	tristate
90	select CRYPTO_ALGAPI2
91
92config CRYPTO_HASH
93	tristate
94	select CRYPTO_HASH2
95	select CRYPTO_ALGAPI
96
97config CRYPTO_HASH2
98	tristate
99	select CRYPTO_ALGAPI2
100
101config CRYPTO_RNG
102	tristate
103	select CRYPTO_RNG2
104	select CRYPTO_ALGAPI
105
106config CRYPTO_RNG2
107	tristate
108	select CRYPTO_ALGAPI2
109
110config CRYPTO_AKCIPHER2
111	tristate
112	select CRYPTO_ALGAPI2
113
114config CRYPTO_AKCIPHER
115	tristate
116	select CRYPTO_AKCIPHER2
117	select CRYPTO_ALGAPI
118
119config CRYPTO_KPP2
120	tristate
121	select CRYPTO_ALGAPI2
122
123config CRYPTO_KPP
124	tristate
125	select CRYPTO_ALGAPI
126	select CRYPTO_KPP2
127
128config CRYPTO_ACOMP2
129	tristate
130	select CRYPTO_ALGAPI2
131	select SGL_ALLOC
132
133config CRYPTO_ACOMP
134	tristate
135	select CRYPTO_ALGAPI
136	select CRYPTO_ACOMP2
137
138config CRYPTO_MANAGER
139	tristate
140	default CRYPTO_ALGAPI if CRYPTO_SELFTESTS
141	select CRYPTO_MANAGER2
142	help
143	  This provides the support for instantiating templates such as
144	  cbc(aes), and the support for the crypto self-tests.
145
146config CRYPTO_MANAGER2
147	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
148	select CRYPTO_ACOMP2 if CRYPTO_SELFTESTS
149	select CRYPTO_AEAD2 if CRYPTO_SELFTESTS
150	select CRYPTO_AKCIPHER2 if CRYPTO_SELFTESTS
151	select CRYPTO_SIG2 if CRYPTO_SELFTESTS
152	select CRYPTO_HASH2 if CRYPTO_SELFTESTS
153	select CRYPTO_KPP2 if CRYPTO_SELFTESTS
154	select CRYPTO_RNG2 if CRYPTO_SELFTESTS
155	select CRYPTO_SKCIPHER2 if CRYPTO_SELFTESTS
156
157config CRYPTO_USER
158	tristate "Userspace cryptographic algorithm configuration"
159	depends on NET
160	select CRYPTO_MANAGER
161	select CRYPTO_RNG
162	help
163	  Userspace configuration for cryptographic instantiations such as
164	  cbc(aes).
165
166config CRYPTO_SELFTESTS
167	bool "Enable cryptographic self-tests"
168	depends on EXPERT
169	help
170	  Enable the cryptographic self-tests.
171
172	  The cryptographic self-tests run at boot time, or at algorithm
173	  registration time if algorithms are dynamically loaded later.
174
175	  There are two main use cases for these tests:
176
177	  - Development and pre-release testing.  In this case, also enable
178	    CRYPTO_SELFTESTS_FULL to get the full set of tests.  All crypto code
179	    in the kernel is expected to pass the full set of tests.
180
181	  - Production kernels, to help prevent buggy drivers from being used
182	    and/or meet FIPS 140-3 pre-operational testing requirements.  In
183	    this case, enable CRYPTO_SELFTESTS but not CRYPTO_SELFTESTS_FULL.
184
185config CRYPTO_SELFTESTS_FULL
186	bool "Enable the full set of cryptographic self-tests"
187	depends on CRYPTO_SELFTESTS
188	help
189	  Enable the full set of cryptographic self-tests for each algorithm.
190
191	  The full set of tests should be enabled for development and
192	  pre-release testing, but not in production kernels.
193
194	  All crypto code in the kernel is expected to pass the full tests.
195
196config CRYPTO_NULL
197	tristate "Null algorithms"
198	select CRYPTO_ALGAPI
199	select CRYPTO_SKCIPHER
200	select CRYPTO_HASH
201	help
202	  These are 'Null' algorithms, used by IPsec, which do nothing.
203
204config CRYPTO_PCRYPT
205	tristate "Parallel crypto engine"
206	depends on SMP
207	select PADATA
208	select CRYPTO_MANAGER
209	select CRYPTO_AEAD
210	help
211	  This converts an arbitrary crypto algorithm into a parallel
212	  algorithm that executes in kernel threads.
213
214config CRYPTO_CRYPTD
215	tristate "Software async crypto daemon"
216	select CRYPTO_AEAD
217	select CRYPTO_SKCIPHER
218	select CRYPTO_HASH
219	select CRYPTO_MANAGER
220	help
221	  This is a generic software asynchronous crypto daemon that
222	  converts an arbitrary synchronous software crypto algorithm
223	  into an asynchronous algorithm that executes in a kernel thread.
224
225config CRYPTO_AUTHENC
226	tristate "Authenc support"
227	select CRYPTO_AEAD
228	select CRYPTO_SKCIPHER
229	select CRYPTO_MANAGER
230	select CRYPTO_HASH
231	help
232	  Authenc: Combined mode wrapper for IPsec.
233
234	  This is required for IPSec ESP (XFRM_ESP).
235
236config CRYPTO_KRB5ENC
237	tristate "Kerberos 5 combined hash+cipher support"
238	select CRYPTO_AEAD
239	select CRYPTO_SKCIPHER
240	select CRYPTO_MANAGER
241	select CRYPTO_HASH
242	help
243	  Combined hash and cipher support for Kerberos 5 RFC3961 simplified
244	  profile.  This is required for Kerberos 5-style encryption, used by
245	  sunrpc/NFS and rxrpc/AFS.
246
247config CRYPTO_BENCHMARK
248	tristate "Crypto benchmarking module"
249	depends on m || EXPERT
250	select CRYPTO_AEAD
251	select CRYPTO_HASH
252	select CRYPTO_MANAGER
253	select CRYPTO_SKCIPHER
254	help
255	  Quick & dirty crypto benchmarking module.
256
257	  This is mainly intended for use by people developing cryptographic
258	  algorithms in the kernel.  It should not be enabled in production
259	  kernels.
260
261config CRYPTO_SIMD
262	tristate
263	select CRYPTO_AEAD
264	select CRYPTO_CRYPTD
265
266config CRYPTO_ENGINE
267	tristate
268	select CRYPTO_AEAD
269	select CRYPTO_AKCIPHER
270	select CRYPTO_HASH
271	select CRYPTO_KPP
272	select CRYPTO_SKCIPHER
273
274endmenu
275
276menu "Public-key cryptography"
277
278config CRYPTO_RSA
279	tristate "RSA (Rivest-Shamir-Adleman)"
280	select CRYPTO_AKCIPHER
281	select CRYPTO_MANAGER
282	select CRYPTO_SIG
283	select MPILIB
284	select ASN1
285	help
286	  RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
287
288config CRYPTO_DH
289	tristate "DH (Diffie-Hellman)"
290	select CRYPTO_KPP
291	select MPILIB
292	help
293	  DH (Diffie-Hellman) key exchange algorithm
294
295config CRYPTO_DH_RFC7919_GROUPS
296	bool "RFC 7919 FFDHE groups"
297	depends on CRYPTO_DH
298	help
299	  FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
300	  defined in RFC7919.
301
302	  Support these finite-field groups in DH key exchanges:
303	  - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
304
305	  If unsure, say N.
306
307config CRYPTO_ECC
308	tristate
309
310config CRYPTO_ECDH
311	tristate "ECDH (Elliptic Curve Diffie-Hellman)"
312	select CRYPTO_ECC
313	select CRYPTO_KPP
314	help
315	  ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
316	  using curves P-192, P-256, and P-384 (FIPS 186)
317
318config CRYPTO_ECDSA
319	tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
320	select CRYPTO_ECC
321	select CRYPTO_SIG
322	select ASN1
323	help
324	  ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
325	  ISO/IEC 14888-3)
326	  using curves P-192, P-256, P-384 and P-521
327
328	  Only signature verification is implemented.
329
330config CRYPTO_ECRDSA
331	tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
332	select CRYPTO_ECC
333	select CRYPTO_SIG
334	select CRYPTO_STREEBOG
335	select OID_REGISTRY
336	select ASN1
337	help
338	  Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
339	  RFC 7091, ISO/IEC 14888-3)
340
341	  One of the Russian cryptographic standard algorithms (called GOST
342	  algorithms). Only signature verification is implemented.
343
344config CRYPTO_MLDSA
345	tristate "ML-DSA (Module-Lattice-Based Digital Signature Algorithm)"
346	select CRYPTO_SIG
347	select CRYPTO_LIB_MLDSA
348	help
349	  ML-DSA (Module-Lattice-Based Digital Signature Algorithm) (FIPS-204).
350
351	  Only signature verification is implemented.
352
353endmenu
354
355menu "Block ciphers"
356
357config CRYPTO_AES
358	tristate "AES (Advanced Encryption Standard)"
359	select CRYPTO_ALGAPI
360	select CRYPTO_LIB_AES
361	select CRYPTO_LIB_AES_CBC_MACS if CRYPTO_CMAC || CRYPTO_XCBC || CRYPTO_CCM
362	select CRYPTO_HASH if CRYPTO_CMAC || CRYPTO_XCBC || CRYPTO_CCM
363	help
364	  AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
365
366	  Rijndael appears to be consistently a very good performer in
367	  both hardware and software across a wide range of computing
368	  environments regardless of its use in feedback or non-feedback
369	  modes. Its key setup time is excellent, and its key agility is
370	  good. Rijndael's very low memory requirements make it very well
371	  suited for restricted-space environments, in which it also
372	  demonstrates excellent performance. Rijndael's operations are
373	  among the easiest to defend against power and timing attacks.
374
375	  The AES specifies three key sizes: 128, 192 and 256 bits
376
377config CRYPTO_ANUBIS
378	tristate "Anubis"
379	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
380	select CRYPTO_ALGAPI
381	help
382	  Anubis cipher algorithm
383
384	  Anubis is a variable key length cipher which can use keys from
385	  128 bits to 320 bits in length.  It was evaluated as a entrant
386	  in the NESSIE competition.
387
388	  See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html
389	  for further information.
390
391config CRYPTO_ARIA
392	tristate "ARIA"
393	select CRYPTO_ALGAPI
394	help
395	  ARIA cipher algorithm (RFC5794)
396
397	  ARIA is a standard encryption algorithm of the Republic of Korea.
398	  The ARIA specifies three key sizes and rounds.
399	  128-bit: 12 rounds.
400	  192-bit: 14 rounds.
401	  256-bit: 16 rounds.
402
403	  See:
404	  https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do
405
406config CRYPTO_BLOWFISH
407	tristate "Blowfish"
408	select CRYPTO_ALGAPI
409	select CRYPTO_BLOWFISH_COMMON
410	help
411	  Blowfish cipher algorithm, by Bruce Schneier
412
413	  This is a variable key length cipher which can use keys from 32
414	  bits to 448 bits in length.  It's fast, simple and specifically
415	  designed for use on "large microprocessors".
416
417	  See https://www.schneier.com/blowfish.html for further information.
418
419config CRYPTO_BLOWFISH_COMMON
420	tristate
421	help
422	  Common parts of the Blowfish cipher algorithm shared by the
423	  generic c and the assembler implementations.
424
425config CRYPTO_CAMELLIA
426	tristate "Camellia"
427	select CRYPTO_ALGAPI
428	help
429	  Camellia cipher algorithms (ISO/IEC 18033-3)
430
431	  Camellia is a symmetric key block cipher developed jointly
432	  at NTT and Mitsubishi Electric Corporation.
433
434	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
435
436	  See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information.
437
438config CRYPTO_CAST_COMMON
439	tristate
440	help
441	  Common parts of the CAST cipher algorithms shared by the
442	  generic c and the assembler implementations.
443
444config CRYPTO_CAST5
445	tristate "CAST5 (CAST-128)"
446	select CRYPTO_ALGAPI
447	select CRYPTO_CAST_COMMON
448	help
449	  CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3)
450
451config CRYPTO_CAST6
452	tristate "CAST6 (CAST-256)"
453	select CRYPTO_ALGAPI
454	select CRYPTO_CAST_COMMON
455	help
456	  CAST6 (CAST-256) encryption algorithm (RFC2612)
457
458config CRYPTO_DES
459	tristate "DES and Triple DES EDE"
460	select CRYPTO_ALGAPI
461	select CRYPTO_LIB_DES
462	help
463	  DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and
464	  Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3)
465	  cipher algorithms
466
467config CRYPTO_KHAZAD
468	tristate "Khazad"
469	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
470	select CRYPTO_ALGAPI
471	help
472	  Khazad cipher algorithm
473
474	  Khazad was a finalist in the initial NESSIE competition.  It is
475	  an algorithm optimized for 64-bit processors with good performance
476	  on 32-bit processors.  Khazad uses an 128 bit key size.
477
478	  See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
479	  for further information.
480
481config CRYPTO_SEED
482	tristate "SEED"
483	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
484	select CRYPTO_ALGAPI
485	help
486	  SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
487
488	  SEED is a 128-bit symmetric key block cipher that has been
489	  developed by KISA (Korea Information Security Agency) as a
490	  national standard encryption algorithm of the Republic of Korea.
491	  It is a 16 round block cipher with the key size of 128 bit.
492
493	  See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
494	  for further information.
495
496config CRYPTO_SERPENT
497	tristate "Serpent"
498	select CRYPTO_ALGAPI
499	help
500	  Serpent cipher algorithm, by Anderson, Biham & Knudsen
501
502	  Keys are allowed to be from 0 to 256 bits in length, in steps
503	  of 8 bits.
504
505	  See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
506
507config CRYPTO_SM4
508	tristate
509
510config CRYPTO_SM4_GENERIC
511	tristate "SM4 (ShangMi 4)"
512	select CRYPTO_ALGAPI
513	select CRYPTO_SM4
514	help
515	  SM4 cipher algorithms (OSCCA GB/T 32907-2016,
516	  ISO/IEC 18033-3:2010/Amd 1:2021)
517
518	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
519	  Organization of State Commercial Administration of China (OSCCA)
520	  as an authorized cryptographic algorithms for the use within China.
521
522	  SMS4 was originally created for use in protecting wireless
523	  networks, and is mandated in the Chinese National Standard for
524	  Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
525	  (GB.15629.11-2003).
526
527	  The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
528	  standardized through TC 260 of the Standardization Administration
529	  of the People's Republic of China (SAC).
530
531	  The input, output, and key of SMS4 are each 128 bits.
532
533	  See https://eprint.iacr.org/2008/329.pdf for further information.
534
535	  If unsure, say N.
536
537config CRYPTO_TEA
538	tristate "TEA, XTEA and XETA"
539	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
540	select CRYPTO_ALGAPI
541	help
542	  TEA (Tiny Encryption Algorithm) cipher algorithms
543
544	  Tiny Encryption Algorithm is a simple cipher that uses
545	  many rounds for security.  It is very fast and uses
546	  little memory.
547
548	  Xtendend Tiny Encryption Algorithm is a modification to
549	  the TEA algorithm to address a potential key weakness
550	  in the TEA algorithm.
551
552	  Xtendend Encryption Tiny Algorithm is a mis-implementation
553	  of the XTEA algorithm for compatibility purposes.
554
555config CRYPTO_TWOFISH
556	tristate "Twofish"
557	select CRYPTO_ALGAPI
558	select CRYPTO_TWOFISH_COMMON
559	help
560	  Twofish cipher algorithm
561
562	  Twofish was submitted as an AES (Advanced Encryption Standard)
563	  candidate cipher by researchers at CounterPane Systems.  It is a
564	  16 round block cipher supporting key sizes of 128, 192, and 256
565	  bits.
566
567	  See https://www.schneier.com/twofish.html for further information.
568
569config CRYPTO_TWOFISH_COMMON
570	tristate
571	help
572	  Common parts of the Twofish cipher algorithm shared by the
573	  generic c and the assembler implementations.
574
575endmenu
576
577menu "Length-preserving ciphers and modes"
578
579config CRYPTO_ADIANTUM
580	tristate "Adiantum"
581	select CRYPTO_CHACHA20
582	select CRYPTO_LIB_NH
583	select CRYPTO_LIB_POLY1305
584	select CRYPTO_LIB_POLY1305_GENERIC
585	select CRYPTO_MANAGER
586	help
587	  Adiantum tweakable, length-preserving encryption mode
588
589	  Designed for fast and secure disk encryption, especially on
590	  CPUs without dedicated crypto instructions.  It encrypts
591	  each sector using the XChaCha12 stream cipher, two passes of
592	  an ε-almost-∆-universal hash function, and an invocation of
593	  the AES-256 block cipher on a single 16-byte block.  On CPUs
594	  without AES instructions, Adiantum is much faster than
595	  AES-XTS.
596
597	  Adiantum's security is provably reducible to that of its
598	  underlying stream and block ciphers, subject to a security
599	  bound.  Unlike XTS, Adiantum is a true wide-block encryption
600	  mode, so it actually provides an even stronger notion of
601	  security than XTS, subject to the security bound.
602
603	  If unsure, say N.
604
605config CRYPTO_ARC4
606	tristate "ARC4 (Alleged Rivest Cipher 4)"
607	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
608	select CRYPTO_SKCIPHER
609	select CRYPTO_LIB_ARC4
610	help
611	  ARC4 cipher algorithm
612
613	  ARC4 is a stream cipher using keys ranging from 8 bits to 2048
614	  bits in length.  This algorithm is required for driver-based
615	  WEP, but it should not be for other purposes because of the
616	  weakness of the algorithm.
617
618config CRYPTO_CHACHA20
619	tristate "ChaCha"
620	select CRYPTO_LIB_CHACHA
621	select CRYPTO_SKCIPHER
622	help
623	  The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
624
625	  ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
626	  Bernstein and further specified in RFC7539 for use in IETF protocols.
627	  This is the portable C implementation of ChaCha20.  See
628	  https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
629
630	  XChaCha20 is the application of the XSalsa20 construction to ChaCha20
631	  rather than to Salsa20.  XChaCha20 extends ChaCha20's nonce length
632	  from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
633	  while provably retaining ChaCha20's security.  See
634	  https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
635
636	  XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
637	  reduced security margin but increased performance.  It can be needed
638	  in some performance-sensitive scenarios.
639
640config CRYPTO_CBC
641	tristate "CBC (Cipher Block Chaining)"
642	select CRYPTO_SKCIPHER
643	select CRYPTO_MANAGER
644	help
645	  CBC (Cipher Block Chaining) mode (NIST SP800-38A)
646
647	  This block cipher mode is required for IPSec ESP (XFRM_ESP).
648
649config CRYPTO_CTR
650	tristate "CTR (Counter)"
651	select CRYPTO_SKCIPHER
652	select CRYPTO_MANAGER
653	help
654	  CTR (Counter) mode (NIST SP800-38A)
655
656config CRYPTO_CTS
657	tristate "CTS (Cipher Text Stealing)"
658	select CRYPTO_SKCIPHER
659	select CRYPTO_MANAGER
660	help
661	  CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
662	  Addendum to SP800-38A (October 2010))
663
664	  This mode is required for Kerberos gss mechanism support
665	  for AES encryption.
666
667config CRYPTO_ECB
668	tristate "ECB (Electronic Codebook)"
669	select CRYPTO_SKCIPHER2
670	select CRYPTO_MANAGER
671	help
672	  ECB (Electronic Codebook) mode (NIST SP800-38A)
673
674config CRYPTO_HCTR2
675	tristate "HCTR2"
676	select CRYPTO_XCTR
677	select CRYPTO_LIB_GF128HASH
678	select CRYPTO_MANAGER
679	help
680	  HCTR2 length-preserving encryption mode
681
682	  A mode for storage encryption that is efficient on processors with
683	  instructions to accelerate AES and carryless multiplication, e.g.
684	  x86 processors with AES-NI and CLMUL, and ARM processors with the
685	  ARMv8 crypto extensions.
686
687	  See https://eprint.iacr.org/2021/1441
688
689config CRYPTO_LRW
690	tristate "LRW (Liskov Rivest Wagner)"
691	select CRYPTO_LIB_GF128MUL
692	select CRYPTO_SKCIPHER
693	select CRYPTO_MANAGER
694	select CRYPTO_ECB
695	help
696	  LRW (Liskov Rivest Wagner) mode
697
698	  A tweakable, non malleable, non movable
699	  narrow block cipher mode for dm-crypt.  Use it with cipher
700	  specification string aes-lrw-benbi, the key must be 256, 320 or 384.
701	  The first 128, 192 or 256 bits in the key are used for AES and the
702	  rest is used to tie each cipher block to its logical position.
703
704	  See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
705
706config CRYPTO_XCTR
707	tristate
708	select CRYPTO_SKCIPHER
709	select CRYPTO_MANAGER
710	help
711	  XCTR (XOR Counter) mode for HCTR2
712
713	  This blockcipher mode is a variant of CTR mode using XORs and little-endian
714	  addition rather than big-endian arithmetic.
715
716	  XCTR mode is used to implement HCTR2.
717
718config CRYPTO_XTS
719	tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
720	select CRYPTO_SKCIPHER
721	select CRYPTO_MANAGER
722	select CRYPTO_ECB
723	help
724	  XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
725	  and IEEE 1619)
726
727	  Use with aes-xts-plain, key size 256, 384 or 512 bits. This
728	  implementation currently can't handle a sectorsize which is not a
729	  multiple of 16 bytes.
730
731endmenu
732
733menu "AEAD (authenticated encryption with associated data) ciphers"
734
735config CRYPTO_AEGIS128
736	tristate "AEGIS-128"
737	select CRYPTO_AEAD
738	select CRYPTO_LIB_AES  # for AES S-box tables
739	help
740	  AEGIS-128 AEAD algorithm
741
742config CRYPTO_AEGIS128_SIMD
743	bool "AEGIS-128 (arm NEON, arm64 NEON)"
744	depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
745	default y
746	help
747	  AEGIS-128 AEAD algorithm
748
749	  Architecture: arm or arm64 using:
750	  - NEON (Advanced SIMD) extension
751
752config CRYPTO_CHACHA20POLY1305
753	tristate "ChaCha20-Poly1305"
754	select CRYPTO_CHACHA20
755	select CRYPTO_AEAD
756	select CRYPTO_LIB_POLY1305
757	select CRYPTO_MANAGER
758	help
759	  ChaCha20 stream cipher and Poly1305 authenticator combined
760	  mode (RFC8439)
761
762config CRYPTO_CCM
763	tristate "CCM (Counter with Cipher Block Chaining-MAC)"
764	select CRYPTO_CTR
765	select CRYPTO_HASH
766	select CRYPTO_AEAD
767	select CRYPTO_MANAGER
768	help
769	  CCM (Counter with Cipher Block Chaining-Message Authentication Code)
770	  authenticated encryption mode (NIST SP800-38C)
771
772config CRYPTO_GCM
773	tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
774	select CRYPTO_CTR
775	select CRYPTO_AEAD
776	select CRYPTO_LIB_GF128HASH
777	select CRYPTO_MANAGER
778	help
779	  GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
780	  (GCM Message Authentication Code) (NIST SP800-38D)
781
782	  This is required for IPSec ESP (XFRM_ESP).
783
784config CRYPTO_GENIV
785	tristate
786	select CRYPTO_AEAD
787	select CRYPTO_MANAGER
788
789config CRYPTO_SEQIV
790	tristate "Sequence Number IV Generator"
791	select CRYPTO_GENIV
792	help
793	  Sequence Number IV generator
794
795	  This IV generator generates an IV based on a sequence number by
796	  xoring it with a salt.  This algorithm is mainly useful for CTR.
797
798	  This is required for IPsec ESP (XFRM_ESP).
799
800config CRYPTO_ECHAINIV
801	tristate "Encrypted Chain IV Generator"
802	select CRYPTO_GENIV
803	help
804	  Encrypted Chain IV generator
805
806	  This IV generator generates an IV based on the encryption of
807	  a sequence number xored with a salt.  This is the default
808	  algorithm for CBC.
809
810config CRYPTO_ESSIV
811	tristate "Encrypted Salt-Sector IV Generator"
812	select CRYPTO_AUTHENC
813	help
814	  Encrypted Salt-Sector IV generator
815
816	  This IV generator is used in some cases by fscrypt and/or
817	  dm-crypt. It uses the hash of the block encryption key as the
818	  symmetric key for a block encryption pass applied to the input
819	  IV, making low entropy IV sources more suitable for block
820	  encryption.
821
822	  This driver implements a crypto API template that can be
823	  instantiated either as an skcipher or as an AEAD (depending on the
824	  type of the first template argument), and which defers encryption
825	  and decryption requests to the encapsulated cipher after applying
826	  ESSIV to the input IV. Note that in the AEAD case, it is assumed
827	  that the keys are presented in the same format used by the authenc
828	  template, and that the IV appears at the end of the authenticated
829	  associated data (AAD) region (which is how dm-crypt uses it.)
830
831	  Note that the use of ESSIV is not recommended for new deployments,
832	  and so this only needs to be enabled when interoperability with
833	  existing encrypted volumes of filesystems is required, or when
834	  building for a particular system that requires it (e.g., when
835	  the SoC in question has accelerated CBC but not XTS, making CBC
836	  combined with ESSIV the only feasible mode for h/w accelerated
837	  block encryption)
838
839endmenu
840
841menu "Hashes, digests, and MACs"
842
843config CRYPTO_BLAKE2B
844	tristate "BLAKE2b"
845	select CRYPTO_HASH
846	select CRYPTO_LIB_BLAKE2B
847	help
848	  BLAKE2b cryptographic hash function (RFC 7693)
849
850	  BLAKE2b is optimized for 64-bit platforms and can produce digests
851	  of any size between 1 and 64 bytes. The keyed hash is also implemented.
852
853	  This module provides the following algorithms:
854	  - blake2b-160
855	  - blake2b-256
856	  - blake2b-384
857	  - blake2b-512
858
859	  See https://blake2.net for further information.
860
861config CRYPTO_CMAC
862	tristate "CMAC (Cipher-based MAC)"
863	select CRYPTO_HASH
864	select CRYPTO_MANAGER
865	help
866	  CMAC (Cipher-based Message Authentication Code) authentication
867	  mode (NIST SP800-38B and IETF RFC4493)
868
869config CRYPTO_HMAC
870	tristate "HMAC (Keyed-Hash MAC)"
871	select CRYPTO_HASH
872	select CRYPTO_MANAGER
873	help
874	  HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
875	  RFC2104)
876
877	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
878
879config CRYPTO_MD4
880	tristate "MD4"
881	select CRYPTO_HASH
882	help
883	  MD4 message digest algorithm (RFC1320)
884
885config CRYPTO_MD5
886	tristate "MD5"
887	select CRYPTO_HASH
888	select CRYPTO_LIB_MD5
889	help
890	  MD5 message digest algorithm (RFC1321), including HMAC support.
891
892config CRYPTO_RMD160
893	tristate "RIPEMD-160"
894	select CRYPTO_HASH
895	help
896	  RIPEMD-160 hash function (ISO/IEC 10118-3)
897
898	  RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
899	  to be used as a secure replacement for the 128-bit hash functions
900	  MD4, MD5 and its predecessor RIPEMD
901	  (not to be confused with RIPEMD-128).
902
903	  Its speed is comparable to SHA-1 and there are no known attacks
904	  against RIPEMD-160.
905
906	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
907	  See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
908	  for further information.
909
910config CRYPTO_SHA1
911	tristate "SHA-1"
912	select CRYPTO_HASH
913	select CRYPTO_LIB_SHA1
914	help
915	  SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3), including
916	  HMAC support.
917
918config CRYPTO_SHA256
919	tristate "SHA-224 and SHA-256"
920	select CRYPTO_HASH
921	select CRYPTO_LIB_SHA256
922	help
923	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC
924	  10118-3), including HMAC support.
925
926	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
927
928config CRYPTO_SHA512
929	tristate "SHA-384 and SHA-512"
930	select CRYPTO_HASH
931	select CRYPTO_LIB_SHA512
932	help
933	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC
934	  10118-3), including HMAC support.
935
936config CRYPTO_SHA3
937	tristate "SHA-3"
938	select CRYPTO_HASH
939	select CRYPTO_LIB_SHA3
940	help
941	  SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
942
943config CRYPTO_SM3
944	tristate "SM3 (ShangMi 3)"
945	select CRYPTO_HASH
946	select CRYPTO_LIB_SM3
947	help
948	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
949
950	  This is part of the Chinese Commercial Cryptography suite.
951
952	  References:
953	  http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
954	  https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
955
956config CRYPTO_STREEBOG
957	tristate "Streebog"
958	select CRYPTO_HASH
959	help
960	  Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
961
962	  This is one of the Russian cryptographic standard algorithms (called
963	  GOST algorithms). This setting enables two hash algorithms with
964	  256 and 512 bits output.
965
966	  References:
967	  https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
968	  https://tools.ietf.org/html/rfc6986
969
970config CRYPTO_WP512
971	tristate "Whirlpool"
972	select CRYPTO_HASH
973	help
974	  Whirlpool hash function (ISO/IEC 10118-3)
975
976	  512, 384 and 256-bit hashes.
977
978	  Whirlpool-512 is part of the NESSIE cryptographic primitives.
979
980	  See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
981	  for further information.
982
983config CRYPTO_XCBC
984	tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
985	select CRYPTO_HASH
986	select CRYPTO_MANAGER
987	help
988	  XCBC-MAC (Extended Cipher Block Chaining Message Authentication
989	  Code) (RFC3566)
990
991config CRYPTO_XXHASH
992	tristate "xxHash"
993	select CRYPTO_HASH
994	select XXHASH
995	help
996	  xxHash non-cryptographic hash algorithm
997
998	  Extremely fast, working at speeds close to RAM limits.
999
1000endmenu
1001
1002menu "CRCs (cyclic redundancy checks)"
1003
1004config CRYPTO_CRC32C
1005	tristate "CRC32c"
1006	select CRYPTO_HASH
1007	select CRC32
1008	help
1009	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1010
1011	  A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1012	  by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
1013	  Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1014	  on Communications, Vol. 41, No. 6, June 1993, selected for use with
1015	  iSCSI.
1016
1017config CRYPTO_CRC32
1018	tristate "CRC32"
1019	select CRYPTO_HASH
1020	select CRC32
1021	help
1022	  CRC32 CRC algorithm (IEEE 802.3)
1023
1024endmenu
1025
1026menu "Compression"
1027
1028config CRYPTO_DEFLATE
1029	tristate "Deflate"
1030	select CRYPTO_ALGAPI
1031	select CRYPTO_ACOMP2
1032	select ZLIB_INFLATE
1033	select ZLIB_DEFLATE
1034	help
1035	  Deflate compression algorithm (RFC1951)
1036
1037	  Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
1038
1039config CRYPTO_LZO
1040	tristate "LZO"
1041	select CRYPTO_ALGAPI
1042	select CRYPTO_ACOMP2
1043	select LZO_COMPRESS
1044	select LZO_DECOMPRESS
1045	help
1046	  LZO compression algorithm
1047
1048	  See https://www.oberhumer.com/opensource/lzo/ for further information.
1049
1050config CRYPTO_842
1051	tristate "842"
1052	select CRYPTO_ALGAPI
1053	select CRYPTO_ACOMP2
1054	select 842_COMPRESS
1055	select 842_DECOMPRESS
1056	help
1057	  842 compression algorithm by IBM
1058
1059	  See https://github.com/plauth/lib842 for further information.
1060
1061config CRYPTO_LZ4
1062	tristate "LZ4"
1063	select CRYPTO_ALGAPI
1064	select CRYPTO_ACOMP2
1065	select LZ4_COMPRESS
1066	select LZ4_DECOMPRESS
1067	help
1068	  LZ4 compression algorithm
1069
1070	  See https://github.com/lz4/lz4 for further information.
1071
1072config CRYPTO_LZ4HC
1073	tristate "LZ4HC"
1074	select CRYPTO_ALGAPI
1075	select CRYPTO_ACOMP2
1076	select LZ4HC_COMPRESS
1077	select LZ4_DECOMPRESS
1078	help
1079	  LZ4 high compression mode algorithm
1080
1081	  See https://github.com/lz4/lz4 for further information.
1082
1083config CRYPTO_ZSTD
1084	tristate "Zstd"
1085	select CRYPTO_ALGAPI
1086	select CRYPTO_ACOMP2
1087	select ZSTD_COMPRESS
1088	select ZSTD_DECOMPRESS
1089	help
1090	  zstd compression algorithm
1091
1092	  See https://github.com/facebook/zstd for further information.
1093
1094endmenu
1095
1096menu "Random number generation"
1097
1098config CRYPTO_DRBG
1099	tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
1100	select CRYPTO_JITTERENTROPY
1101	select CRYPTO_LIB_SHA512
1102	select CRYPTO_RNG
1103	help
1104	  DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
1105
1106	  Enable this only if you need it for a FIPS 140 certification.
1107	  It's otherwise redundant with the kernel's regular RNG.
1108
1109config CRYPTO_JITTERENTROPY
1110	tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
1111	select CRYPTO_LIB_SHA3
1112	select CRYPTO_RNG
1113	help
1114	  CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
1115
1116	  A non-physical non-deterministic ("true") RNG (e.g., an entropy source
1117	  compliant with NIST SP800-90B) intended to provide a seed to a
1118	  deterministic RNG (e.g., per NIST SP800-90C).
1119	  This RNG does not perform any cryptographic whitening of the generated
1120	  random numbers.
1121
1122	  See https://www.chronox.de/jent/
1123
1124if CRYPTO_JITTERENTROPY
1125if CRYPTO_FIPS && EXPERT
1126
1127choice
1128	prompt "CPU Jitter RNG Memory Size"
1129	default CRYPTO_JITTERENTROPY_MEMSIZE_2
1130	help
1131	  The Jitter RNG measures the execution time of memory accesses.
1132	  Multiple consecutive memory accesses are performed. If the memory
1133	  size fits into a cache (e.g. L1), only the memory access timing
1134	  to that cache is measured. The closer the cache is to the CPU
1135	  the less variations are measured and thus the less entropy is
1136	  obtained. Thus, if the memory size fits into the L1 cache, the
1137	  obtained entropy is less than if the memory size fits within
1138	  L1 + L2, which in turn is less if the memory fits into
1139	  L1 + L2 + L3. Thus, by selecting a different memory size,
1140	  the entropy rate produced by the Jitter RNG can be modified.
1141
1142	config CRYPTO_JITTERENTROPY_MEMSIZE_2
1143		bool "2048 Bytes (default)"
1144
1145	config CRYPTO_JITTERENTROPY_MEMSIZE_128
1146		bool "128 kBytes"
1147
1148	config CRYPTO_JITTERENTROPY_MEMSIZE_1024
1149		bool "1024 kBytes"
1150
1151	config CRYPTO_JITTERENTROPY_MEMSIZE_8192
1152		bool "8192 kBytes"
1153endchoice
1154
1155config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
1156	int
1157	default 64 if CRYPTO_JITTERENTROPY_MEMSIZE_2
1158	default 512 if CRYPTO_JITTERENTROPY_MEMSIZE_128
1159	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
1160	default 4096 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
1161
1162config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
1163	int
1164	default 32 if CRYPTO_JITTERENTROPY_MEMSIZE_2
1165	default 256 if CRYPTO_JITTERENTROPY_MEMSIZE_128
1166	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
1167	default 2048 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
1168
1169config CRYPTO_JITTERENTROPY_OSR
1170	int "CPU Jitter RNG Oversampling Rate"
1171	range 1 15
1172	default 3
1173	help
1174	  The Jitter RNG allows the specification of an oversampling rate (OSR).
1175	  The Jitter RNG operation requires a fixed amount of timing
1176	  measurements to produce one output block of random numbers. The
1177	  OSR value is multiplied with the amount of timing measurements to
1178	  generate one output block. Thus, the timing measurement is oversampled
1179	  by the OSR factor. The oversampling allows the Jitter RNG to operate
1180	  on hardware whose timers deliver limited amount of entropy (e.g.
1181	  the timer is coarse) by setting the OSR to a higher value. The
1182	  trade-off, however, is that the Jitter RNG now requires more time
1183	  to generate random numbers.
1184
1185config CRYPTO_JITTERENTROPY_TESTINTERFACE
1186	bool "CPU Jitter RNG Test Interface"
1187	help
1188	  The test interface allows a privileged process to capture
1189	  the raw unconditioned high resolution time stamp noise that
1190	  is collected by the Jitter RNG for statistical analysis. As
1191	  this data is used at the same time to generate random bits,
1192	  the Jitter RNG operates in an insecure mode as long as the
1193	  recording is enabled. This interface therefore is only
1194	  intended for testing purposes and is not suitable for
1195	  production systems.
1196
1197	  The raw noise data can be obtained using the jent_raw_hires
1198	  debugfs file. Using the option
1199	  jitterentropy_testing.boot_raw_hires_test=1 the raw noise of
1200	  the first 1000 entropy events since boot can be sampled.
1201
1202	  If unsure, select N.
1203
1204endif	# if CRYPTO_FIPS && EXPERT
1205
1206if !(CRYPTO_FIPS && EXPERT)
1207
1208config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
1209	int
1210	default 64
1211
1212config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
1213	int
1214	default 32
1215
1216config CRYPTO_JITTERENTROPY_OSR
1217	int
1218	default 1
1219
1220config CRYPTO_JITTERENTROPY_TESTINTERFACE
1221	bool
1222
1223endif	# if !(CRYPTO_FIPS && EXPERT)
1224endif	# if CRYPTO_JITTERENTROPY
1225
1226config CRYPTO_KDF800108_CTR
1227	tristate
1228	select CRYPTO_HMAC
1229	select CRYPTO_SHA256
1230
1231endmenu
1232menu "Userspace interface (deprecated)"
1233
1234config CRYPTO_USER_API
1235	tristate
1236
1237config CRYPTO_USER_API_HASH
1238	tristate "Hash algorithms (deprecated)"
1239	depends on NET
1240	select CRYPTO_HASH
1241	select CRYPTO_USER_API
1242	help
1243	  Enable the AF_ALG userspace interface for hash algorithms.  This
1244	  provides unprivileged userspace programs access to arbitrary hash
1245	  algorithms implemented in the kernel's privileged execution context.
1246
1247	  This interface is deprecated and is supported only for backwards
1248	  compatibility.  It regularly has vulnerabilities, and the capabilities
1249	  it provides are redundant with userspace crypto libraries.
1250
1251	  Enable this only if needed for support for a program that hasn't yet
1252	  been converted to userspace crypto, for example iwd.
1253
1254	  See also Documentation/crypto/userspace-if.rst
1255
1256config CRYPTO_USER_API_SKCIPHER
1257	tristate "Symmetric key cipher algorithms (deprecated)"
1258	depends on NET
1259	select CRYPTO_SKCIPHER
1260	select CRYPTO_USER_API
1261	help
1262	  Enable the AF_ALG userspace interface for symmetric key algorithms.
1263	  This provides unprivileged userspace programs access to arbitrary
1264	  symmetric key algorithms implemented in the kernel's privileged
1265	  execution context.
1266
1267	  This interface is deprecated and is supported only for backwards
1268	  compatibility.  It regularly has vulnerabilities, and the capabilities
1269	  it provides are redundant with userspace crypto libraries.
1270
1271	  Enable this only if needed for support for a program that hasn't yet
1272	  been converted to userspace crypto, for example iwd, or cryptsetup
1273	  with certain algorithms.
1274
1275	  See also Documentation/crypto/userspace-if.rst
1276
1277config CRYPTO_USER_API_RNG
1278	tristate "Random number generation algorithms (deprecated)"
1279	depends on NET
1280	select CRYPTO_RNG
1281	select CRYPTO_USER_API
1282	help
1283	  Enable the AF_ALG userspace interface for random number generation
1284	  (RNG) algorithms.  This provides unprivileged userspace programs
1285	  access to arbitrary RNG algorithms implemented in the kernel's
1286	  privileged execution context.
1287
1288	  This interface is deprecated and is supported only for backwards
1289	  compatibility.  It regularly has vulnerabilities, and the capabilities
1290	  it provides are redundant with userspace crypto libraries as well as
1291	  the normal kernel RNG (e.g., /dev/urandom and getrandom(2)).
1292
1293	  See also Documentation/crypto/userspace-if.rst
1294
1295config CRYPTO_USER_API_RNG_CAVP
1296	bool "Enable CAVP testing of DRBG"
1297	depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
1298	help
1299	  Enable extra APIs in the userspace interface for NIST CAVP
1300	  (Cryptographic Algorithm Validation Program) testing:
1301	  - resetting DRBG entropy
1302	  - providing Additional Data
1303
1304	  This should only be enabled for CAVP testing. You should say
1305	  no unless you know what this is.
1306
1307config CRYPTO_USER_API_AEAD
1308	tristate "AEAD cipher algorithms (deprecated)"
1309	depends on NET
1310	select CRYPTO_AEAD
1311	select CRYPTO_SKCIPHER
1312	select CRYPTO_USER_API
1313	help
1314	  Enable the AF_ALG userspace interface for authenticated encryption
1315	  with associated data (AEAD) algorithms.  This provides unprivileged
1316	  userspace programs access to arbitrary AEAD algorithms implemented in
1317	  the kernel's privileged execution context.
1318
1319	  This interface is deprecated and is supported only for backwards
1320	  compatibility.  It regularly has vulnerabilities, and the capabilities
1321	  it provides are redundant with userspace crypto libraries.
1322
1323	  Enable this only if needed for support for a program that hasn't yet
1324	  been converted to userspace crypto, for example iwd.
1325
1326	  See also Documentation/crypto/userspace-if.rst
1327
1328config CRYPTO_USER_API_ENABLE_OBSOLETE
1329	bool "Obsolete cryptographic algorithms"
1330	depends on CRYPTO_USER_API
1331	default y
1332	help
1333	  Allow obsolete cryptographic algorithms to be selected that have
1334	  already been phased out from internal use by the kernel, and are
1335	  only useful for userspace clients that still rely on them.
1336
1337endmenu
1338
1339if !KMSAN # avoid false positives from assembly
1340if ARM
1341source "arch/arm/crypto/Kconfig"
1342endif
1343if ARM64
1344source "arch/arm64/crypto/Kconfig"
1345endif
1346if PPC
1347source "arch/powerpc/crypto/Kconfig"
1348endif
1349if RISCV
1350source "arch/riscv/crypto/Kconfig"
1351endif
1352if S390
1353source "arch/s390/crypto/Kconfig"
1354endif
1355if SPARC
1356source "arch/sparc/crypto/Kconfig"
1357endif
1358if X86
1359source "arch/x86/crypto/Kconfig"
1360endif
1361endif
1362
1363source "drivers/crypto/Kconfig"
1364source "crypto/asymmetric_keys/Kconfig"
1365source "certs/Kconfig"
1366source "crypto/krb5/Kconfig"
1367
1368endif	# if CRYPTO
1369