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