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