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