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