xref: /linux/crypto/Kconfig (revision 440d6635b20037bc9ad46b20817d7b61cef0fc1b)
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_FCRYPT
468	tristate "FCrypt"
469	select CRYPTO_ALGAPI
470	select CRYPTO_SKCIPHER
471	help
472	  FCrypt algorithm used by RxRPC
473
474	  See https://ota.polyonymo.us/fcrypt-paper.txt
475
476config CRYPTO_KHAZAD
477	tristate "Khazad"
478	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
479	select CRYPTO_ALGAPI
480	help
481	  Khazad cipher algorithm
482
483	  Khazad was a finalist in the initial NESSIE competition.  It is
484	  an algorithm optimized for 64-bit processors with good performance
485	  on 32-bit processors.  Khazad uses an 128 bit key size.
486
487	  See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
488	  for further information.
489
490config CRYPTO_SEED
491	tristate "SEED"
492	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
493	select CRYPTO_ALGAPI
494	help
495	  SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
496
497	  SEED is a 128-bit symmetric key block cipher that has been
498	  developed by KISA (Korea Information Security Agency) as a
499	  national standard encryption algorithm of the Republic of Korea.
500	  It is a 16 round block cipher with the key size of 128 bit.
501
502	  See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
503	  for further information.
504
505config CRYPTO_SERPENT
506	tristate "Serpent"
507	select CRYPTO_ALGAPI
508	help
509	  Serpent cipher algorithm, by Anderson, Biham & Knudsen
510
511	  Keys are allowed to be from 0 to 256 bits in length, in steps
512	  of 8 bits.
513
514	  See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
515
516config CRYPTO_SM4
517	tristate
518
519config CRYPTO_SM4_GENERIC
520	tristate "SM4 (ShangMi 4)"
521	select CRYPTO_ALGAPI
522	select CRYPTO_SM4
523	help
524	  SM4 cipher algorithms (OSCCA GB/T 32907-2016,
525	  ISO/IEC 18033-3:2010/Amd 1:2021)
526
527	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
528	  Organization of State Commercial Administration of China (OSCCA)
529	  as an authorized cryptographic algorithms for the use within China.
530
531	  SMS4 was originally created for use in protecting wireless
532	  networks, and is mandated in the Chinese National Standard for
533	  Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
534	  (GB.15629.11-2003).
535
536	  The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
537	  standardized through TC 260 of the Standardization Administration
538	  of the People's Republic of China (SAC).
539
540	  The input, output, and key of SMS4 are each 128 bits.
541
542	  See https://eprint.iacr.org/2008/329.pdf for further information.
543
544	  If unsure, say N.
545
546config CRYPTO_TEA
547	tristate "TEA, XTEA and XETA"
548	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
549	select CRYPTO_ALGAPI
550	help
551	  TEA (Tiny Encryption Algorithm) cipher algorithms
552
553	  Tiny Encryption Algorithm is a simple cipher that uses
554	  many rounds for security.  It is very fast and uses
555	  little memory.
556
557	  Xtendend Tiny Encryption Algorithm is a modification to
558	  the TEA algorithm to address a potential key weakness
559	  in the TEA algorithm.
560
561	  Xtendend Encryption Tiny Algorithm is a mis-implementation
562	  of the XTEA algorithm for compatibility purposes.
563
564config CRYPTO_TWOFISH
565	tristate "Twofish"
566	select CRYPTO_ALGAPI
567	select CRYPTO_TWOFISH_COMMON
568	help
569	  Twofish cipher algorithm
570
571	  Twofish was submitted as an AES (Advanced Encryption Standard)
572	  candidate cipher by researchers at CounterPane Systems.  It is a
573	  16 round block cipher supporting key sizes of 128, 192, and 256
574	  bits.
575
576	  See https://www.schneier.com/twofish.html for further information.
577
578config CRYPTO_TWOFISH_COMMON
579	tristate
580	help
581	  Common parts of the Twofish cipher algorithm shared by the
582	  generic c and the assembler implementations.
583
584endmenu
585
586menu "Length-preserving ciphers and modes"
587
588config CRYPTO_ADIANTUM
589	tristate "Adiantum"
590	select CRYPTO_CHACHA20
591	select CRYPTO_LIB_NH
592	select CRYPTO_LIB_POLY1305
593	select CRYPTO_LIB_POLY1305_GENERIC
594	select CRYPTO_MANAGER
595	help
596	  Adiantum tweakable, length-preserving encryption mode
597
598	  Designed for fast and secure disk encryption, especially on
599	  CPUs without dedicated crypto instructions.  It encrypts
600	  each sector using the XChaCha12 stream cipher, two passes of
601	  an ε-almost-∆-universal hash function, and an invocation of
602	  the AES-256 block cipher on a single 16-byte block.  On CPUs
603	  without AES instructions, Adiantum is much faster than
604	  AES-XTS.
605
606	  Adiantum's security is provably reducible to that of its
607	  underlying stream and block ciphers, subject to a security
608	  bound.  Unlike XTS, Adiantum is a true wide-block encryption
609	  mode, so it actually provides an even stronger notion of
610	  security than XTS, subject to the security bound.
611
612	  If unsure, say N.
613
614config CRYPTO_ARC4
615	tristate "ARC4 (Alleged Rivest Cipher 4)"
616	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
617	select CRYPTO_SKCIPHER
618	select CRYPTO_LIB_ARC4
619	help
620	  ARC4 cipher algorithm
621
622	  ARC4 is a stream cipher using keys ranging from 8 bits to 2048
623	  bits in length.  This algorithm is required for driver-based
624	  WEP, but it should not be for other purposes because of the
625	  weakness of the algorithm.
626
627config CRYPTO_CHACHA20
628	tristate "ChaCha"
629	select CRYPTO_LIB_CHACHA
630	select CRYPTO_SKCIPHER
631	help
632	  The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
633
634	  ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
635	  Bernstein and further specified in RFC7539 for use in IETF protocols.
636	  This is the portable C implementation of ChaCha20.  See
637	  https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
638
639	  XChaCha20 is the application of the XSalsa20 construction to ChaCha20
640	  rather than to Salsa20.  XChaCha20 extends ChaCha20's nonce length
641	  from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
642	  while provably retaining ChaCha20's security.  See
643	  https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
644
645	  XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
646	  reduced security margin but increased performance.  It can be needed
647	  in some performance-sensitive scenarios.
648
649config CRYPTO_CBC
650	tristate "CBC (Cipher Block Chaining)"
651	select CRYPTO_SKCIPHER
652	select CRYPTO_MANAGER
653	help
654	  CBC (Cipher Block Chaining) mode (NIST SP800-38A)
655
656	  This block cipher mode is required for IPSec ESP (XFRM_ESP).
657
658config CRYPTO_CTR
659	tristate "CTR (Counter)"
660	select CRYPTO_SKCIPHER
661	select CRYPTO_MANAGER
662	help
663	  CTR (Counter) mode (NIST SP800-38A)
664
665config CRYPTO_CTS
666	tristate "CTS (Cipher Text Stealing)"
667	select CRYPTO_SKCIPHER
668	select CRYPTO_MANAGER
669	help
670	  CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
671	  Addendum to SP800-38A (October 2010))
672
673	  This mode is required for Kerberos gss mechanism support
674	  for AES encryption.
675
676config CRYPTO_ECB
677	tristate "ECB (Electronic Codebook)"
678	select CRYPTO_SKCIPHER2
679	select CRYPTO_MANAGER
680	help
681	  ECB (Electronic Codebook) mode (NIST SP800-38A)
682
683config CRYPTO_HCTR2
684	tristate "HCTR2"
685	select CRYPTO_XCTR
686	select CRYPTO_LIB_GF128HASH
687	select CRYPTO_MANAGER
688	help
689	  HCTR2 length-preserving encryption mode
690
691	  A mode for storage encryption that is efficient on processors with
692	  instructions to accelerate AES and carryless multiplication, e.g.
693	  x86 processors with AES-NI and CLMUL, and ARM processors with the
694	  ARMv8 crypto extensions.
695
696	  See https://eprint.iacr.org/2021/1441
697
698config CRYPTO_LRW
699	tristate "LRW (Liskov Rivest Wagner)"
700	select CRYPTO_LIB_GF128MUL
701	select CRYPTO_SKCIPHER
702	select CRYPTO_MANAGER
703	select CRYPTO_ECB
704	help
705	  LRW (Liskov Rivest Wagner) mode
706
707	  A tweakable, non malleable, non movable
708	  narrow block cipher mode for dm-crypt.  Use it with cipher
709	  specification string aes-lrw-benbi, the key must be 256, 320 or 384.
710	  The first 128, 192 or 256 bits in the key are used for AES and the
711	  rest is used to tie each cipher block to its logical position.
712
713	  See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
714
715config CRYPTO_PCBC
716	tristate "PCBC (Propagating Cipher Block Chaining)"
717	select CRYPTO_SKCIPHER
718	select CRYPTO_MANAGER
719	help
720	  PCBC (Propagating Cipher Block Chaining) mode
721
722	  This block cipher mode is required for RxRPC.
723
724config CRYPTO_XCTR
725	tristate
726	select CRYPTO_SKCIPHER
727	select CRYPTO_MANAGER
728	help
729	  XCTR (XOR Counter) mode for HCTR2
730
731	  This blockcipher mode is a variant of CTR mode using XORs and little-endian
732	  addition rather than big-endian arithmetic.
733
734	  XCTR mode is used to implement HCTR2.
735
736config CRYPTO_XTS
737	tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
738	select CRYPTO_SKCIPHER
739	select CRYPTO_MANAGER
740	select CRYPTO_ECB
741	help
742	  XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
743	  and IEEE 1619)
744
745	  Use with aes-xts-plain, key size 256, 384 or 512 bits. This
746	  implementation currently can't handle a sectorsize which is not a
747	  multiple of 16 bytes.
748
749endmenu
750
751menu "AEAD (authenticated encryption with associated data) ciphers"
752
753config CRYPTO_AEGIS128
754	tristate "AEGIS-128"
755	select CRYPTO_AEAD
756	select CRYPTO_LIB_AES  # for AES S-box tables
757	help
758	  AEGIS-128 AEAD algorithm
759
760config CRYPTO_AEGIS128_SIMD
761	bool "AEGIS-128 (arm NEON, arm64 NEON)"
762	depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
763	default y
764	help
765	  AEGIS-128 AEAD algorithm
766
767	  Architecture: arm or arm64 using:
768	  - NEON (Advanced SIMD) extension
769
770config CRYPTO_CHACHA20POLY1305
771	tristate "ChaCha20-Poly1305"
772	select CRYPTO_CHACHA20
773	select CRYPTO_AEAD
774	select CRYPTO_LIB_POLY1305
775	select CRYPTO_MANAGER
776	help
777	  ChaCha20 stream cipher and Poly1305 authenticator combined
778	  mode (RFC8439)
779
780config CRYPTO_CCM
781	tristate "CCM (Counter with Cipher Block Chaining-MAC)"
782	select CRYPTO_CTR
783	select CRYPTO_HASH
784	select CRYPTO_AEAD
785	select CRYPTO_MANAGER
786	help
787	  CCM (Counter with Cipher Block Chaining-Message Authentication Code)
788	  authenticated encryption mode (NIST SP800-38C)
789
790config CRYPTO_GCM
791	tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
792	select CRYPTO_CTR
793	select CRYPTO_AEAD
794	select CRYPTO_LIB_GF128HASH
795	select CRYPTO_MANAGER
796	help
797	  GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
798	  (GCM Message Authentication Code) (NIST SP800-38D)
799
800	  This is required for IPSec ESP (XFRM_ESP).
801
802config CRYPTO_GENIV
803	tristate
804	select CRYPTO_AEAD
805	select CRYPTO_MANAGER
806
807config CRYPTO_SEQIV
808	tristate "Sequence Number IV Generator"
809	select CRYPTO_GENIV
810	help
811	  Sequence Number IV generator
812
813	  This IV generator generates an IV based on a sequence number by
814	  xoring it with a salt.  This algorithm is mainly useful for CTR.
815
816	  This is required for IPsec ESP (XFRM_ESP).
817
818config CRYPTO_ECHAINIV
819	tristate "Encrypted Chain IV Generator"
820	select CRYPTO_GENIV
821	help
822	  Encrypted Chain IV generator
823
824	  This IV generator generates an IV based on the encryption of
825	  a sequence number xored with a salt.  This is the default
826	  algorithm for CBC.
827
828config CRYPTO_ESSIV
829	tristate "Encrypted Salt-Sector IV Generator"
830	select CRYPTO_AUTHENC
831	help
832	  Encrypted Salt-Sector IV generator
833
834	  This IV generator is used in some cases by fscrypt and/or
835	  dm-crypt. It uses the hash of the block encryption key as the
836	  symmetric key for a block encryption pass applied to the input
837	  IV, making low entropy IV sources more suitable for block
838	  encryption.
839
840	  This driver implements a crypto API template that can be
841	  instantiated either as an skcipher or as an AEAD (depending on the
842	  type of the first template argument), and which defers encryption
843	  and decryption requests to the encapsulated cipher after applying
844	  ESSIV to the input IV. Note that in the AEAD case, it is assumed
845	  that the keys are presented in the same format used by the authenc
846	  template, and that the IV appears at the end of the authenticated
847	  associated data (AAD) region (which is how dm-crypt uses it.)
848
849	  Note that the use of ESSIV is not recommended for new deployments,
850	  and so this only needs to be enabled when interoperability with
851	  existing encrypted volumes of filesystems is required, or when
852	  building for a particular system that requires it (e.g., when
853	  the SoC in question has accelerated CBC but not XTS, making CBC
854	  combined with ESSIV the only feasible mode for h/w accelerated
855	  block encryption)
856
857endmenu
858
859menu "Hashes, digests, and MACs"
860
861config CRYPTO_BLAKE2B
862	tristate "BLAKE2b"
863	select CRYPTO_HASH
864	select CRYPTO_LIB_BLAKE2B
865	help
866	  BLAKE2b cryptographic hash function (RFC 7693)
867
868	  BLAKE2b is optimized for 64-bit platforms and can produce digests
869	  of any size between 1 and 64 bytes. The keyed hash is also implemented.
870
871	  This module provides the following algorithms:
872	  - blake2b-160
873	  - blake2b-256
874	  - blake2b-384
875	  - blake2b-512
876
877	  See https://blake2.net for further information.
878
879config CRYPTO_CMAC
880	tristate "CMAC (Cipher-based MAC)"
881	select CRYPTO_HASH
882	select CRYPTO_MANAGER
883	help
884	  CMAC (Cipher-based Message Authentication Code) authentication
885	  mode (NIST SP800-38B and IETF RFC4493)
886
887config CRYPTO_HMAC
888	tristate "HMAC (Keyed-Hash MAC)"
889	select CRYPTO_HASH
890	select CRYPTO_MANAGER
891	help
892	  HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
893	  RFC2104)
894
895	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
896
897config CRYPTO_MD4
898	tristate "MD4"
899	select CRYPTO_HASH
900	help
901	  MD4 message digest algorithm (RFC1320)
902
903config CRYPTO_MD5
904	tristate "MD5"
905	select CRYPTO_HASH
906	select CRYPTO_LIB_MD5
907	help
908	  MD5 message digest algorithm (RFC1321), including HMAC support.
909
910config CRYPTO_RMD160
911	tristate "RIPEMD-160"
912	select CRYPTO_HASH
913	help
914	  RIPEMD-160 hash function (ISO/IEC 10118-3)
915
916	  RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
917	  to be used as a secure replacement for the 128-bit hash functions
918	  MD4, MD5 and its predecessor RIPEMD
919	  (not to be confused with RIPEMD-128).
920
921	  Its speed is comparable to SHA-1 and there are no known attacks
922	  against RIPEMD-160.
923
924	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
925	  See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
926	  for further information.
927
928config CRYPTO_SHA1
929	tristate "SHA-1"
930	select CRYPTO_HASH
931	select CRYPTO_LIB_SHA1
932	help
933	  SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3), including
934	  HMAC support.
935
936config CRYPTO_SHA256
937	tristate "SHA-224 and SHA-256"
938	select CRYPTO_HASH
939	select CRYPTO_LIB_SHA256
940	help
941	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC
942	  10118-3), including HMAC support.
943
944	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
945
946config CRYPTO_SHA512
947	tristate "SHA-384 and SHA-512"
948	select CRYPTO_HASH
949	select CRYPTO_LIB_SHA512
950	help
951	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC
952	  10118-3), including HMAC support.
953
954config CRYPTO_SHA3
955	tristate "SHA-3"
956	select CRYPTO_HASH
957	select CRYPTO_LIB_SHA3
958	help
959	  SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
960
961config CRYPTO_SM3
962	tristate "SM3 (ShangMi 3)"
963	select CRYPTO_HASH
964	select CRYPTO_LIB_SM3
965	help
966	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
967
968	  This is part of the Chinese Commercial Cryptography suite.
969
970	  References:
971	  http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
972	  https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
973
974config CRYPTO_STREEBOG
975	tristate "Streebog"
976	select CRYPTO_HASH
977	help
978	  Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
979
980	  This is one of the Russian cryptographic standard algorithms (called
981	  GOST algorithms). This setting enables two hash algorithms with
982	  256 and 512 bits output.
983
984	  References:
985	  https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
986	  https://tools.ietf.org/html/rfc6986
987
988config CRYPTO_WP512
989	tristate "Whirlpool"
990	select CRYPTO_HASH
991	help
992	  Whirlpool hash function (ISO/IEC 10118-3)
993
994	  512, 384 and 256-bit hashes.
995
996	  Whirlpool-512 is part of the NESSIE cryptographic primitives.
997
998	  See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
999	  for further information.
1000
1001config CRYPTO_XCBC
1002	tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
1003	select CRYPTO_HASH
1004	select CRYPTO_MANAGER
1005	help
1006	  XCBC-MAC (Extended Cipher Block Chaining Message Authentication
1007	  Code) (RFC3566)
1008
1009config CRYPTO_XXHASH
1010	tristate "xxHash"
1011	select CRYPTO_HASH
1012	select XXHASH
1013	help
1014	  xxHash non-cryptographic hash algorithm
1015
1016	  Extremely fast, working at speeds close to RAM limits.
1017
1018endmenu
1019
1020menu "CRCs (cyclic redundancy checks)"
1021
1022config CRYPTO_CRC32C
1023	tristate "CRC32c"
1024	select CRYPTO_HASH
1025	select CRC32
1026	help
1027	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1028
1029	  A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1030	  by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
1031	  Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1032	  on Communications, Vol. 41, No. 6, June 1993, selected for use with
1033	  iSCSI.
1034
1035config CRYPTO_CRC32
1036	tristate "CRC32"
1037	select CRYPTO_HASH
1038	select CRC32
1039	help
1040	  CRC32 CRC algorithm (IEEE 802.3)
1041
1042endmenu
1043
1044menu "Compression"
1045
1046config CRYPTO_DEFLATE
1047	tristate "Deflate"
1048	select CRYPTO_ALGAPI
1049	select CRYPTO_ACOMP2
1050	select ZLIB_INFLATE
1051	select ZLIB_DEFLATE
1052	help
1053	  Deflate compression algorithm (RFC1951)
1054
1055	  Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
1056
1057config CRYPTO_LZO
1058	tristate "LZO"
1059	select CRYPTO_ALGAPI
1060	select CRYPTO_ACOMP2
1061	select LZO_COMPRESS
1062	select LZO_DECOMPRESS
1063	help
1064	  LZO compression algorithm
1065
1066	  See https://www.oberhumer.com/opensource/lzo/ for further information.
1067
1068config CRYPTO_842
1069	tristate "842"
1070	select CRYPTO_ALGAPI
1071	select CRYPTO_ACOMP2
1072	select 842_COMPRESS
1073	select 842_DECOMPRESS
1074	help
1075	  842 compression algorithm by IBM
1076
1077	  See https://github.com/plauth/lib842 for further information.
1078
1079config CRYPTO_LZ4
1080	tristate "LZ4"
1081	select CRYPTO_ALGAPI
1082	select CRYPTO_ACOMP2
1083	select LZ4_COMPRESS
1084	select LZ4_DECOMPRESS
1085	help
1086	  LZ4 compression algorithm
1087
1088	  See https://github.com/lz4/lz4 for further information.
1089
1090config CRYPTO_LZ4HC
1091	tristate "LZ4HC"
1092	select CRYPTO_ALGAPI
1093	select CRYPTO_ACOMP2
1094	select LZ4HC_COMPRESS
1095	select LZ4_DECOMPRESS
1096	help
1097	  LZ4 high compression mode algorithm
1098
1099	  See https://github.com/lz4/lz4 for further information.
1100
1101config CRYPTO_ZSTD
1102	tristate "Zstd"
1103	select CRYPTO_ALGAPI
1104	select CRYPTO_ACOMP2
1105	select ZSTD_COMPRESS
1106	select ZSTD_DECOMPRESS
1107	help
1108	  zstd compression algorithm
1109
1110	  See https://github.com/facebook/zstd for further information.
1111
1112endmenu
1113
1114menu "Random number generation"
1115
1116menuconfig CRYPTO_DRBG_MENU
1117	tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
1118	help
1119	  DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
1120
1121	  In the following submenu, one or more of the DRBG types must be selected.
1122
1123if CRYPTO_DRBG_MENU
1124
1125config CRYPTO_DRBG_HMAC
1126	bool
1127	default y
1128	select CRYPTO_HMAC
1129	select CRYPTO_SHA512
1130
1131config CRYPTO_DRBG_HASH
1132	bool "Hash_DRBG"
1133	select CRYPTO_SHA256
1134	help
1135	  Hash_DRBG variant as defined in NIST SP800-90A.
1136
1137	  This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms.
1138
1139config CRYPTO_DRBG_CTR
1140	bool "CTR_DRBG"
1141	select CRYPTO_DF80090A
1142	help
1143	  CTR_DRBG variant as defined in NIST SP800-90A.
1144
1145	  This uses the AES cipher algorithm with the counter block mode.
1146
1147config CRYPTO_DRBG
1148	tristate
1149	default CRYPTO_DRBG_MENU
1150	select CRYPTO_RNG
1151	select CRYPTO_JITTERENTROPY
1152
1153endif	# if CRYPTO_DRBG_MENU
1154
1155config CRYPTO_JITTERENTROPY
1156	tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
1157	select CRYPTO_LIB_SHA3
1158	select CRYPTO_RNG
1159	help
1160	  CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
1161
1162	  A non-physical non-deterministic ("true") RNG (e.g., an entropy source
1163	  compliant with NIST SP800-90B) intended to provide a seed to a
1164	  deterministic RNG (e.g., per NIST SP800-90C).
1165	  This RNG does not perform any cryptographic whitening of the generated
1166	  random numbers.
1167
1168	  See https://www.chronox.de/jent/
1169
1170if CRYPTO_JITTERENTROPY
1171if CRYPTO_FIPS && EXPERT
1172
1173choice
1174	prompt "CPU Jitter RNG Memory Size"
1175	default CRYPTO_JITTERENTROPY_MEMSIZE_2
1176	help
1177	  The Jitter RNG measures the execution time of memory accesses.
1178	  Multiple consecutive memory accesses are performed. If the memory
1179	  size fits into a cache (e.g. L1), only the memory access timing
1180	  to that cache is measured. The closer the cache is to the CPU
1181	  the less variations are measured and thus the less entropy is
1182	  obtained. Thus, if the memory size fits into the L1 cache, the
1183	  obtained entropy is less than if the memory size fits within
1184	  L1 + L2, which in turn is less if the memory fits into
1185	  L1 + L2 + L3. Thus, by selecting a different memory size,
1186	  the entropy rate produced by the Jitter RNG can be modified.
1187
1188	config CRYPTO_JITTERENTROPY_MEMSIZE_2
1189		bool "2048 Bytes (default)"
1190
1191	config CRYPTO_JITTERENTROPY_MEMSIZE_128
1192		bool "128 kBytes"
1193
1194	config CRYPTO_JITTERENTROPY_MEMSIZE_1024
1195		bool "1024 kBytes"
1196
1197	config CRYPTO_JITTERENTROPY_MEMSIZE_8192
1198		bool "8192 kBytes"
1199endchoice
1200
1201config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
1202	int
1203	default 64 if CRYPTO_JITTERENTROPY_MEMSIZE_2
1204	default 512 if CRYPTO_JITTERENTROPY_MEMSIZE_128
1205	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
1206	default 4096 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
1207
1208config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
1209	int
1210	default 32 if CRYPTO_JITTERENTROPY_MEMSIZE_2
1211	default 256 if CRYPTO_JITTERENTROPY_MEMSIZE_128
1212	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
1213	default 2048 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
1214
1215config CRYPTO_JITTERENTROPY_OSR
1216	int "CPU Jitter RNG Oversampling Rate"
1217	range 1 15
1218	default 3
1219	help
1220	  The Jitter RNG allows the specification of an oversampling rate (OSR).
1221	  The Jitter RNG operation requires a fixed amount of timing
1222	  measurements to produce one output block of random numbers. The
1223	  OSR value is multiplied with the amount of timing measurements to
1224	  generate one output block. Thus, the timing measurement is oversampled
1225	  by the OSR factor. The oversampling allows the Jitter RNG to operate
1226	  on hardware whose timers deliver limited amount of entropy (e.g.
1227	  the timer is coarse) by setting the OSR to a higher value. The
1228	  trade-off, however, is that the Jitter RNG now requires more time
1229	  to generate random numbers.
1230
1231config CRYPTO_JITTERENTROPY_TESTINTERFACE
1232	bool "CPU Jitter RNG Test Interface"
1233	help
1234	  The test interface allows a privileged process to capture
1235	  the raw unconditioned high resolution time stamp noise that
1236	  is collected by the Jitter RNG for statistical analysis. As
1237	  this data is used at the same time to generate random bits,
1238	  the Jitter RNG operates in an insecure mode as long as the
1239	  recording is enabled. This interface therefore is only
1240	  intended for testing purposes and is not suitable for
1241	  production systems.
1242
1243	  The raw noise data can be obtained using the jent_raw_hires
1244	  debugfs file. Using the option
1245	  jitterentropy_testing.boot_raw_hires_test=1 the raw noise of
1246	  the first 1000 entropy events since boot can be sampled.
1247
1248	  If unsure, select N.
1249
1250endif	# if CRYPTO_FIPS && EXPERT
1251
1252if !(CRYPTO_FIPS && EXPERT)
1253
1254config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
1255	int
1256	default 64
1257
1258config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
1259	int
1260	default 32
1261
1262config CRYPTO_JITTERENTROPY_OSR
1263	int
1264	default 1
1265
1266config CRYPTO_JITTERENTROPY_TESTINTERFACE
1267	bool
1268
1269endif	# if !(CRYPTO_FIPS && EXPERT)
1270endif	# if CRYPTO_JITTERENTROPY
1271
1272config CRYPTO_KDF800108_CTR
1273	tristate
1274	select CRYPTO_HMAC
1275	select CRYPTO_SHA256
1276
1277config CRYPTO_DF80090A
1278	tristate
1279	select CRYPTO_AES
1280	select CRYPTO_CTR
1281
1282endmenu
1283menu "Userspace interface"
1284
1285config CRYPTO_USER_API
1286	tristate
1287
1288config CRYPTO_USER_API_HASH
1289	tristate "Hash algorithms"
1290	depends on NET
1291	select CRYPTO_HASH
1292	select CRYPTO_USER_API
1293	help
1294	  Enable the userspace interface for hash algorithms.
1295
1296	  See Documentation/crypto/userspace-if.rst and
1297	  https://www.chronox.de/libkcapi/html/index.html
1298
1299config CRYPTO_USER_API_SKCIPHER
1300	tristate "Symmetric key cipher algorithms"
1301	depends on NET
1302	select CRYPTO_SKCIPHER
1303	select CRYPTO_USER_API
1304	help
1305	  Enable the userspace interface for symmetric key cipher algorithms.
1306
1307	  See Documentation/crypto/userspace-if.rst and
1308	  https://www.chronox.de/libkcapi/html/index.html
1309
1310config CRYPTO_USER_API_RNG
1311	tristate "RNG (random number generator) algorithms"
1312	depends on NET
1313	select CRYPTO_RNG
1314	select CRYPTO_USER_API
1315	help
1316	  Enable the userspace interface for RNG (random number generator)
1317	  algorithms.
1318
1319	  See Documentation/crypto/userspace-if.rst and
1320	  https://www.chronox.de/libkcapi/html/index.html
1321
1322config CRYPTO_USER_API_RNG_CAVP
1323	bool "Enable CAVP testing of DRBG"
1324	depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
1325	help
1326	  Enable extra APIs in the userspace interface for NIST CAVP
1327	  (Cryptographic Algorithm Validation Program) testing:
1328	  - resetting DRBG entropy
1329	  - providing Additional Data
1330
1331	  This should only be enabled for CAVP testing. You should say
1332	  no unless you know what this is.
1333
1334config CRYPTO_USER_API_AEAD
1335	tristate "AEAD cipher algorithms"
1336	depends on NET
1337	select CRYPTO_AEAD
1338	select CRYPTO_SKCIPHER
1339	select CRYPTO_USER_API
1340	help
1341	  Enable the userspace interface for AEAD cipher algorithms.
1342
1343	  See Documentation/crypto/userspace-if.rst and
1344	  https://www.chronox.de/libkcapi/html/index.html
1345
1346config CRYPTO_USER_API_ENABLE_OBSOLETE
1347	bool "Obsolete cryptographic algorithms"
1348	depends on CRYPTO_USER_API
1349	default y
1350	help
1351	  Allow obsolete cryptographic algorithms to be selected that have
1352	  already been phased out from internal use by the kernel, and are
1353	  only useful for userspace clients that still rely on them.
1354
1355endmenu
1356
1357if !KMSAN # avoid false positives from assembly
1358if ARM
1359source "arch/arm/crypto/Kconfig"
1360endif
1361if ARM64
1362source "arch/arm64/crypto/Kconfig"
1363endif
1364if LOONGARCH
1365source "arch/loongarch/crypto/Kconfig"
1366endif
1367if MIPS
1368source "arch/mips/crypto/Kconfig"
1369endif
1370if PPC
1371source "arch/powerpc/crypto/Kconfig"
1372endif
1373if RISCV
1374source "arch/riscv/crypto/Kconfig"
1375endif
1376if S390
1377source "arch/s390/crypto/Kconfig"
1378endif
1379if SPARC
1380source "arch/sparc/crypto/Kconfig"
1381endif
1382if X86
1383source "arch/x86/crypto/Kconfig"
1384endif
1385endif
1386
1387source "drivers/crypto/Kconfig"
1388source "crypto/asymmetric_keys/Kconfig"
1389source "certs/Kconfig"
1390source "crypto/krb5/Kconfig"
1391
1392endif	# if CRYPTO
1393