• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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	help
19	  This option provides the core Cryptographic API.
20
21if CRYPTO
22
23comment "Crypto core or helper"
24
25config CRYPTO_FIPS
26	bool "FIPS 200 compliance"
27	depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS
28	depends on (MODULE_SIG || !MODULES)
29	help
30	  This option enables the fips boot option which is
31	  required if you want the system to operate in a FIPS 200
32	  certification.  You should say no unless you know what
33	  this is.
34
35config CRYPTO_ALGAPI
36	tristate
37	select CRYPTO_ALGAPI2
38	help
39	  This option provides the API for cryptographic algorithms.
40
41config CRYPTO_ALGAPI2
42	tristate
43
44config CRYPTO_AEAD
45	tristate
46	select CRYPTO_AEAD2
47	select CRYPTO_ALGAPI
48
49config CRYPTO_AEAD2
50	tristate
51	select CRYPTO_ALGAPI2
52	select CRYPTO_NULL2
53	select CRYPTO_RNG2
54
55config CRYPTO_BLKCIPHER
56	tristate
57	select CRYPTO_BLKCIPHER2
58	select CRYPTO_ALGAPI
59
60config CRYPTO_BLKCIPHER2
61	tristate
62	select CRYPTO_ALGAPI2
63	select CRYPTO_RNG2
64
65config CRYPTO_HASH
66	tristate
67	select CRYPTO_HASH2
68	select CRYPTO_ALGAPI
69
70config CRYPTO_HASH2
71	tristate
72	select CRYPTO_ALGAPI2
73
74config CRYPTO_RNG
75	tristate
76	select CRYPTO_RNG2
77	select CRYPTO_ALGAPI
78
79config CRYPTO_RNG2
80	tristate
81	select CRYPTO_ALGAPI2
82
83config CRYPTO_RNG_DEFAULT
84	tristate
85	select CRYPTO_DRBG_MENU
86
87config CRYPTO_AKCIPHER2
88	tristate
89	select CRYPTO_ALGAPI2
90
91config CRYPTO_AKCIPHER
92	tristate
93	select CRYPTO_AKCIPHER2
94	select CRYPTO_ALGAPI
95
96config CRYPTO_KPP2
97	tristate
98	select CRYPTO_ALGAPI2
99
100config CRYPTO_KPP
101	tristate
102	select CRYPTO_ALGAPI
103	select CRYPTO_KPP2
104
105config CRYPTO_ACOMP2
106	tristate
107	select CRYPTO_ALGAPI2
108	select SGL_ALLOC
109
110config CRYPTO_ACOMP
111	tristate
112	select CRYPTO_ALGAPI
113	select CRYPTO_ACOMP2
114
115config CRYPTO_MANAGER
116	tristate "Cryptographic algorithm manager"
117	select CRYPTO_MANAGER2
118	help
119	  Create default cryptographic template instantiations such as
120	  cbc(aes).
121
122config CRYPTO_MANAGER2
123	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
124	select CRYPTO_AEAD2
125	select CRYPTO_HASH2
126	select CRYPTO_BLKCIPHER2
127	select CRYPTO_AKCIPHER2
128	select CRYPTO_KPP2
129	select CRYPTO_ACOMP2
130
131config CRYPTO_USER
132	tristate "Userspace cryptographic algorithm configuration"
133	depends on NET
134	select CRYPTO_MANAGER
135	help
136	  Userspace configuration for cryptographic instantiations such as
137	  cbc(aes).
138
139if CRYPTO_MANAGER2
140
141config CRYPTO_MANAGER_DISABLE_TESTS
142	bool "Disable run-time self tests"
143	default y
144	help
145	  Disable run-time self tests that normally take place at
146	  algorithm registration.
147
148config CRYPTO_MANAGER_EXTRA_TESTS
149	bool "Enable extra run-time crypto self tests"
150	depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS
151	help
152	  Enable extra run-time self tests of registered crypto algorithms,
153	  including randomized fuzz tests.
154
155	  This is intended for developer use only, as these tests take much
156	  longer to run than the normal self tests.
157
158endif	# if CRYPTO_MANAGER2
159
160config CRYPTO_GF128MUL
161	tristate
162
163config CRYPTO_NULL
164	tristate "Null algorithms"
165	select CRYPTO_NULL2
166	help
167	  These are 'Null' algorithms, used by IPsec, which do nothing.
168
169config CRYPTO_NULL2
170	tristate
171	select CRYPTO_ALGAPI2
172	select CRYPTO_BLKCIPHER2
173	select CRYPTO_HASH2
174
175config CRYPTO_PCRYPT
176	tristate "Parallel crypto engine"
177	depends on SMP
178	select PADATA
179	select CRYPTO_MANAGER
180	select CRYPTO_AEAD
181	help
182	  This converts an arbitrary crypto algorithm into a parallel
183	  algorithm that executes in kernel threads.
184
185config CRYPTO_CRYPTD
186	tristate "Software async crypto daemon"
187	select CRYPTO_BLKCIPHER
188	select CRYPTO_HASH
189	select CRYPTO_MANAGER
190	help
191	  This is a generic software asynchronous crypto daemon that
192	  converts an arbitrary synchronous software crypto algorithm
193	  into an asynchronous algorithm that executes in a kernel thread.
194
195config CRYPTO_AUTHENC
196	tristate "Authenc support"
197	select CRYPTO_AEAD
198	select CRYPTO_BLKCIPHER
199	select CRYPTO_MANAGER
200	select CRYPTO_HASH
201	select CRYPTO_NULL
202	help
203	  Authenc: Combined mode wrapper for IPsec.
204	  This is required for IPSec.
205
206config CRYPTO_TEST
207	tristate "Testing module"
208	depends on m
209	select CRYPTO_MANAGER
210	help
211	  Quick & dirty crypto test module.
212
213config CRYPTO_SIMD
214	tristate
215	select CRYPTO_CRYPTD
216
217config CRYPTO_GLUE_HELPER_X86
218	tristate
219	depends on X86
220	select CRYPTO_BLKCIPHER
221
222config CRYPTO_ENGINE
223	tristate
224
225comment "Public-key cryptography"
226
227config CRYPTO_RSA
228	tristate "RSA algorithm"
229	select CRYPTO_AKCIPHER
230	select CRYPTO_MANAGER
231	select MPILIB
232	select ASN1
233	help
234	  Generic implementation of the RSA public key algorithm.
235
236config CRYPTO_DH
237	tristate "Diffie-Hellman algorithm"
238	select CRYPTO_KPP
239	select MPILIB
240	help
241	  Generic implementation of the Diffie-Hellman algorithm.
242
243config CRYPTO_ECC
244	tristate
245
246config CRYPTO_ECDH
247	tristate "ECDH algorithm"
248	select CRYPTO_ECC
249	select CRYPTO_KPP
250	select CRYPTO_RNG_DEFAULT
251	help
252	  Generic implementation of the ECDH algorithm
253
254config CRYPTO_ECRDSA
255	tristate "EC-RDSA (GOST 34.10) algorithm"
256	select CRYPTO_ECC
257	select CRYPTO_AKCIPHER
258	select CRYPTO_STREEBOG
259	select OID_REGISTRY
260	select ASN1
261	help
262	  Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
263	  RFC 7091, ISO/IEC 14888-3:2018) is one of the Russian cryptographic
264	  standard algorithms (called GOST algorithms). Only signature verification
265	  is implemented.
266
267comment "Authenticated Encryption with Associated Data"
268
269config CRYPTO_CCM
270	tristate "CCM support"
271	select CRYPTO_CTR
272	select CRYPTO_HASH
273	select CRYPTO_AEAD
274	select CRYPTO_MANAGER
275	help
276	  Support for Counter with CBC MAC. Required for IPsec.
277
278config CRYPTO_GCM
279	tristate "GCM/GMAC support"
280	select CRYPTO_CTR
281	select CRYPTO_AEAD
282	select CRYPTO_GHASH
283	select CRYPTO_NULL
284	select CRYPTO_MANAGER
285	help
286	  Support for Galois/Counter Mode (GCM) and Galois Message
287	  Authentication Code (GMAC). Required for IPSec.
288
289config CRYPTO_CHACHA20POLY1305
290	tristate "ChaCha20-Poly1305 AEAD support"
291	select CRYPTO_CHACHA20
292	select CRYPTO_POLY1305
293	select CRYPTO_AEAD
294	select CRYPTO_MANAGER
295	help
296	  ChaCha20-Poly1305 AEAD support, RFC7539.
297
298	  Support for the AEAD wrapper using the ChaCha20 stream cipher combined
299	  with the Poly1305 authenticator. It is defined in RFC7539 for use in
300	  IETF protocols.
301
302config CRYPTO_AEGIS128
303	tristate "AEGIS-128 AEAD algorithm"
304	select CRYPTO_AEAD
305	select CRYPTO_AES  # for AES S-box tables
306	help
307	 Support for the AEGIS-128 dedicated AEAD algorithm.
308
309config CRYPTO_AEGIS128_SIMD
310	bool "Support SIMD acceleration for AEGIS-128"
311	depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
312	depends on !ARM || CC_IS_CLANG || GCC_VERSION >= 40800
313	default y
314
315config CRYPTO_AEGIS128_AESNI_SSE2
316	tristate "AEGIS-128 AEAD algorithm (x86_64 AESNI+SSE2 implementation)"
317	depends on X86 && 64BIT
318	select CRYPTO_AEAD
319	select CRYPTO_SIMD
320	help
321	 AESNI+SSE2 implementation of the AEGIS-128 dedicated AEAD algorithm.
322
323config CRYPTO_SEQIV
324	tristate "Sequence Number IV Generator"
325	select CRYPTO_AEAD
326	select CRYPTO_BLKCIPHER
327	select CRYPTO_NULL
328	select CRYPTO_RNG_DEFAULT
329	select CRYPTO_MANAGER
330	help
331	  This IV generator generates an IV based on a sequence number by
332	  xoring it with a salt.  This algorithm is mainly useful for CTR
333
334config CRYPTO_ECHAINIV
335	tristate "Encrypted Chain IV Generator"
336	select CRYPTO_AEAD
337	select CRYPTO_NULL
338	select CRYPTO_RNG_DEFAULT
339	select CRYPTO_MANAGER
340	help
341	  This IV generator generates an IV based on the encryption of
342	  a sequence number xored with a salt.  This is the default
343	  algorithm for CBC.
344
345comment "Block modes"
346
347config CRYPTO_CBC
348	tristate "CBC support"
349	select CRYPTO_BLKCIPHER
350	select CRYPTO_MANAGER
351	help
352	  CBC: Cipher Block Chaining mode
353	  This block cipher algorithm is required for IPSec.
354
355config CRYPTO_CFB
356	tristate "CFB support"
357	select CRYPTO_BLKCIPHER
358	select CRYPTO_MANAGER
359	help
360	  CFB: Cipher FeedBack mode
361	  This block cipher algorithm is required for TPM2 Cryptography.
362
363config CRYPTO_CTR
364	tristate "CTR support"
365	select CRYPTO_BLKCIPHER
366	select CRYPTO_SEQIV
367	select CRYPTO_MANAGER
368	help
369	  CTR: Counter mode
370	  This block cipher algorithm is required for IPSec.
371
372config CRYPTO_CTS
373	tristate "CTS support"
374	select CRYPTO_BLKCIPHER
375	select CRYPTO_MANAGER
376	help
377	  CTS: Cipher Text Stealing
378	  This is the Cipher Text Stealing mode as described by
379	  Section 8 of rfc2040 and referenced by rfc3962
380	  (rfc3962 includes errata information in its Appendix A) or
381	  CBC-CS3 as defined by NIST in Sp800-38A addendum from Oct 2010.
382	  This mode is required for Kerberos gss mechanism support
383	  for AES encryption.
384
385	  See: https://csrc.nist.gov/publications/detail/sp/800-38a/addendum/final
386
387config CRYPTO_ECB
388	tristate "ECB support"
389	select CRYPTO_BLKCIPHER
390	select CRYPTO_MANAGER
391	help
392	  ECB: Electronic CodeBook mode
393	  This is the simplest block cipher algorithm.  It simply encrypts
394	  the input block by block.
395
396config CRYPTO_LRW
397	tristate "LRW support"
398	select CRYPTO_BLKCIPHER
399	select CRYPTO_MANAGER
400	select CRYPTO_GF128MUL
401	help
402	  LRW: Liskov Rivest Wagner, a tweakable, non malleable, non movable
403	  narrow block cipher mode for dm-crypt.  Use it with cipher
404	  specification string aes-lrw-benbi, the key must be 256, 320 or 384.
405	  The first 128, 192 or 256 bits in the key are used for AES and the
406	  rest is used to tie each cipher block to its logical position.
407
408config CRYPTO_OFB
409	tristate "OFB support"
410	select CRYPTO_BLKCIPHER
411	select CRYPTO_MANAGER
412	help
413	  OFB: the Output Feedback mode makes a block cipher into a synchronous
414	  stream cipher. It generates keystream blocks, which are then XORed
415	  with the plaintext blocks to get the ciphertext. Flipping a bit in the
416	  ciphertext produces a flipped bit in the plaintext at the same
417	  location. This property allows many error correcting codes to function
418	  normally even when applied before encryption.
419
420config CRYPTO_PCBC
421	tristate "PCBC support"
422	select CRYPTO_BLKCIPHER
423	select CRYPTO_MANAGER
424	help
425	  PCBC: Propagating Cipher Block Chaining mode
426	  This block cipher algorithm is required for RxRPC.
427
428config CRYPTO_XTS
429	tristate "XTS support"
430	select CRYPTO_BLKCIPHER
431	select CRYPTO_MANAGER
432	select CRYPTO_ECB
433	help
434	  XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain,
435	  key size 256, 384 or 512 bits. This implementation currently
436	  can't handle a sectorsize which is not a multiple of 16 bytes.
437
438config CRYPTO_KEYWRAP
439	tristate "Key wrapping support"
440	select CRYPTO_BLKCIPHER
441	select CRYPTO_MANAGER
442	help
443	  Support for key wrapping (NIST SP800-38F / RFC3394) without
444	  padding.
445
446config CRYPTO_NHPOLY1305
447	tristate
448	select CRYPTO_HASH
449	select CRYPTO_POLY1305
450
451config CRYPTO_NHPOLY1305_SSE2
452	tristate "NHPoly1305 hash function (x86_64 SSE2 implementation)"
453	depends on X86 && 64BIT
454	select CRYPTO_NHPOLY1305
455	help
456	  SSE2 optimized implementation of the hash function used by the
457	  Adiantum encryption mode.
458
459config CRYPTO_NHPOLY1305_AVX2
460	tristate "NHPoly1305 hash function (x86_64 AVX2 implementation)"
461	depends on X86 && 64BIT
462	select CRYPTO_NHPOLY1305
463	help
464	  AVX2 optimized implementation of the hash function used by the
465	  Adiantum encryption mode.
466
467config CRYPTO_ADIANTUM
468	tristate "Adiantum support"
469	select CRYPTO_CHACHA20
470	select CRYPTO_POLY1305
471	select CRYPTO_NHPOLY1305
472	select CRYPTO_MANAGER
473	help
474	  Adiantum is a tweakable, length-preserving encryption mode
475	  designed for fast and secure disk encryption, especially on
476	  CPUs without dedicated crypto instructions.  It encrypts
477	  each sector using the XChaCha12 stream cipher, two passes of
478	  an ε-almost-∆-universal hash function, and an invocation of
479	  the AES-256 block cipher on a single 16-byte block.  On CPUs
480	  without AES instructions, Adiantum is much faster than
481	  AES-XTS.
482
483	  Adiantum's security is provably reducible to that of its
484	  underlying stream and block ciphers, subject to a security
485	  bound.  Unlike XTS, Adiantum is a true wide-block encryption
486	  mode, so it actually provides an even stronger notion of
487	  security than XTS, subject to the security bound.
488
489	  If unsure, say N.
490
491config CRYPTO_ESSIV
492	tristate "ESSIV support for block encryption"
493	select CRYPTO_AUTHENC
494	help
495	  Encrypted salt-sector initialization vector (ESSIV) is an IV
496	  generation method that is used in some cases by fscrypt and/or
497	  dm-crypt. It uses the hash of the block encryption key as the
498	  symmetric key for a block encryption pass applied to the input
499	  IV, making low entropy IV sources more suitable for block
500	  encryption.
501
502	  This driver implements a crypto API template that can be
503	  instantiated either as a skcipher or as a aead (depending on the
504	  type of the first template argument), and which defers encryption
505	  and decryption requests to the encapsulated cipher after applying
506	  ESSIV to the input IV. Note that in the aead case, it is assumed
507	  that the keys are presented in the same format used by the authenc
508	  template, and that the IV appears at the end of the authenticated
509	  associated data (AAD) region (which is how dm-crypt uses it.)
510
511	  Note that the use of ESSIV is not recommended for new deployments,
512	  and so this only needs to be enabled when interoperability with
513	  existing encrypted volumes of filesystems is required, or when
514	  building for a particular system that requires it (e.g., when
515	  the SoC in question has accelerated CBC but not XTS, making CBC
516	  combined with ESSIV the only feasible mode for h/w accelerated
517	  block encryption)
518
519comment "Hash modes"
520
521config CRYPTO_CMAC
522	tristate "CMAC support"
523	select CRYPTO_HASH
524	select CRYPTO_MANAGER
525	help
526	  Cipher-based Message Authentication Code (CMAC) specified by
527	  The National Institute of Standards and Technology (NIST).
528
529	  https://tools.ietf.org/html/rfc4493
530	  http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf
531
532config CRYPTO_HMAC
533	tristate "HMAC support"
534	select CRYPTO_HASH
535	select CRYPTO_MANAGER
536	help
537	  HMAC: Keyed-Hashing for Message Authentication (RFC2104).
538	  This is required for IPSec.
539
540config CRYPTO_XCBC
541	tristate "XCBC support"
542	select CRYPTO_HASH
543	select CRYPTO_MANAGER
544	help
545	  XCBC: Keyed-Hashing with encryption algorithm
546		http://www.ietf.org/rfc/rfc3566.txt
547		http://csrc.nist.gov/encryption/modes/proposedmodes/
548		 xcbc-mac/xcbc-mac-spec.pdf
549
550config CRYPTO_VMAC
551	tristate "VMAC support"
552	select CRYPTO_HASH
553	select CRYPTO_MANAGER
554	help
555	  VMAC is a message authentication algorithm designed for
556	  very high speed on 64-bit architectures.
557
558	  See also:
559	  <http://fastcrypto.org/vmac>
560
561comment "Digest"
562
563config CRYPTO_CRC32C
564	tristate "CRC32c CRC algorithm"
565	select CRYPTO_HASH
566	select CRC32
567	help
568	  Castagnoli, et al Cyclic Redundancy-Check Algorithm.  Used
569	  by iSCSI for header and data digests and by others.
570	  See Castagnoli93.  Module will be crc32c.
571
572config CRYPTO_CRC32C_INTEL
573	tristate "CRC32c INTEL hardware acceleration"
574	depends on X86
575	select CRYPTO_HASH
576	help
577	  In Intel processor with SSE4.2 supported, the processor will
578	  support CRC32C implementation using hardware accelerated CRC32
579	  instruction. This option will create 'crc32c-intel' module,
580	  which will enable any routine to use the CRC32 instruction to
581	  gain performance compared with software implementation.
582	  Module will be crc32c-intel.
583
584config CRYPTO_CRC32C_VPMSUM
585	tristate "CRC32c CRC algorithm (powerpc64)"
586	depends on PPC64 && ALTIVEC
587	select CRYPTO_HASH
588	select CRC32
589	help
590	  CRC32c algorithm implemented using vector polynomial multiply-sum
591	  (vpmsum) instructions, introduced in POWER8. Enable on POWER8
592	  and newer processors for improved performance.
593
594
595config CRYPTO_CRC32C_SPARC64
596	tristate "CRC32c CRC algorithm (SPARC64)"
597	depends on SPARC64
598	select CRYPTO_HASH
599	select CRC32
600	help
601	  CRC32c CRC algorithm implemented using sparc64 crypto instructions,
602	  when available.
603
604config CRYPTO_CRC32
605	tristate "CRC32 CRC algorithm"
606	select CRYPTO_HASH
607	select CRC32
608	help
609	  CRC-32-IEEE 802.3 cyclic redundancy-check algorithm.
610	  Shash crypto api wrappers to crc32_le function.
611
612config CRYPTO_CRC32_PCLMUL
613	tristate "CRC32 PCLMULQDQ hardware acceleration"
614	depends on X86
615	select CRYPTO_HASH
616	select CRC32
617	help
618	  From Intel Westmere and AMD Bulldozer processor with SSE4.2
619	  and PCLMULQDQ supported, the processor will support
620	  CRC32 PCLMULQDQ implementation using hardware accelerated PCLMULQDQ
621	  instruction. This option will create 'crc32-pclmul' module,
622	  which will enable any routine to use the CRC-32-IEEE 802.3 checksum
623	  and gain better performance as compared with the table implementation.
624
625config CRYPTO_CRC32_MIPS
626	tristate "CRC32c and CRC32 CRC algorithm (MIPS)"
627	depends on MIPS_CRC_SUPPORT
628	select CRYPTO_HASH
629	help
630	  CRC32c and CRC32 CRC algorithms implemented using mips crypto
631	  instructions, when available.
632
633
634config CRYPTO_XXHASH
635	tristate "xxHash hash algorithm"
636	select CRYPTO_HASH
637	select XXHASH
638	help
639	  xxHash non-cryptographic hash algorithm. Extremely fast, working at
640	  speeds close to RAM limits.
641
642config CRYPTO_CRCT10DIF
643	tristate "CRCT10DIF algorithm"
644	select CRYPTO_HASH
645	help
646	  CRC T10 Data Integrity Field computation is being cast as
647	  a crypto transform.  This allows for faster crc t10 diff
648	  transforms to be used if they are available.
649
650config CRYPTO_CRCT10DIF_PCLMUL
651	tristate "CRCT10DIF PCLMULQDQ hardware acceleration"
652	depends on X86 && 64BIT && CRC_T10DIF
653	select CRYPTO_HASH
654	help
655	  For x86_64 processors with SSE4.2 and PCLMULQDQ supported,
656	  CRC T10 DIF PCLMULQDQ computation can be hardware
657	  accelerated PCLMULQDQ instruction. This option will create
658	  'crct10dif-pclmul' module, which is faster when computing the
659	  crct10dif checksum as compared with the generic table implementation.
660
661config CRYPTO_CRCT10DIF_VPMSUM
662	tristate "CRC32T10DIF powerpc64 hardware acceleration"
663	depends on PPC64 && ALTIVEC && CRC_T10DIF
664	select CRYPTO_HASH
665	help
666	  CRC10T10DIF algorithm implemented using vector polynomial
667	  multiply-sum (vpmsum) instructions, introduced in POWER8. Enable on
668	  POWER8 and newer processors for improved performance.
669
670config CRYPTO_VPMSUM_TESTER
671	tristate "Powerpc64 vpmsum hardware acceleration tester"
672	depends on CRYPTO_CRCT10DIF_VPMSUM && CRYPTO_CRC32C_VPMSUM
673	help
674	  Stress test for CRC32c and CRC-T10DIF algorithms implemented with
675	  POWER8 vpmsum instructions.
676	  Unless you are testing these algorithms, you don't need this.
677
678config CRYPTO_GHASH
679	tristate "GHASH hash function"
680	select CRYPTO_GF128MUL
681	select CRYPTO_HASH
682	help
683	  GHASH is the hash function used in GCM (Galois/Counter Mode).
684	  It is not a general-purpose cryptographic hash function.
685
686config CRYPTO_POLY1305
687	tristate "Poly1305 authenticator algorithm"
688	select CRYPTO_HASH
689	help
690	  Poly1305 authenticator algorithm, RFC7539.
691
692	  Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
693	  It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
694	  in IETF protocols. This is the portable C implementation of Poly1305.
695
696config CRYPTO_POLY1305_X86_64
697	tristate "Poly1305 authenticator algorithm (x86_64/SSE2/AVX2)"
698	depends on X86 && 64BIT
699	select CRYPTO_POLY1305
700	help
701	  Poly1305 authenticator algorithm, RFC7539.
702
703	  Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
704	  It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
705	  in IETF protocols. This is the x86_64 assembler implementation using SIMD
706	  instructions.
707
708config CRYPTO_MD4
709	tristate "MD4 digest algorithm"
710	select CRYPTO_HASH
711	help
712	  MD4 message digest algorithm (RFC1320).
713
714config CRYPTO_MD5
715	tristate "MD5 digest algorithm"
716	select CRYPTO_HASH
717	help
718	  MD5 message digest algorithm (RFC1321).
719
720config CRYPTO_MD5_OCTEON
721	tristate "MD5 digest algorithm (OCTEON)"
722	depends on CPU_CAVIUM_OCTEON
723	select CRYPTO_MD5
724	select CRYPTO_HASH
725	help
726	  MD5 message digest algorithm (RFC1321) implemented
727	  using OCTEON crypto instructions, when available.
728
729config CRYPTO_MD5_PPC
730	tristate "MD5 digest algorithm (PPC)"
731	depends on PPC
732	select CRYPTO_HASH
733	help
734	  MD5 message digest algorithm (RFC1321) implemented
735	  in PPC assembler.
736
737config CRYPTO_MD5_SPARC64
738	tristate "MD5 digest algorithm (SPARC64)"
739	depends on SPARC64
740	select CRYPTO_MD5
741	select CRYPTO_HASH
742	help
743	  MD5 message digest algorithm (RFC1321) implemented
744	  using sparc64 crypto instructions, when available.
745
746config CRYPTO_MICHAEL_MIC
747	tristate "Michael MIC keyed digest algorithm"
748	select CRYPTO_HASH
749	help
750	  Michael MIC is used for message integrity protection in TKIP
751	  (IEEE 802.11i). This algorithm is required for TKIP, but it
752	  should not be used for other purposes because of the weakness
753	  of the algorithm.
754
755config CRYPTO_RMD128
756	tristate "RIPEMD-128 digest algorithm"
757	select CRYPTO_HASH
758	help
759	  RIPEMD-128 (ISO/IEC 10118-3:2004).
760
761	  RIPEMD-128 is a 128-bit cryptographic hash function. It should only
762	  be used as a secure replacement for RIPEMD. For other use cases,
763	  RIPEMD-160 should be used.
764
765	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
766	  See <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
767
768config CRYPTO_RMD160
769	tristate "RIPEMD-160 digest algorithm"
770	select CRYPTO_HASH
771	help
772	  RIPEMD-160 (ISO/IEC 10118-3:2004).
773
774	  RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
775	  to be used as a secure replacement for the 128-bit hash functions
776	  MD4, MD5 and it's predecessor RIPEMD
777	  (not to be confused with RIPEMD-128).
778
779	  It's speed is comparable to SHA1 and there are no known attacks
780	  against RIPEMD-160.
781
782	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
783	  See <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
784
785config CRYPTO_RMD256
786	tristate "RIPEMD-256 digest algorithm"
787	select CRYPTO_HASH
788	help
789	  RIPEMD-256 is an optional extension of RIPEMD-128 with a
790	  256 bit hash. It is intended for applications that require
791	  longer hash-results, without needing a larger security level
792	  (than RIPEMD-128).
793
794	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
795	  See <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
796
797config CRYPTO_RMD320
798	tristate "RIPEMD-320 digest algorithm"
799	select CRYPTO_HASH
800	help
801	  RIPEMD-320 is an optional extension of RIPEMD-160 with a
802	  320 bit hash. It is intended for applications that require
803	  longer hash-results, without needing a larger security level
804	  (than RIPEMD-160).
805
806	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
807	  See <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
808
809config CRYPTO_SHA1
810	tristate "SHA1 digest algorithm"
811	select CRYPTO_HASH
812	help
813	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
814
815config CRYPTO_SHA1_SSSE3
816	tristate "SHA1 digest algorithm (SSSE3/AVX/AVX2/SHA-NI)"
817	depends on X86 && 64BIT
818	select CRYPTO_SHA1
819	select CRYPTO_HASH
820	help
821	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
822	  using Supplemental SSE3 (SSSE3) instructions or Advanced Vector
823	  Extensions (AVX/AVX2) or SHA-NI(SHA Extensions New Instructions),
824	  when available.
825
826config CRYPTO_SHA256_SSSE3
827	tristate "SHA256 digest algorithm (SSSE3/AVX/AVX2/SHA-NI)"
828	depends on X86 && 64BIT
829	select CRYPTO_SHA256
830	select CRYPTO_HASH
831	help
832	  SHA-256 secure hash standard (DFIPS 180-2) implemented
833	  using Supplemental SSE3 (SSSE3) instructions, or Advanced Vector
834	  Extensions version 1 (AVX1), or Advanced Vector Extensions
835	  version 2 (AVX2) instructions, or SHA-NI (SHA Extensions New
836	  Instructions) when available.
837
838config CRYPTO_SHA512_SSSE3
839	tristate "SHA512 digest algorithm (SSSE3/AVX/AVX2)"
840	depends on X86 && 64BIT
841	select CRYPTO_SHA512
842	select CRYPTO_HASH
843	help
844	  SHA-512 secure hash standard (DFIPS 180-2) implemented
845	  using Supplemental SSE3 (SSSE3) instructions, or Advanced Vector
846	  Extensions version 1 (AVX1), or Advanced Vector Extensions
847	  version 2 (AVX2) instructions, when available.
848
849config CRYPTO_SHA1_OCTEON
850	tristate "SHA1 digest algorithm (OCTEON)"
851	depends on CPU_CAVIUM_OCTEON
852	select CRYPTO_SHA1
853	select CRYPTO_HASH
854	help
855	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
856	  using OCTEON crypto instructions, when available.
857
858config CRYPTO_SHA1_SPARC64
859	tristate "SHA1 digest algorithm (SPARC64)"
860	depends on SPARC64
861	select CRYPTO_SHA1
862	select CRYPTO_HASH
863	help
864	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
865	  using sparc64 crypto instructions, when available.
866
867config CRYPTO_SHA1_PPC
868	tristate "SHA1 digest algorithm (powerpc)"
869	depends on PPC
870	help
871	  This is the powerpc hardware accelerated implementation of the
872	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
873
874config CRYPTO_SHA1_PPC_SPE
875	tristate "SHA1 digest algorithm (PPC SPE)"
876	depends on PPC && SPE
877	help
878	  SHA-1 secure hash standard (DFIPS 180-4) implemented
879	  using powerpc SPE SIMD instruction set.
880
881config CRYPTO_LIB_SHA256
882	tristate
883
884config CRYPTO_SHA256
885	tristate "SHA224 and SHA256 digest algorithm"
886	select CRYPTO_HASH
887	select CRYPTO_LIB_SHA256
888	help
889	  SHA256 secure hash standard (DFIPS 180-2).
890
891	  This version of SHA implements a 256 bit hash with 128 bits of
892	  security against collision attacks.
893
894	  This code also includes SHA-224, a 224 bit hash with 112 bits
895	  of security against collision attacks.
896
897config CRYPTO_SHA256_PPC_SPE
898	tristate "SHA224 and SHA256 digest algorithm (PPC SPE)"
899	depends on PPC && SPE
900	select CRYPTO_SHA256
901	select CRYPTO_HASH
902	help
903	  SHA224 and SHA256 secure hash standard (DFIPS 180-2)
904	  implemented using powerpc SPE SIMD instruction set.
905
906config CRYPTO_SHA256_OCTEON
907	tristate "SHA224 and SHA256 digest algorithm (OCTEON)"
908	depends on CPU_CAVIUM_OCTEON
909	select CRYPTO_SHA256
910	select CRYPTO_HASH
911	help
912	  SHA-256 secure hash standard (DFIPS 180-2) implemented
913	  using OCTEON crypto instructions, when available.
914
915config CRYPTO_SHA256_SPARC64
916	tristate "SHA224 and SHA256 digest algorithm (SPARC64)"
917	depends on SPARC64
918	select CRYPTO_SHA256
919	select CRYPTO_HASH
920	help
921	  SHA-256 secure hash standard (DFIPS 180-2) implemented
922	  using sparc64 crypto instructions, when available.
923
924config CRYPTO_SHA512
925	tristate "SHA384 and SHA512 digest algorithms"
926	select CRYPTO_HASH
927	help
928	  SHA512 secure hash standard (DFIPS 180-2).
929
930	  This version of SHA implements a 512 bit hash with 256 bits of
931	  security against collision attacks.
932
933	  This code also includes SHA-384, a 384 bit hash with 192 bits
934	  of security against collision attacks.
935
936config CRYPTO_SHA512_OCTEON
937	tristate "SHA384 and SHA512 digest algorithms (OCTEON)"
938	depends on CPU_CAVIUM_OCTEON
939	select CRYPTO_SHA512
940	select CRYPTO_HASH
941	help
942	  SHA-512 secure hash standard (DFIPS 180-2) implemented
943	  using OCTEON crypto instructions, when available.
944
945config CRYPTO_SHA512_SPARC64
946	tristate "SHA384 and SHA512 digest algorithm (SPARC64)"
947	depends on SPARC64
948	select CRYPTO_SHA512
949	select CRYPTO_HASH
950	help
951	  SHA-512 secure hash standard (DFIPS 180-2) implemented
952	  using sparc64 crypto instructions, when available.
953
954config CRYPTO_SHA3
955	tristate "SHA3 digest algorithm"
956	select CRYPTO_HASH
957	help
958	  SHA-3 secure hash standard (DFIPS 202). It's based on
959	  cryptographic sponge function family called Keccak.
960
961	  References:
962	  http://keccak.noekeon.org/
963
964config CRYPTO_SM3
965	tristate "SM3 digest algorithm"
966	select CRYPTO_HASH
967	help
968	  SM3 secure hash function as defined by OSCCA GM/T 0004-2012 SM3).
969	  It is part of the Chinese Commercial Cryptography suite.
970
971	  References:
972	  http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
973	  https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
974
975config CRYPTO_STREEBOG
976	tristate "Streebog Hash Function"
977	select CRYPTO_HASH
978	help
979	  Streebog Hash Function (GOST R 34.11-2012, RFC 6986) is one of the Russian
980	  cryptographic standard algorithms (called GOST algorithms).
981	  This setting enables two hash algorithms with 256 and 512 bits output.
982
983	  References:
984	  https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
985	  https://tools.ietf.org/html/rfc6986
986
987config CRYPTO_TGR192
988	tristate "Tiger digest algorithms"
989	select CRYPTO_HASH
990	help
991	  Tiger hash algorithm 192, 160 and 128-bit hashes
992
993	  Tiger is a hash function optimized for 64-bit processors while
994	  still having decent performance on 32-bit processors.
995	  Tiger was developed by Ross Anderson and Eli Biham.
996
997	  See also:
998	  <http://www.cs.technion.ac.il/~biham/Reports/Tiger/>.
999
1000config CRYPTO_WP512
1001	tristate "Whirlpool digest algorithms"
1002	select CRYPTO_HASH
1003	help
1004	  Whirlpool hash algorithm 512, 384 and 256-bit hashes
1005
1006	  Whirlpool-512 is part of the NESSIE cryptographic primitives.
1007	  Whirlpool will be part of the ISO/IEC 10118-3:2003(E) standard
1008
1009	  See also:
1010	  <http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html>
1011
1012config CRYPTO_GHASH_CLMUL_NI_INTEL
1013	tristate "GHASH hash function (CLMUL-NI accelerated)"
1014	depends on X86 && 64BIT
1015	select CRYPTO_CRYPTD
1016	help
1017	  This is the x86_64 CLMUL-NI accelerated implementation of
1018	  GHASH, the hash function used in GCM (Galois/Counter mode).
1019
1020comment "Ciphers"
1021
1022config CRYPTO_LIB_AES
1023	tristate
1024
1025config CRYPTO_AES
1026	tristate "AES cipher algorithms"
1027	select CRYPTO_ALGAPI
1028	select CRYPTO_LIB_AES
1029	help
1030	  AES cipher algorithms (FIPS-197). AES uses the Rijndael
1031	  algorithm.
1032
1033	  Rijndael appears to be consistently a very good performer in
1034	  both hardware and software across a wide range of computing
1035	  environments regardless of its use in feedback or non-feedback
1036	  modes. Its key setup time is excellent, and its key agility is
1037	  good. Rijndael's very low memory requirements make it very well
1038	  suited for restricted-space environments, in which it also
1039	  demonstrates excellent performance. Rijndael's operations are
1040	  among the easiest to defend against power and timing attacks.
1041
1042	  The AES specifies three key sizes: 128, 192 and 256 bits
1043
1044	  See <http://csrc.nist.gov/CryptoToolkit/aes/> for more information.
1045
1046config CRYPTO_AES_TI
1047	tristate "Fixed time AES cipher"
1048	select CRYPTO_ALGAPI
1049	select CRYPTO_LIB_AES
1050	help
1051	  This is a generic implementation of AES that attempts to eliminate
1052	  data dependent latencies as much as possible without affecting
1053	  performance too much. It is intended for use by the generic CCM
1054	  and GCM drivers, and other CTR or CMAC/XCBC based modes that rely
1055	  solely on encryption (although decryption is supported as well, but
1056	  with a more dramatic performance hit)
1057
1058	  Instead of using 16 lookup tables of 1 KB each, (8 for encryption and
1059	  8 for decryption), this implementation only uses just two S-boxes of
1060	  256 bytes each, and attempts to eliminate data dependent latencies by
1061	  prefetching the entire table into the cache at the start of each
1062	  block. Interrupts are also disabled to avoid races where cachelines
1063	  are evicted when the CPU is interrupted to do something else.
1064
1065config CRYPTO_AES_NI_INTEL
1066	tristate "AES cipher algorithms (AES-NI)"
1067	depends on X86
1068	select CRYPTO_AEAD
1069	select CRYPTO_LIB_AES
1070	select CRYPTO_ALGAPI
1071	select CRYPTO_BLKCIPHER
1072	select CRYPTO_GLUE_HELPER_X86 if 64BIT
1073	select CRYPTO_SIMD
1074	help
1075	  Use Intel AES-NI instructions for AES algorithm.
1076
1077	  AES cipher algorithms (FIPS-197). AES uses the Rijndael
1078	  algorithm.
1079
1080	  Rijndael appears to be consistently a very good performer in
1081	  both hardware and software across a wide range of computing
1082	  environments regardless of its use in feedback or non-feedback
1083	  modes. Its key setup time is excellent, and its key agility is
1084	  good. Rijndael's very low memory requirements make it very well
1085	  suited for restricted-space environments, in which it also
1086	  demonstrates excellent performance. Rijndael's operations are
1087	  among the easiest to defend against power and timing attacks.
1088
1089	  The AES specifies three key sizes: 128, 192 and 256 bits
1090
1091	  See <http://csrc.nist.gov/encryption/aes/> for more information.
1092
1093	  In addition to AES cipher algorithm support, the acceleration
1094	  for some popular block cipher mode is supported too, including
1095	  ECB, CBC, LRW, XTS. The 64 bit version has additional
1096	  acceleration for CTR.
1097
1098config CRYPTO_AES_SPARC64
1099	tristate "AES cipher algorithms (SPARC64)"
1100	depends on SPARC64
1101	select CRYPTO_CRYPTD
1102	select CRYPTO_ALGAPI
1103	help
1104	  Use SPARC64 crypto opcodes for AES algorithm.
1105
1106	  AES cipher algorithms (FIPS-197). AES uses the Rijndael
1107	  algorithm.
1108
1109	  Rijndael appears to be consistently a very good performer in
1110	  both hardware and software across a wide range of computing
1111	  environments regardless of its use in feedback or non-feedback
1112	  modes. Its key setup time is excellent, and its key agility is
1113	  good. Rijndael's very low memory requirements make it very well
1114	  suited for restricted-space environments, in which it also
1115	  demonstrates excellent performance. Rijndael's operations are
1116	  among the easiest to defend against power and timing attacks.
1117
1118	  The AES specifies three key sizes: 128, 192 and 256 bits
1119
1120	  See <http://csrc.nist.gov/encryption/aes/> for more information.
1121
1122	  In addition to AES cipher algorithm support, the acceleration
1123	  for some popular block cipher mode is supported too, including
1124	  ECB and CBC.
1125
1126config CRYPTO_AES_PPC_SPE
1127	tristate "AES cipher algorithms (PPC SPE)"
1128	depends on PPC && SPE
1129	help
1130	  AES cipher algorithms (FIPS-197). Additionally the acceleration
1131	  for popular block cipher modes ECB, CBC, CTR and XTS is supported.
1132	  This module should only be used for low power (router) devices
1133	  without hardware AES acceleration (e.g. caam crypto). It reduces the
1134	  size of the AES tables from 16KB to 8KB + 256 bytes and mitigates
1135	  timining attacks. Nevertheless it might be not as secure as other
1136	  architecture specific assembler implementations that work on 1KB
1137	  tables or 256 bytes S-boxes.
1138
1139config CRYPTO_ANUBIS
1140	tristate "Anubis cipher algorithm"
1141	select CRYPTO_ALGAPI
1142	help
1143	  Anubis cipher algorithm.
1144
1145	  Anubis is a variable key length cipher which can use keys from
1146	  128 bits to 320 bits in length.  It was evaluated as a entrant
1147	  in the NESSIE competition.
1148
1149	  See also:
1150	  <https://www.cosic.esat.kuleuven.be/nessie/reports/>
1151	  <http://www.larc.usp.br/~pbarreto/AnubisPage.html>
1152
1153config CRYPTO_LIB_ARC4
1154	tristate
1155
1156config CRYPTO_ARC4
1157	tristate "ARC4 cipher algorithm"
1158	select CRYPTO_BLKCIPHER
1159	select CRYPTO_LIB_ARC4
1160	help
1161	  ARC4 cipher algorithm.
1162
1163	  ARC4 is a stream cipher using keys ranging from 8 bits to 2048
1164	  bits in length.  This algorithm is required for driver-based
1165	  WEP, but it should not be for other purposes because of the
1166	  weakness of the algorithm.
1167
1168config CRYPTO_BLOWFISH
1169	tristate "Blowfish cipher algorithm"
1170	select CRYPTO_ALGAPI
1171	select CRYPTO_BLOWFISH_COMMON
1172	help
1173	  Blowfish cipher algorithm, by Bruce Schneier.
1174
1175	  This is a variable key length cipher which can use keys from 32
1176	  bits to 448 bits in length.  It's fast, simple and specifically
1177	  designed for use on "large microprocessors".
1178
1179	  See also:
1180	  <http://www.schneier.com/blowfish.html>
1181
1182config CRYPTO_BLOWFISH_COMMON
1183	tristate
1184	help
1185	  Common parts of the Blowfish cipher algorithm shared by the
1186	  generic c and the assembler implementations.
1187
1188	  See also:
1189	  <http://www.schneier.com/blowfish.html>
1190
1191config CRYPTO_BLOWFISH_X86_64
1192	tristate "Blowfish cipher algorithm (x86_64)"
1193	depends on X86 && 64BIT
1194	select CRYPTO_BLKCIPHER
1195	select CRYPTO_BLOWFISH_COMMON
1196	help
1197	  Blowfish cipher algorithm (x86_64), by Bruce Schneier.
1198
1199	  This is a variable key length cipher which can use keys from 32
1200	  bits to 448 bits in length.  It's fast, simple and specifically
1201	  designed for use on "large microprocessors".
1202
1203	  See also:
1204	  <http://www.schneier.com/blowfish.html>
1205
1206config CRYPTO_CAMELLIA
1207	tristate "Camellia cipher algorithms"
1208	depends on CRYPTO
1209	select CRYPTO_ALGAPI
1210	help
1211	  Camellia cipher algorithms module.
1212
1213	  Camellia is a symmetric key block cipher developed jointly
1214	  at NTT and Mitsubishi Electric Corporation.
1215
1216	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
1217
1218	  See also:
1219	  <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html>
1220
1221config CRYPTO_CAMELLIA_X86_64
1222	tristate "Camellia cipher algorithm (x86_64)"
1223	depends on X86 && 64BIT
1224	depends on CRYPTO
1225	select CRYPTO_BLKCIPHER
1226	select CRYPTO_GLUE_HELPER_X86
1227	help
1228	  Camellia cipher algorithm module (x86_64).
1229
1230	  Camellia is a symmetric key block cipher developed jointly
1231	  at NTT and Mitsubishi Electric Corporation.
1232
1233	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
1234
1235	  See also:
1236	  <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html>
1237
1238config CRYPTO_CAMELLIA_AESNI_AVX_X86_64
1239	tristate "Camellia cipher algorithm (x86_64/AES-NI/AVX)"
1240	depends on X86 && 64BIT
1241	depends on CRYPTO
1242	select CRYPTO_BLKCIPHER
1243	select CRYPTO_CAMELLIA_X86_64
1244	select CRYPTO_GLUE_HELPER_X86
1245	select CRYPTO_SIMD
1246	select CRYPTO_XTS
1247	help
1248	  Camellia cipher algorithm module (x86_64/AES-NI/AVX).
1249
1250	  Camellia is a symmetric key block cipher developed jointly
1251	  at NTT and Mitsubishi Electric Corporation.
1252
1253	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
1254
1255	  See also:
1256	  <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html>
1257
1258config CRYPTO_CAMELLIA_AESNI_AVX2_X86_64
1259	tristate "Camellia cipher algorithm (x86_64/AES-NI/AVX2)"
1260	depends on X86 && 64BIT
1261	depends on CRYPTO
1262	select CRYPTO_CAMELLIA_AESNI_AVX_X86_64
1263	help
1264	  Camellia cipher algorithm module (x86_64/AES-NI/AVX2).
1265
1266	  Camellia is a symmetric key block cipher developed jointly
1267	  at NTT and Mitsubishi Electric Corporation.
1268
1269	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
1270
1271	  See also:
1272	  <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html>
1273
1274config CRYPTO_CAMELLIA_SPARC64
1275	tristate "Camellia cipher algorithm (SPARC64)"
1276	depends on SPARC64
1277	depends on CRYPTO
1278	select CRYPTO_ALGAPI
1279	help
1280	  Camellia cipher algorithm module (SPARC64).
1281
1282	  Camellia is a symmetric key block cipher developed jointly
1283	  at NTT and Mitsubishi Electric Corporation.
1284
1285	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
1286
1287	  See also:
1288	  <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html>
1289
1290config CRYPTO_CAST_COMMON
1291	tristate
1292	help
1293	  Common parts of the CAST cipher algorithms shared by the
1294	  generic c and the assembler implementations.
1295
1296config CRYPTO_CAST5
1297	tristate "CAST5 (CAST-128) cipher algorithm"
1298	select CRYPTO_ALGAPI
1299	select CRYPTO_CAST_COMMON
1300	help
1301	  The CAST5 encryption algorithm (synonymous with CAST-128) is
1302	  described in RFC2144.
1303
1304config CRYPTO_CAST5_AVX_X86_64
1305	tristate "CAST5 (CAST-128) cipher algorithm (x86_64/AVX)"
1306	depends on X86 && 64BIT
1307	select CRYPTO_BLKCIPHER
1308	select CRYPTO_CAST5
1309	select CRYPTO_CAST_COMMON
1310	select CRYPTO_SIMD
1311	help
1312	  The CAST5 encryption algorithm (synonymous with CAST-128) is
1313	  described in RFC2144.
1314
1315	  This module provides the Cast5 cipher algorithm that processes
1316	  sixteen blocks parallel using the AVX instruction set.
1317
1318config CRYPTO_CAST6
1319	tristate "CAST6 (CAST-256) cipher algorithm"
1320	select CRYPTO_ALGAPI
1321	select CRYPTO_CAST_COMMON
1322	help
1323	  The CAST6 encryption algorithm (synonymous with CAST-256) is
1324	  described in RFC2612.
1325
1326config CRYPTO_CAST6_AVX_X86_64
1327	tristate "CAST6 (CAST-256) cipher algorithm (x86_64/AVX)"
1328	depends on X86 && 64BIT
1329	select CRYPTO_BLKCIPHER
1330	select CRYPTO_CAST6
1331	select CRYPTO_CAST_COMMON
1332	select CRYPTO_GLUE_HELPER_X86
1333	select CRYPTO_SIMD
1334	select CRYPTO_XTS
1335	help
1336	  The CAST6 encryption algorithm (synonymous with CAST-256) is
1337	  described in RFC2612.
1338
1339	  This module provides the Cast6 cipher algorithm that processes
1340	  eight blocks parallel using the AVX instruction set.
1341
1342config CRYPTO_LIB_DES
1343	tristate
1344
1345config CRYPTO_DES
1346	tristate "DES and Triple DES EDE cipher algorithms"
1347	select CRYPTO_ALGAPI
1348	select CRYPTO_LIB_DES
1349	help
1350	  DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
1351
1352config CRYPTO_DES_SPARC64
1353	tristate "DES and Triple DES EDE cipher algorithms (SPARC64)"
1354	depends on SPARC64
1355	select CRYPTO_ALGAPI
1356	select CRYPTO_LIB_DES
1357	help
1358	  DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3),
1359	  optimized using SPARC64 crypto opcodes.
1360
1361config CRYPTO_DES3_EDE_X86_64
1362	tristate "Triple DES EDE cipher algorithm (x86-64)"
1363	depends on X86 && 64BIT
1364	select CRYPTO_BLKCIPHER
1365	select CRYPTO_LIB_DES
1366	help
1367	  Triple DES EDE (FIPS 46-3) algorithm.
1368
1369	  This module provides implementation of the Triple DES EDE cipher
1370	  algorithm that is optimized for x86-64 processors. Two versions of
1371	  algorithm are provided; regular processing one input block and
1372	  one that processes three blocks parallel.
1373
1374config CRYPTO_FCRYPT
1375	tristate "FCrypt cipher algorithm"
1376	select CRYPTO_ALGAPI
1377	select CRYPTO_BLKCIPHER
1378	help
1379	  FCrypt algorithm used by RxRPC.
1380
1381config CRYPTO_KHAZAD
1382	tristate "Khazad cipher algorithm"
1383	select CRYPTO_ALGAPI
1384	help
1385	  Khazad cipher algorithm.
1386
1387	  Khazad was a finalist in the initial NESSIE competition.  It is
1388	  an algorithm optimized for 64-bit processors with good performance
1389	  on 32-bit processors.  Khazad uses an 128 bit key size.
1390
1391	  See also:
1392	  <http://www.larc.usp.br/~pbarreto/KhazadPage.html>
1393
1394config CRYPTO_SALSA20
1395	tristate "Salsa20 stream cipher algorithm"
1396	select CRYPTO_BLKCIPHER
1397	help
1398	  Salsa20 stream cipher algorithm.
1399
1400	  Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT
1401	  Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/>
1402
1403	  The Salsa20 stream cipher algorithm is designed by Daniel J.
1404	  Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html>
1405
1406config CRYPTO_CHACHA20
1407	tristate "ChaCha stream cipher algorithms"
1408	select CRYPTO_BLKCIPHER
1409	help
1410	  The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms.
1411
1412	  ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
1413	  Bernstein and further specified in RFC7539 for use in IETF protocols.
1414	  This is the portable C implementation of ChaCha20.  See also:
1415	  <http://cr.yp.to/chacha/chacha-20080128.pdf>
1416
1417	  XChaCha20 is the application of the XSalsa20 construction to ChaCha20
1418	  rather than to Salsa20.  XChaCha20 extends ChaCha20's nonce length
1419	  from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
1420	  while provably retaining ChaCha20's security.  See also:
1421	  <https://cr.yp.to/snuffle/xsalsa-20081128.pdf>
1422
1423	  XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
1424	  reduced security margin but increased performance.  It can be needed
1425	  in some performance-sensitive scenarios.
1426
1427config CRYPTO_CHACHA20_X86_64
1428	tristate "ChaCha stream cipher algorithms (x86_64/SSSE3/AVX2/AVX-512VL)"
1429	depends on X86 && 64BIT
1430	select CRYPTO_BLKCIPHER
1431	select CRYPTO_CHACHA20
1432	help
1433	  SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20,
1434	  XChaCha20, and XChaCha12 stream ciphers.
1435
1436config CRYPTO_SEED
1437	tristate "SEED cipher algorithm"
1438	select CRYPTO_ALGAPI
1439	help
1440	  SEED cipher algorithm (RFC4269).
1441
1442	  SEED is a 128-bit symmetric key block cipher that has been
1443	  developed by KISA (Korea Information Security Agency) as a
1444	  national standard encryption algorithm of the Republic of Korea.
1445	  It is a 16 round block cipher with the key size of 128 bit.
1446
1447	  See also:
1448	  <http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp>
1449
1450config CRYPTO_SERPENT
1451	tristate "Serpent cipher algorithm"
1452	select CRYPTO_ALGAPI
1453	help
1454	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
1455
1456	  Keys are allowed to be from 0 to 256 bits in length, in steps
1457	  of 8 bits.  Also includes the 'Tnepres' algorithm, a reversed
1458	  variant of Serpent for compatibility with old kerneli.org code.
1459
1460	  See also:
1461	  <http://www.cl.cam.ac.uk/~rja14/serpent.html>
1462
1463config CRYPTO_SERPENT_SSE2_X86_64
1464	tristate "Serpent cipher algorithm (x86_64/SSE2)"
1465	depends on X86 && 64BIT
1466	select CRYPTO_BLKCIPHER
1467	select CRYPTO_GLUE_HELPER_X86
1468	select CRYPTO_SERPENT
1469	select CRYPTO_SIMD
1470	help
1471	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
1472
1473	  Keys are allowed to be from 0 to 256 bits in length, in steps
1474	  of 8 bits.
1475
1476	  This module provides Serpent cipher algorithm that processes eight
1477	  blocks parallel using SSE2 instruction set.
1478
1479	  See also:
1480	  <http://www.cl.cam.ac.uk/~rja14/serpent.html>
1481
1482config CRYPTO_SERPENT_SSE2_586
1483	tristate "Serpent cipher algorithm (i586/SSE2)"
1484	depends on X86 && !64BIT
1485	select CRYPTO_BLKCIPHER
1486	select CRYPTO_GLUE_HELPER_X86
1487	select CRYPTO_SERPENT
1488	select CRYPTO_SIMD
1489	help
1490	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
1491
1492	  Keys are allowed to be from 0 to 256 bits in length, in steps
1493	  of 8 bits.
1494
1495	  This module provides Serpent cipher algorithm that processes four
1496	  blocks parallel using SSE2 instruction set.
1497
1498	  See also:
1499	  <http://www.cl.cam.ac.uk/~rja14/serpent.html>
1500
1501config CRYPTO_SERPENT_AVX_X86_64
1502	tristate "Serpent cipher algorithm (x86_64/AVX)"
1503	depends on X86 && 64BIT
1504	select CRYPTO_BLKCIPHER
1505	select CRYPTO_GLUE_HELPER_X86
1506	select CRYPTO_SERPENT
1507	select CRYPTO_SIMD
1508	select CRYPTO_XTS
1509	help
1510	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
1511
1512	  Keys are allowed to be from 0 to 256 bits in length, in steps
1513	  of 8 bits.
1514
1515	  This module provides the Serpent cipher algorithm that processes
1516	  eight blocks parallel using the AVX instruction set.
1517
1518	  See also:
1519	  <http://www.cl.cam.ac.uk/~rja14/serpent.html>
1520
1521config CRYPTO_SERPENT_AVX2_X86_64
1522	tristate "Serpent cipher algorithm (x86_64/AVX2)"
1523	depends on X86 && 64BIT
1524	select CRYPTO_SERPENT_AVX_X86_64
1525	help
1526	  Serpent cipher algorithm, by Anderson, Biham & Knudsen.
1527
1528	  Keys are allowed to be from 0 to 256 bits in length, in steps
1529	  of 8 bits.
1530
1531	  This module provides Serpent cipher algorithm that processes 16
1532	  blocks parallel using AVX2 instruction set.
1533
1534	  See also:
1535	  <http://www.cl.cam.ac.uk/~rja14/serpent.html>
1536
1537config CRYPTO_SM4
1538	tristate "SM4 cipher algorithm"
1539	select CRYPTO_ALGAPI
1540	help
1541	  SM4 cipher algorithms (OSCCA GB/T 32907-2016).
1542
1543	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
1544	  Organization of State Commercial Administration of China (OSCCA)
1545	  as an authorized cryptographic algorithms for the use within China.
1546
1547	  SMS4 was originally created for use in protecting wireless
1548	  networks, and is mandated in the Chinese National Standard for
1549	  Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
1550	  (GB.15629.11-2003).
1551
1552	  The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
1553	  standardized through TC 260 of the Standardization Administration
1554	  of the People's Republic of China (SAC).
1555
1556	  The input, output, and key of SMS4 are each 128 bits.
1557
1558	  See also: <https://eprint.iacr.org/2008/329.pdf>
1559
1560	  If unsure, say N.
1561
1562config CRYPTO_TEA
1563	tristate "TEA, XTEA and XETA cipher algorithms"
1564	select CRYPTO_ALGAPI
1565	help
1566	  TEA cipher algorithm.
1567
1568	  Tiny Encryption Algorithm is a simple cipher that uses
1569	  many rounds for security.  It is very fast and uses
1570	  little memory.
1571
1572	  Xtendend Tiny Encryption Algorithm is a modification to
1573	  the TEA algorithm to address a potential key weakness
1574	  in the TEA algorithm.
1575
1576	  Xtendend Encryption Tiny Algorithm is a mis-implementation
1577	  of the XTEA algorithm for compatibility purposes.
1578
1579config CRYPTO_TWOFISH
1580	tristate "Twofish cipher algorithm"
1581	select CRYPTO_ALGAPI
1582	select CRYPTO_TWOFISH_COMMON
1583	help
1584	  Twofish cipher algorithm.
1585
1586	  Twofish was submitted as an AES (Advanced Encryption Standard)
1587	  candidate cipher by researchers at CounterPane Systems.  It is a
1588	  16 round block cipher supporting key sizes of 128, 192, and 256
1589	  bits.
1590
1591	  See also:
1592	  <http://www.schneier.com/twofish.html>
1593
1594config CRYPTO_TWOFISH_COMMON
1595	tristate
1596	help
1597	  Common parts of the Twofish cipher algorithm shared by the
1598	  generic c and the assembler implementations.
1599
1600config CRYPTO_TWOFISH_586
1601	tristate "Twofish cipher algorithms (i586)"
1602	depends on (X86 || UML_X86) && !64BIT
1603	select CRYPTO_ALGAPI
1604	select CRYPTO_TWOFISH_COMMON
1605	help
1606	  Twofish cipher algorithm.
1607
1608	  Twofish was submitted as an AES (Advanced Encryption Standard)
1609	  candidate cipher by researchers at CounterPane Systems.  It is a
1610	  16 round block cipher supporting key sizes of 128, 192, and 256
1611	  bits.
1612
1613	  See also:
1614	  <http://www.schneier.com/twofish.html>
1615
1616config CRYPTO_TWOFISH_X86_64
1617	tristate "Twofish cipher algorithm (x86_64)"
1618	depends on (X86 || UML_X86) && 64BIT
1619	select CRYPTO_ALGAPI
1620	select CRYPTO_TWOFISH_COMMON
1621	help
1622	  Twofish cipher algorithm (x86_64).
1623
1624	  Twofish was submitted as an AES (Advanced Encryption Standard)
1625	  candidate cipher by researchers at CounterPane Systems.  It is a
1626	  16 round block cipher supporting key sizes of 128, 192, and 256
1627	  bits.
1628
1629	  See also:
1630	  <http://www.schneier.com/twofish.html>
1631
1632config CRYPTO_TWOFISH_X86_64_3WAY
1633	tristate "Twofish cipher algorithm (x86_64, 3-way parallel)"
1634	depends on X86 && 64BIT
1635	select CRYPTO_BLKCIPHER
1636	select CRYPTO_TWOFISH_COMMON
1637	select CRYPTO_TWOFISH_X86_64
1638	select CRYPTO_GLUE_HELPER_X86
1639	help
1640	  Twofish cipher algorithm (x86_64, 3-way parallel).
1641
1642	  Twofish was submitted as an AES (Advanced Encryption Standard)
1643	  candidate cipher by researchers at CounterPane Systems.  It is a
1644	  16 round block cipher supporting key sizes of 128, 192, and 256
1645	  bits.
1646
1647	  This module provides Twofish cipher algorithm that processes three
1648	  blocks parallel, utilizing resources of out-of-order CPUs better.
1649
1650	  See also:
1651	  <http://www.schneier.com/twofish.html>
1652
1653config CRYPTO_TWOFISH_AVX_X86_64
1654	tristate "Twofish cipher algorithm (x86_64/AVX)"
1655	depends on X86 && 64BIT
1656	select CRYPTO_BLKCIPHER
1657	select CRYPTO_GLUE_HELPER_X86
1658	select CRYPTO_SIMD
1659	select CRYPTO_TWOFISH_COMMON
1660	select CRYPTO_TWOFISH_X86_64
1661	select CRYPTO_TWOFISH_X86_64_3WAY
1662	help
1663	  Twofish cipher algorithm (x86_64/AVX).
1664
1665	  Twofish was submitted as an AES (Advanced Encryption Standard)
1666	  candidate cipher by researchers at CounterPane Systems.  It is a
1667	  16 round block cipher supporting key sizes of 128, 192, and 256
1668	  bits.
1669
1670	  This module provides the Twofish cipher algorithm that processes
1671	  eight blocks parallel using the AVX Instruction Set.
1672
1673	  See also:
1674	  <http://www.schneier.com/twofish.html>
1675
1676comment "Compression"
1677
1678config CRYPTO_DEFLATE
1679	tristate "Deflate compression algorithm"
1680	select CRYPTO_ALGAPI
1681	select CRYPTO_ACOMP2
1682	select ZLIB_INFLATE
1683	select ZLIB_DEFLATE
1684	help
1685	  This is the Deflate algorithm (RFC1951), specified for use in
1686	  IPSec with the IPCOMP protocol (RFC3173, RFC2394).
1687
1688	  You will most probably want this if using IPSec.
1689
1690config CRYPTO_LZO
1691	tristate "LZO compression algorithm"
1692	select CRYPTO_ALGAPI
1693	select CRYPTO_ACOMP2
1694	select LZO_COMPRESS
1695	select LZO_DECOMPRESS
1696	help
1697	  This is the LZO algorithm.
1698
1699config CRYPTO_842
1700	tristate "842 compression algorithm"
1701	select CRYPTO_ALGAPI
1702	select CRYPTO_ACOMP2
1703	select 842_COMPRESS
1704	select 842_DECOMPRESS
1705	help
1706	  This is the 842 algorithm.
1707
1708config CRYPTO_LZ4
1709	tristate "LZ4 compression algorithm"
1710	select CRYPTO_ALGAPI
1711	select CRYPTO_ACOMP2
1712	select LZ4_COMPRESS
1713	select LZ4_DECOMPRESS
1714	help
1715	  This is the LZ4 algorithm.
1716
1717config CRYPTO_LZ4HC
1718	tristate "LZ4HC compression algorithm"
1719	select CRYPTO_ALGAPI
1720	select CRYPTO_ACOMP2
1721	select LZ4HC_COMPRESS
1722	select LZ4_DECOMPRESS
1723	help
1724	  This is the LZ4 high compression mode algorithm.
1725
1726config CRYPTO_ZSTD
1727	tristate "Zstd compression algorithm"
1728	select CRYPTO_ALGAPI
1729	select CRYPTO_ACOMP2
1730	select ZSTD_COMPRESS
1731	select ZSTD_DECOMPRESS
1732	help
1733	  This is the zstd algorithm.
1734
1735comment "Random Number Generation"
1736
1737config CRYPTO_ANSI_CPRNG
1738	tristate "Pseudo Random Number Generation for Cryptographic modules"
1739	select CRYPTO_AES
1740	select CRYPTO_RNG
1741	help
1742	  This option enables the generic pseudo random number generator
1743	  for cryptographic modules.  Uses the Algorithm specified in
1744	  ANSI X9.31 A.2.4. Note that this option must be enabled if
1745	  CRYPTO_FIPS is selected
1746
1747menuconfig CRYPTO_DRBG_MENU
1748	tristate "NIST SP800-90A DRBG"
1749	help
1750	  NIST SP800-90A compliant DRBG. In the following submenu, one or
1751	  more of the DRBG types must be selected.
1752
1753if CRYPTO_DRBG_MENU
1754
1755config CRYPTO_DRBG_HMAC
1756	bool
1757	default y
1758	select CRYPTO_HMAC
1759	select CRYPTO_SHA256
1760
1761config CRYPTO_DRBG_HASH
1762	bool "Enable Hash DRBG"
1763	select CRYPTO_SHA256
1764	help
1765	  Enable the Hash DRBG variant as defined in NIST SP800-90A.
1766
1767config CRYPTO_DRBG_CTR
1768	bool "Enable CTR DRBG"
1769	select CRYPTO_AES
1770	depends on CRYPTO_CTR
1771	help
1772	  Enable the CTR DRBG variant as defined in NIST SP800-90A.
1773
1774config CRYPTO_DRBG
1775	tristate
1776	default CRYPTO_DRBG_MENU
1777	select CRYPTO_RNG
1778	select CRYPTO_JITTERENTROPY
1779
1780endif	# if CRYPTO_DRBG_MENU
1781
1782config CRYPTO_JITTERENTROPY
1783	tristate "Jitterentropy Non-Deterministic Random Number Generator"
1784	select CRYPTO_RNG
1785	help
1786	  The Jitterentropy RNG is a noise that is intended
1787	  to provide seed to another RNG. The RNG does not
1788	  perform any cryptographic whitening of the generated
1789	  random numbers. This Jitterentropy RNG registers with
1790	  the kernel crypto API and can be used by any caller.
1791
1792config CRYPTO_USER_API
1793	tristate
1794
1795config CRYPTO_USER_API_HASH
1796	tristate "User-space interface for hash algorithms"
1797	depends on NET
1798	select CRYPTO_HASH
1799	select CRYPTO_USER_API
1800	help
1801	  This option enables the user-spaces interface for hash
1802	  algorithms.
1803
1804config CRYPTO_USER_API_SKCIPHER
1805	tristate "User-space interface for symmetric key cipher algorithms"
1806	depends on NET
1807	select CRYPTO_BLKCIPHER
1808	select CRYPTO_USER_API
1809	help
1810	  This option enables the user-spaces interface for symmetric
1811	  key cipher algorithms.
1812
1813config CRYPTO_USER_API_RNG
1814	tristate "User-space interface for random number generator algorithms"
1815	depends on NET
1816	select CRYPTO_RNG
1817	select CRYPTO_USER_API
1818	help
1819	  This option enables the user-spaces interface for random
1820	  number generator algorithms.
1821
1822config CRYPTO_USER_API_AEAD
1823	tristate "User-space interface for AEAD cipher algorithms"
1824	depends on NET
1825	select CRYPTO_AEAD
1826	select CRYPTO_BLKCIPHER
1827	select CRYPTO_NULL
1828	select CRYPTO_USER_API
1829	help
1830	  This option enables the user-spaces interface for AEAD
1831	  cipher algorithms.
1832
1833config CRYPTO_STATS
1834	bool "Crypto usage statistics for User-space"
1835	depends on CRYPTO_USER
1836	help
1837	  This option enables the gathering of crypto stats.
1838	  This will collect:
1839	  - encrypt/decrypt size and numbers of symmeric operations
1840	  - compress/decompress size and numbers of compress operations
1841	  - size and numbers of hash operations
1842	  - encrypt/decrypt/sign/verify numbers for asymmetric operations
1843	  - generate/seed numbers for rng operations
1844
1845config CRYPTO_HASH_INFO
1846	bool
1847
1848source "drivers/crypto/Kconfig"
1849source "crypto/asymmetric_keys/Kconfig"
1850source "certs/Kconfig"
1851
1852endif	# if CRYPTO
1853