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