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