crypto: Kconfig - simplify CRC entries
[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
f1f142ad 24menu "Crypto core or helper"
584fffc8 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
f1f142ad
RE
238endmenu
239
240menu "Public-key cryptography"
3d6228a5
VC
241
242config CRYPTO_RSA
05b37465 243 tristate "RSA (Rivest-Shamir-Adleman)"
3d6228a5
VC
244 select CRYPTO_AKCIPHER
245 select CRYPTO_MANAGER
246 select MPILIB
247 select ASN1
248 help
05b37465 249 RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
3d6228a5
VC
250
251config CRYPTO_DH
05b37465 252 tristate "DH (Diffie-Hellman)"
3d6228a5
VC
253 select CRYPTO_KPP
254 select MPILIB
255 help
05b37465 256 DH (Diffie-Hellman) key exchange algorithm
3d6228a5 257
7dce5981 258config CRYPTO_DH_RFC7919_GROUPS
05b37465 259 bool "RFC 7919 FFDHE groups"
7dce5981 260 depends on CRYPTO_DH
1e207964 261 select CRYPTO_RNG_DEFAULT
7dce5981 262 help
05b37465
RE
263 FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
264 defined in RFC7919.
265
266 Support these finite-field groups in DH key exchanges:
267 - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
268
269 If unsure, say N.
7dce5981 270
4a2289da
VC
271config CRYPTO_ECC
272 tristate
38aa192a 273 select CRYPTO_RNG_DEFAULT
4a2289da 274
3d6228a5 275config CRYPTO_ECDH
05b37465 276 tristate "ECDH (Elliptic Curve Diffie-Hellman)"
4a2289da 277 select CRYPTO_ECC
3d6228a5 278 select CRYPTO_KPP
3d6228a5 279 help
05b37465
RE
280 ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
281 using curves P-192, P-256, and P-384 (FIPS 186)
3d6228a5 282
4e660291 283config CRYPTO_ECDSA
05b37465 284 tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
4e660291
SB
285 select CRYPTO_ECC
286 select CRYPTO_AKCIPHER
287 select ASN1
288 help
05b37465
RE
289 ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
290 ISO/IEC 14888-3)
291 using curves P-192, P-256, and P-384
292
293 Only signature verification is implemented.
4e660291 294
0d7a7864 295config CRYPTO_ECRDSA
05b37465 296 tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
0d7a7864
VC
297 select CRYPTO_ECC
298 select CRYPTO_AKCIPHER
299 select CRYPTO_STREEBOG
1036633e
VC
300 select OID_REGISTRY
301 select ASN1
0d7a7864
VC
302 help
303 Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
05b37465
RE
304 RFC 7091, ISO/IEC 14888-3)
305
306 One of the Russian cryptographic standard algorithms (called GOST
307 algorithms). Only signature verification is implemented.
0d7a7864 308
ea7ecb66 309config CRYPTO_SM2
05b37465 310 tristate "SM2 (ShangMi 2)"
d2825fa9 311 select CRYPTO_SM3
ea7ecb66
TZ
312 select CRYPTO_AKCIPHER
313 select CRYPTO_MANAGER
314 select MPILIB
315 select ASN1
316 help
05b37465
RE
317 SM2 (ShangMi 2) public key algorithm
318
319 Published by State Encryption Management Bureau, China,
ea7ecb66
TZ
320 as specified by OSCCA GM/T 0003.1-2012 -- 0003.5-2012.
321
322 References:
05b37465 323 https://datatracker.ietf.org/doc/draft-shen-sm2-ecdsa/
ea7ecb66
TZ
324 http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
325 http://www.gmbz.org.cn/main/bzlb.html
326
ee772cb6 327config CRYPTO_CURVE25519
05b37465 328 tristate "Curve25519"
ee772cb6
AB
329 select CRYPTO_KPP
330 select CRYPTO_LIB_CURVE25519_GENERIC
05b37465
RE
331 help
332 Curve25519 elliptic curve (RFC7748)
ee772cb6 333
f1f142ad 334endmenu
cd12fb90 335
f1f142ad 336menu "Block ciphers"
1da177e4 337
f1f142ad
RE
338config CRYPTO_AES
339 tristate "AES cipher algorithms"
340 select CRYPTO_ALGAPI
341 select CRYPTO_LIB_AES
1da177e4 342 help
f1f142ad
RE
343 AES cipher algorithms (FIPS-197). AES uses the Rijndael
344 algorithm.
1da177e4 345
f1f142ad
RE
346 Rijndael appears to be consistently a very good performer in
347 both hardware and software across a wide range of computing
348 environments regardless of its use in feedback or non-feedback
349 modes. Its key setup time is excellent, and its key agility is
350 good. Rijndael's very low memory requirements make it very well
351 suited for restricted-space environments, in which it also
352 demonstrates excellent performance. Rijndael's operations are
353 among the easiest to defend against power and timing attacks.
71ebc4d1 354
f1f142ad 355 The AES specifies three key sizes: 128, 192 and 256 bits
71ebc4d1 356
f1f142ad
RE
357 See <http://csrc.nist.gov/CryptoToolkit/aes/> for more information.
358
359config CRYPTO_AES_TI
360 tristate "Fixed time AES cipher"
361 select CRYPTO_ALGAPI
362 select CRYPTO_LIB_AES
f606a88e 363 help
f1f142ad
RE
364 This is a generic implementation of AES that attempts to eliminate
365 data dependent latencies as much as possible without affecting
366 performance too much. It is intended for use by the generic CCM
367 and GCM drivers, and other CTR or CMAC/XCBC based modes that rely
368 solely on encryption (although decryption is supported as well, but
369 with a more dramatic performance hit)
f606a88e 370
f1f142ad
RE
371 Instead of using 16 lookup tables of 1 KB each, (8 for encryption and
372 8 for decryption), this implementation only uses just two S-boxes of
373 256 bytes each, and attempts to eliminate data dependent latencies by
374 prefetching the entire table into the cache at the start of each
375 block. Interrupts are also disabled to avoid races where cachelines
376 are evicted when the CPU is interrupted to do something else.
a4397635 377
f1f142ad
RE
378config CRYPTO_ANUBIS
379 tristate "Anubis cipher algorithm"
380 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
381 select CRYPTO_ALGAPI
1da177e4 382 help
f1f142ad 383 Anubis cipher algorithm.
1da177e4 384
f1f142ad
RE
385 Anubis is a variable key length cipher which can use keys from
386 128 bits to 320 bits in length. It was evaluated as a entrant
387 in the NESSIE competition.
a10f554f 388
f1f142ad
RE
389 See also:
390 <https://www.cosic.esat.kuleuven.be/nessie/reports/>
391 <http://www.larc.usp.br/~pbarreto/AnubisPage.html>
c494e070 392
f1f142ad
RE
393config CRYPTO_ARIA
394 tristate "ARIA cipher algorithm"
395 select CRYPTO_ALGAPI
db131ef9 396 help
f1f142ad 397 ARIA cipher algorithm (RFC5794).
db131ef9 398
f1f142ad
RE
399 ARIA is a standard encryption algorithm of the Republic of Korea.
400 The ARIA specifies three key sizes and rounds.
401 128-bit: 12 rounds.
402 192-bit: 14 rounds.
403 256-bit: 16 rounds.
a7d85e06 404
f1f142ad
RE
405 See also:
406 <https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do>
db131ef9 407
f1f142ad
RE
408config CRYPTO_BLOWFISH
409 tristate "Blowfish cipher algorithm"
410 select CRYPTO_ALGAPI
411 select CRYPTO_BLOWFISH_COMMON
584fffc8 412 help
f1f142ad 413 Blowfish cipher algorithm, by Bruce Schneier.
584fffc8 414
f1f142ad
RE
415 This is a variable key length cipher which can use keys from 32
416 bits to 448 bits in length. It's fast, simple and specifically
417 designed for use on "large microprocessors".
ecd6d5c9 418
f1f142ad
RE
419 See also:
420 <https://www.schneier.com/blowfish.html>
421
422config CRYPTO_BLOWFISH_COMMON
423 tristate
91652be5 424 help
f1f142ad
RE
425 Common parts of the Blowfish cipher algorithm shared by the
426 generic c and the assembler implementations.
91652be5 427
f1f142ad
RE
428 See also:
429 <https://www.schneier.com/blowfish.html>
430
431config CRYPTO_CAMELLIA
432 tristate "Camellia cipher algorithms"
433 select CRYPTO_ALGAPI
64470f1b 434 help
f1f142ad 435 Camellia cipher algorithms module.
64470f1b 436
f1f142ad
RE
437 Camellia is a symmetric key block cipher developed jointly
438 at NTT and Mitsubishi Electric Corporation.
439
440 The Camellia specifies three key sizes: 128, 192 and 256 bits.
441
442 See also:
443 <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html>
444
445config CRYPTO_CAST_COMMON
446 tristate
e497c518 447 help
f1f142ad
RE
448 Common parts of the CAST cipher algorithms shared by the
449 generic c and the assembler implementations.
e497c518 450
f1f142ad
RE
451config CRYPTO_CAST5
452 tristate "CAST5 (CAST-128) cipher algorithm"
453 select CRYPTO_ALGAPI
454 select CRYPTO_CAST_COMMON
584fffc8 455 help
f1f142ad
RE
456 The CAST5 encryption algorithm (synonymous with CAST-128) is
457 described in RFC2144.
584fffc8 458
f1f142ad
RE
459config CRYPTO_CAST6
460 tristate "CAST6 (CAST-256) cipher algorithm"
461 select CRYPTO_ALGAPI
462 select CRYPTO_CAST_COMMON
17fee07a 463 help
f1f142ad
RE
464 The CAST6 encryption algorithm (synonymous with CAST-256) is
465 described in RFC2612.
17fee07a 466
f1f142ad
RE
467config CRYPTO_DES
468 tristate "DES and Triple DES EDE cipher algorithms"
469 select CRYPTO_ALGAPI
470 select CRYPTO_LIB_DES
f19f5111 471 help
f1f142ad 472 DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
f19f5111 473
f1f142ad
RE
474config CRYPTO_FCRYPT
475 tristate "FCrypt cipher algorithm"
476 select CRYPTO_ALGAPI
b95bba5d 477 select CRYPTO_SKCIPHER
1c49678e 478 help
f1f142ad 479 FCrypt algorithm used by RxRPC.
1c49678e 480
f1f142ad
RE
481config CRYPTO_KHAZAD
482 tristate "Khazad cipher algorithm"
483 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
484 select CRYPTO_ALGAPI
485 help
486 Khazad cipher algorithm.
487
488 Khazad was a finalist in the initial NESSIE competition. It is
489 an algorithm optimized for 64-bit processors with good performance
490 on 32-bit processors. Khazad uses an 128 bit key size.
491
492 See also:
493 <http://www.larc.usp.br/~pbarreto/KhazadPage.html>
494
495config CRYPTO_SEED
496 tristate "SEED cipher algorithm"
497 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
498 select CRYPTO_ALGAPI
499 help
500 SEED cipher algorithm (RFC4269).
501
502 SEED is a 128-bit symmetric key block cipher that has been
503 developed by KISA (Korea Information Security Agency) as a
504 national standard encryption algorithm of the Republic of Korea.
505 It is a 16 round block cipher with the key size of 128 bit.
506
507 See also:
508 <http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp>
509
510config CRYPTO_SERPENT
511 tristate "Serpent cipher algorithm"
512 select CRYPTO_ALGAPI
513 help
514 Serpent cipher algorithm, by Anderson, Biham & Knudsen.
515
516 Keys are allowed to be from 0 to 256 bits in length, in steps
517 of 8 bits.
518
519 See also:
520 <https://www.cl.cam.ac.uk/~rja14/serpent.html>
521
522config CRYPTO_SM4
523 tristate
524
525config CRYPTO_SM4_GENERIC
526 tristate "SM4 cipher algorithm"
527 select CRYPTO_ALGAPI
528 select CRYPTO_SM4
529 help
530 SM4 cipher algorithms (OSCCA GB/T 32907-2016).
531
532 SM4 (GBT.32907-2016) is a cryptographic standard issued by the
533 Organization of State Commercial Administration of China (OSCCA)
534 as an authorized cryptographic algorithms for the use within China.
535
536 SMS4 was originally created for use in protecting wireless
537 networks, and is mandated in the Chinese National Standard for
538 Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
539 (GB.15629.11-2003).
540
541 The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
542 standardized through TC 260 of the Standardization Administration
543 of the People's Republic of China (SAC).
544
545 The input, output, and key of SMS4 are each 128 bits.
546
547 See also: <https://eprint.iacr.org/2008/329.pdf>
548
549 If unsure, say N.
550
551config CRYPTO_TEA
552 tristate "TEA, XTEA and XETA cipher algorithms"
553 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
554 select CRYPTO_ALGAPI
555 help
556 TEA cipher algorithm.
557
558 Tiny Encryption Algorithm is a simple cipher that uses
559 many rounds for security. It is very fast and uses
560 little memory.
561
562 Xtendend Tiny Encryption Algorithm is a modification to
563 the TEA algorithm to address a potential key weakness
564 in the TEA algorithm.
565
566 Xtendend Encryption Tiny Algorithm is a mis-implementation
567 of the XTEA algorithm for compatibility purposes.
568
569config CRYPTO_TWOFISH
570 tristate "Twofish cipher algorithm"
571 select CRYPTO_ALGAPI
572 select CRYPTO_TWOFISH_COMMON
573 help
574 Twofish cipher algorithm.
575
576 Twofish was submitted as an AES (Advanced Encryption Standard)
577 candidate cipher by researchers at CounterPane Systems. It is a
578 16 round block cipher supporting key sizes of 128, 192, and 256
579 bits.
580
581 See also:
582 <https://www.schneier.com/twofish.html>
583
584config CRYPTO_TWOFISH_COMMON
585 tristate
586 help
587 Common parts of the Twofish cipher algorithm shared by the
588 generic c and the assembler implementations.
589
590endmenu
591
592menu "Length-preserving ciphers and modes"
26609a21 593
059c2a4d
EB
594config CRYPTO_ADIANTUM
595 tristate "Adiantum support"
596 select CRYPTO_CHACHA20
48ea8c6e 597 select CRYPTO_LIB_POLY1305_GENERIC
059c2a4d 598 select CRYPTO_NHPOLY1305
c8a3315a 599 select CRYPTO_MANAGER
059c2a4d
EB
600 help
601 Adiantum is a tweakable, length-preserving encryption mode
602 designed for fast and secure disk encryption, especially on
603 CPUs without dedicated crypto instructions. It encrypts
604 each sector using the XChaCha12 stream cipher, two passes of
605 an ε-almost-∆-universal hash function, and an invocation of
606 the AES-256 block cipher on a single 16-byte block. On CPUs
607 without AES instructions, Adiantum is much faster than
608 AES-XTS.
609
610 Adiantum's security is provably reducible to that of its
611 underlying stream and block ciphers, subject to a security
612 bound. Unlike XTS, Adiantum is a true wide-block encryption
613 mode, so it actually provides an even stronger notion of
614 security than XTS, subject to the security bound.
615
616 If unsure, say N.
617
f1f142ad
RE
618config CRYPTO_ARC4
619 tristate "ARC4 cipher algorithm"
620 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
621 select CRYPTO_SKCIPHER
622 select CRYPTO_LIB_ARC4
7ff554ce 623 help
f1f142ad 624 ARC4 cipher algorithm.
7ff554ce 625
f1f142ad
RE
626 ARC4 is a stream cipher using keys ranging from 8 bits to 2048
627 bits in length. This algorithm is required for driver-based
628 WEP, but it should not be for other purposes because of the
629 weakness of the algorithm.
630
631config CRYPTO_CHACHA20
632 tristate "ChaCha stream cipher algorithms"
633 select CRYPTO_LIB_CHACHA_GENERIC
634 select CRYPTO_SKCIPHER
be1eb7f7 635 help
f1f142ad 636 The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms.
be1eb7f7 637
f1f142ad
RE
638 ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
639 Bernstein and further specified in RFC7539 for use in IETF protocols.
640 This is the portable C implementation of ChaCha20. See also:
641 <https://cr.yp.to/chacha/chacha-20080128.pdf>
be1eb7f7 642
f1f142ad
RE
643 XChaCha20 is the application of the XSalsa20 construction to ChaCha20
644 rather than to Salsa20. XChaCha20 extends ChaCha20's nonce length
645 from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
646 while provably retaining ChaCha20's security. See also:
647 <https://cr.yp.to/snuffle/xsalsa-20081128.pdf>
be1eb7f7 648
f1f142ad
RE
649 XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
650 reduced security margin but increased performance. It can be needed
651 in some performance-sensitive scenarios.
584fffc8 652
f1f142ad
RE
653config CRYPTO_CBC
654 tristate "CBC support"
655 select CRYPTO_SKCIPHER
93b5e86a
JK
656 select CRYPTO_MANAGER
657 help
f1f142ad
RE
658 CBC: Cipher Block Chaining mode
659 This block cipher algorithm is required for IPSec.
93b5e86a 660
f1f142ad
RE
661config CRYPTO_CFB
662 tristate "CFB support"
663 select CRYPTO_SKCIPHER
23e353c8 664 select CRYPTO_MANAGER
23e353c8 665 help
f1f142ad
RE
666 CFB: Cipher FeedBack mode
667 This block cipher algorithm is required for TPM2 Cryptography.
23e353c8 668
f1f142ad
RE
669config CRYPTO_CTR
670 tristate "CTR support"
671 select CRYPTO_SKCIPHER
584fffc8 672 select CRYPTO_MANAGER
76cb9521 673 help
f1f142ad
RE
674 CTR: Counter mode
675 This block cipher algorithm is required for IPSec.
76cb9521 676
f1f142ad
RE
677config CRYPTO_CTS
678 tristate "CTS support"
679 select CRYPTO_SKCIPHER
f1939f7c
SW
680 select CRYPTO_MANAGER
681 help
f1f142ad
RE
682 CTS: Cipher Text Stealing
683 This is the Cipher Text Stealing mode as described by
684 Section 8 of rfc2040 and referenced by rfc3962
685 (rfc3962 includes errata information in its Appendix A) or
686 CBC-CS3 as defined by NIST in Sp800-38A addendum from Oct 2010.
687 This mode is required for Kerberos gss mechanism support
688 for AES encryption.
f1939f7c 689
f1f142ad 690 See: https://csrc.nist.gov/publications/detail/sp/800-38a/addendum/final
28db8e3e 691
f1f142ad
RE
692config CRYPTO_ECB
693 tristate "ECB support"
694 select CRYPTO_SKCIPHER
695 select CRYPTO_MANAGER
4a49b499 696 help
f1f142ad
RE
697 ECB: Electronic CodeBook mode
698 This is the simplest block cipher algorithm. It simply encrypts
699 the input block by block.
4a49b499 700
f1f142ad
RE
701config CRYPTO_HCTR2
702 tristate "HCTR2 support"
703 select CRYPTO_XCTR
704 select CRYPTO_POLYVAL
705 select CRYPTO_MANAGER
78c37d19 706 help
f1f142ad
RE
707 HCTR2 is a length-preserving encryption mode for storage encryption that
708 is efficient on processors with instructions to accelerate AES and
709 carryless multiplication, e.g. x86 processors with AES-NI and CLMUL, and
710 ARM processors with the ARMv8 crypto extensions.
78c37d19 711
f1f142ad
RE
712config CRYPTO_KEYWRAP
713 tristate "Key wrapping support"
714 select CRYPTO_SKCIPHER
715 select CRYPTO_MANAGER
2cdc6899 716 help
f1f142ad
RE
717 Support for key wrapping (NIST SP800-38F / RFC3394) without
718 padding.
2cdc6899 719
f1f142ad
RE
720config CRYPTO_LRW
721 tristate "LRW support"
722 select CRYPTO_SKCIPHER
723 select CRYPTO_MANAGER
f3c923a0 724 select CRYPTO_GF128MUL
f1f142ad 725 select CRYPTO_ECB
f3c923a0 726 help
f1f142ad
RE
727 LRW: Liskov Rivest Wagner, a tweakable, non malleable, non movable
728 narrow block cipher mode for dm-crypt. Use it with cipher
729 specification string aes-lrw-benbi, the key must be 256, 320 or 384.
730 The first 128, 192 or 256 bits in the key are used for AES and the
731 rest is used to tie each cipher block to its logical position.
f3c923a0 732
f1f142ad
RE
733config CRYPTO_OFB
734 tristate "OFB support"
735 select CRYPTO_SKCIPHER
736 select CRYPTO_MANAGER
f979e014 737 help
f1f142ad
RE
738 OFB: the Output Feedback mode makes a block cipher into a synchronous
739 stream cipher. It generates keystream blocks, which are then XORed
740 with the plaintext blocks to get the ciphertext. Flipping a bit in the
741 ciphertext produces a flipped bit in the plaintext at the same
742 location. This property allows many error correcting codes to function
743 normally even when applied before encryption.
f979e014 744
f1f142ad
RE
745config CRYPTO_PCBC
746 tristate "PCBC support"
747 select CRYPTO_SKCIPHER
748 select CRYPTO_MANAGER
124b53d0 749 help
f1f142ad
RE
750 PCBC: Propagating Cipher Block Chaining mode
751 This block cipher algorithm is required for RxRPC.
124b53d0 752
f1f142ad
RE
753config CRYPTO_XCTR
754 tristate
755 select CRYPTO_SKCIPHER
756 select CRYPTO_MANAGER
1da177e4 757 help
f1f142ad
RE
758 XCTR: XOR Counter mode. This blockcipher mode is a variant of CTR mode
759 using XORs and little-endian addition rather than big-endian arithmetic.
760 XCTR mode is used to implement HCTR2.
1da177e4 761
f1f142ad
RE
762config CRYPTO_XTS
763 tristate "XTS support"
764 select CRYPTO_SKCIPHER
765 select CRYPTO_MANAGER
766 select CRYPTO_ECB
90831639 767 help
f1f142ad
RE
768 XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain,
769 key size 256, 384 or 512 bits. This implementation currently
770 can't handle a sectorsize which is not a multiple of 16 bytes.
90831639 771
f1f142ad
RE
772config CRYPTO_NHPOLY1305
773 tristate
e5835fba 774 select CRYPTO_HASH
f1f142ad 775 select CRYPTO_LIB_POLY1305_GENERIC
534fe2c1 776
f1f142ad 777endmenu
534fe2c1 778
f1f142ad 779menu "AEAD (authenticated encryption with associated data) ciphers"
1da177e4 780
f1f142ad
RE
781config CRYPTO_AEGIS128
782 tristate "AEGIS-128 AEAD algorithm"
783 select CRYPTO_AEAD
784 select CRYPTO_AES # for AES S-box tables
1da177e4 785 help
f1f142ad 786 Support for the AEGIS-128 dedicated AEAD algorithm.
2729bb42 787
f1f142ad
RE
788config CRYPTO_AEGIS128_SIMD
789 bool "Support SIMD acceleration for AEGIS-128"
790 depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
791 default y
584fffc8 792
f1f142ad
RE
793config CRYPTO_CHACHA20POLY1305
794 tristate "ChaCha20-Poly1305 AEAD support"
795 select CRYPTO_CHACHA20
796 select CRYPTO_POLY1305
797 select CRYPTO_AEAD
798 select CRYPTO_MANAGER
b9f535ff 799 help
f1f142ad 800 ChaCha20-Poly1305 AEAD support, RFC7539.
b9f535ff 801
f1f142ad
RE
802 Support for the AEAD wrapper using the ChaCha20 stream cipher combined
803 with the Poly1305 authenticator. It is defined in RFC7539 for use in
804 IETF protocols.
b9f535ff 805
f1f142ad
RE
806config CRYPTO_CCM
807 tristate "CCM support"
808 select CRYPTO_CTR
53964b9e 809 select CRYPTO_HASH
f1f142ad
RE
810 select CRYPTO_AEAD
811 select CRYPTO_MANAGER
53964b9e 812 help
f1f142ad 813 Support for Counter with CBC MAC. Required for IPsec.
d2825fa9 814
f1f142ad
RE
815config CRYPTO_GCM
816 tristate "GCM/GMAC support"
817 select CRYPTO_CTR
818 select CRYPTO_AEAD
819 select CRYPTO_GHASH
820 select CRYPTO_NULL
821 select CRYPTO_MANAGER
4f0fc160 822 help
f1f142ad
RE
823 Support for Galois/Counter Mode (GCM) and Galois Message
824 Authentication Code (GMAC). Required for IPSec.
4f0fc160 825
f1f142ad
RE
826config CRYPTO_SEQIV
827 tristate "Sequence Number IV Generator"
828 select CRYPTO_AEAD
829 select CRYPTO_SKCIPHER
830 select CRYPTO_NULL
831 select CRYPTO_RNG_DEFAULT
832 select CRYPTO_MANAGER
fe18957e 833 help
f1f142ad
RE
834 This IV generator generates an IV based on a sequence number by
835 xoring it with a salt. This algorithm is mainly useful for CTR
fe18957e 836
f1f142ad
RE
837config CRYPTO_ECHAINIV
838 tristate "Encrypted Chain IV Generator"
839 select CRYPTO_AEAD
840 select CRYPTO_NULL
841 select CRYPTO_RNG_DEFAULT
842 select CRYPTO_MANAGER
1da177e4 843 help
f1f142ad
RE
844 This IV generator generates an IV based on the encryption of
845 a sequence number xored with a salt. This is the default
846 algorithm for CBC.
1da177e4 847
f1f142ad
RE
848config CRYPTO_ESSIV
849 tristate "ESSIV support for block encryption"
850 select CRYPTO_AUTHENC
1da177e4 851 help
f1f142ad
RE
852 Encrypted salt-sector initialization vector (ESSIV) is an IV
853 generation method that is used in some cases by fscrypt and/or
854 dm-crypt. It uses the hash of the block encryption key as the
855 symmetric key for a block encryption pass applied to the input
856 IV, making low entropy IV sources more suitable for block
857 encryption.
1da177e4 858
f1f142ad
RE
859 This driver implements a crypto API template that can be
860 instantiated either as an skcipher or as an AEAD (depending on the
861 type of the first template argument), and which defers encryption
862 and decryption requests to the encapsulated cipher after applying
863 ESSIV to the input IV. Note that in the AEAD case, it is assumed
864 that the keys are presented in the same format used by the authenc
865 template, and that the IV appears at the end of the authenticated
866 associated data (AAD) region (which is how dm-crypt uses it.)
1da177e4 867
f1f142ad
RE
868 Note that the use of ESSIV is not recommended for new deployments,
869 and so this only needs to be enabled when interoperability with
870 existing encrypted volumes of filesystems is required, or when
871 building for a particular system that requires it (e.g., when
872 the SoC in question has accelerated CBC but not XTS, making CBC
873 combined with ESSIV the only feasible mode for h/w accelerated
874 block encryption)
1da177e4 875
f1f142ad 876endmenu
b5e0b032 877
f1f142ad 878menu "Hashes, digests, and MACs"
b5e0b032 879
f1f142ad
RE
880config CRYPTO_BLAKE2B
881 tristate "BLAKE2b digest algorithm"
882 select CRYPTO_HASH
584fffc8 883 help
f1f142ad
RE
884 Implementation of cryptographic hash function BLAKE2b (or just BLAKE2),
885 optimized for 64bit platforms and can produce digests of any size
886 between 1 to 64. The keyed hash is also implemented.
584fffc8 887
f1f142ad 888 This module provides the following algorithms:
584fffc8 889
f1f142ad
RE
890 - blake2b-160
891 - blake2b-256
892 - blake2b-384
893 - blake2b-512
584fffc8 894
f1f142ad 895 See https://blake2.net for further information.
584fffc8 896
f1f142ad
RE
897config CRYPTO_CMAC
898 tristate "CMAC support"
899 select CRYPTO_HASH
900 select CRYPTO_MANAGER
584fffc8 901 help
f1f142ad
RE
902 Cipher-based Message Authentication Code (CMAC) specified by
903 The National Institute of Standards and Technology (NIST).
584fffc8 904
f1f142ad
RE
905 https://tools.ietf.org/html/rfc4493
906 http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf
584fffc8 907
f1f142ad
RE
908config CRYPTO_GHASH
909 tristate "GHASH hash function"
910 select CRYPTO_GF128MUL
911 select CRYPTO_HASH
52ba867c 912 help
f1f142ad
RE
913 GHASH is the hash function used in GCM (Galois/Counter Mode).
914 It is not a general-purpose cryptographic hash function.
52ba867c 915
f1f142ad
RE
916config CRYPTO_HMAC
917 tristate "HMAC support"
918 select CRYPTO_HASH
919 select CRYPTO_MANAGER
584fffc8 920 help
f1f142ad
RE
921 HMAC: Keyed-Hashing for Message Authentication (RFC2104).
922 This is required for IPSec.
584fffc8 923
f1f142ad
RE
924config CRYPTO_MD4
925 tristate "MD4 digest algorithm"
926 select CRYPTO_HASH
044ab525 927 help
f1f142ad 928 MD4 message digest algorithm (RFC1320).
044ab525 929
f1f142ad
RE
930config CRYPTO_MD5
931 tristate "MD5 digest algorithm"
932 select CRYPTO_HASH
1da177e4 933 help
f1f142ad 934 MD5 message digest algorithm (RFC1321).
1da177e4 935
f1f142ad
RE
936config CRYPTO_MICHAEL_MIC
937 tristate "Michael MIC keyed digest algorithm"
938 select CRYPTO_HASH
1da177e4 939 help
f1f142ad
RE
940 Michael MIC is used for message integrity protection in TKIP
941 (IEEE 802.11i). This algorithm is required for TKIP, but it
942 should not be used for other purposes because of the weakness
943 of the algorithm.
1da177e4 944
f1f142ad
RE
945config CRYPTO_POLYVAL
946 tristate
947 select CRYPTO_GF128MUL
948 select CRYPTO_HASH
1da177e4 949 help
f1f142ad
RE
950 POLYVAL is the hash function used in HCTR2. It is not a general-purpose
951 cryptographic hash function.
fb4f10ed 952
f1f142ad
RE
953config CRYPTO_POLY1305
954 tristate "Poly1305 authenticator algorithm"
955 select CRYPTO_HASH
956 select CRYPTO_LIB_POLY1305_GENERIC
1da177e4 957 help
f1f142ad 958 Poly1305 authenticator algorithm, RFC7539.
1da177e4 959
f1f142ad
RE
960 Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
961 It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
962 in IETF protocols. This is the portable C implementation of Poly1305.
963
964config CRYPTO_RMD160
965 tristate "RIPEMD-160 digest algorithm"
966 select CRYPTO_HASH
1da177e4 967 help
f1f142ad 968 RIPEMD-160 (ISO/IEC 10118-3:2004).
1da177e4 969
f1f142ad
RE
970 RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
971 to be used as a secure replacement for the 128-bit hash functions
972 MD4, MD5 and its predecessor RIPEMD
973 (not to be confused with RIPEMD-128).
1da177e4 974
f1f142ad
RE
975 It's speed is comparable to SHA1 and there are no known attacks
976 against RIPEMD-160.
1da177e4 977
f1f142ad
RE
978 Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
979 See <https://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
980
981config CRYPTO_SHA1
982 tristate "SHA1 digest algorithm"
983 select CRYPTO_HASH
984 select CRYPTO_LIB_SHA1
c08d0e64 985 help
f1f142ad 986 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
c08d0e64 987
f1f142ad
RE
988config CRYPTO_SHA256
989 tristate "SHA224 and SHA256 digest algorithm"
990 select CRYPTO_HASH
991 select CRYPTO_LIB_SHA256
992 help
993 SHA256 secure hash standard (DFIPS 180-2).
c08d0e64 994
f1f142ad
RE
995 This version of SHA implements a 256 bit hash with 128 bits of
996 security against collision attacks.
de61d7ae 997
f1f142ad
RE
998 This code also includes SHA-224, a 224 bit hash with 112 bits
999 of security against collision attacks.
aa762409 1000
f1f142ad
RE
1001config CRYPTO_SHA512
1002 tristate "SHA384 and SHA512 digest algorithms"
1003 select CRYPTO_HASH
1da177e4 1004 help
f1f142ad 1005 SHA512 secure hash standard (DFIPS 180-2).
1da177e4 1006
f1f142ad
RE
1007 This version of SHA implements a 512 bit hash with 256 bits of
1008 security against collision attacks.
584fffc8 1009
f1f142ad
RE
1010 This code also includes SHA-384, a 384 bit hash with 192 bits
1011 of security against collision attacks.
584fffc8 1012
f1f142ad
RE
1013config CRYPTO_SHA3
1014 tristate "SHA3 digest algorithm"
1015 select CRYPTO_HASH
e4e712bb 1016 help
f1f142ad
RE
1017 SHA-3 secure hash standard (DFIPS 202). It's based on
1018 cryptographic sponge function family called Keccak.
e4e712bb 1019
f1f142ad
RE
1020 References:
1021 http://keccak.noekeon.org/
e4e712bb 1022
f1f142ad
RE
1023config CRYPTO_SM3
1024 tristate
e4e712bb 1025
f1f142ad
RE
1026config CRYPTO_SM3_GENERIC
1027 tristate "SM3 digest algorithm"
1028 select CRYPTO_HASH
1029 select CRYPTO_SM3
1da177e4 1030 help
f1f142ad
RE
1031 SM3 secure hash function as defined by OSCCA GM/T 0004-2012 SM3).
1032 It is part of the Chinese Commercial Cryptography suite.
1da177e4 1033
f1f142ad
RE
1034 References:
1035 http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
1036 https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
584fffc8 1037
f1f142ad
RE
1038config CRYPTO_STREEBOG
1039 tristate "Streebog Hash Function"
1040 select CRYPTO_HASH
1041 help
1042 Streebog Hash Function (GOST R 34.11-2012, RFC 6986) is one of the Russian
1043 cryptographic standard algorithms (called GOST algorithms).
1044 This setting enables two hash algorithms with 256 and 512 bits output.
584fffc8 1045
f1f142ad
RE
1046 References:
1047 https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
1048 https://tools.ietf.org/html/rfc6986
d2825fa9 1049
f1f142ad
RE
1050config CRYPTO_VMAC
1051 tristate "VMAC support"
1052 select CRYPTO_HASH
1053 select CRYPTO_MANAGER
747c8ce4 1054 help
f1f142ad
RE
1055 VMAC is a message authentication algorithm designed for
1056 very high speed on 64-bit architectures.
747c8ce4 1057
f1f142ad
RE
1058 See also:
1059 <https://fastcrypto.org/vmac>
747c8ce4 1060
f1f142ad
RE
1061config CRYPTO_WP512
1062 tristate "Whirlpool digest algorithms"
1063 select CRYPTO_HASH
1064 help
1065 Whirlpool hash algorithm 512, 384 and 256-bit hashes
747c8ce4 1066
f1f142ad
RE
1067 Whirlpool-512 is part of the NESSIE cryptographic primitives.
1068 Whirlpool will be part of the ISO/IEC 10118-3:2003(E) standard
747c8ce4 1069
f1f142ad
RE
1070 See also:
1071 <http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html>
747c8ce4 1072
f1f142ad
RE
1073config CRYPTO_XCBC
1074 tristate "XCBC support"
1075 select CRYPTO_HASH
1076 select CRYPTO_MANAGER
1077 help
1078 XCBC: Keyed-Hashing with encryption algorithm
1079 https://www.ietf.org/rfc/rfc3566.txt
1080 http://csrc.nist.gov/encryption/modes/proposedmodes/
1081 xcbc-mac/xcbc-mac-spec.pdf
747c8ce4 1082
f1f142ad
RE
1083config CRYPTO_XXHASH
1084 tristate "xxHash hash algorithm"
1085 select CRYPTO_HASH
1086 select XXHASH
1da177e4 1087 help
f1f142ad
RE
1088 xxHash non-cryptographic hash algorithm. Extremely fast, working at
1089 speeds close to RAM limits.
1da177e4 1090
f1f142ad 1091endmenu
584fffc8 1092
f1f142ad 1093menu "CRCs (cyclic redundancy checks)"
584fffc8 1094
f1f142ad 1095config CRYPTO_CRC32C
ec84348d 1096 tristate "CRC32c"
f1f142ad
RE
1097 select CRYPTO_HASH
1098 select CRC32
1099 help
ec84348d
RE
1100 CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1101
1102 A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1103 by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
1104 Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1105 on Communications, Vol. 41, No. 6, June 1993, selected for use with
1106 iSCSI.
1107
1108 Used by btrfs, ext4, jbd2, NVMeoF/TCP, and iSCSI.
584fffc8 1109
f1f142ad 1110config CRYPTO_CRC32
ec84348d 1111 tristate "CRC32"
f1f142ad
RE
1112 select CRYPTO_HASH
1113 select CRC32
04ac7db3 1114 help
ec84348d
RE
1115 CRC32 CRC algorithm (IEEE 802.3)
1116
1117 Used by RoCEv2 and f2fs.
04ac7db3 1118
f1f142ad 1119config CRYPTO_CRCT10DIF
ec84348d 1120 tristate "CRCT10DIF"
f1f142ad
RE
1121 select CRYPTO_HASH
1122 help
ec84348d
RE
1123 CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
1124
1125 CRC algorithm used by the SCSI Block Commands standard.
04ac7db3 1126
f1f142ad 1127config CRYPTO_CRC64_ROCKSOFT
ec84348d 1128 tristate "CRC64 based on Rocksoft Model algorithm"
f1f142ad
RE
1129 depends on CRC64
1130 select CRYPTO_HASH
ec84348d
RE
1131 help
1132 CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm
1133
1134 Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY)
1135
1136 See https://zlib.net/crc_v3.txt
584fffc8 1137
f1f142ad 1138endmenu
584fffc8 1139
f1f142ad 1140menu "Compression"
584fffc8
SS
1141
1142config CRYPTO_DEFLATE
1143 tristate "Deflate compression algorithm"
1144 select CRYPTO_ALGAPI
f6ded09d 1145 select CRYPTO_ACOMP2
584fffc8
SS
1146 select ZLIB_INFLATE
1147 select ZLIB_DEFLATE
3c09f17c 1148 help
584fffc8
SS
1149 This is the Deflate algorithm (RFC1951), specified for use in
1150 IPSec with the IPCOMP protocol (RFC3173, RFC2394).
1151
1152 You will most probably want this if using IPSec.
3c09f17c 1153
0b77abb3
ZS
1154config CRYPTO_LZO
1155 tristate "LZO compression algorithm"
1156 select CRYPTO_ALGAPI
ac9d2c4b 1157 select CRYPTO_ACOMP2
0b77abb3
ZS
1158 select LZO_COMPRESS
1159 select LZO_DECOMPRESS
1160 help
1161 This is the LZO algorithm.
1162
35a1fc18
SJ
1163config CRYPTO_842
1164 tristate "842 compression algorithm"
2062c5b6 1165 select CRYPTO_ALGAPI
6a8de3ae 1166 select CRYPTO_ACOMP2
2062c5b6
DS
1167 select 842_COMPRESS
1168 select 842_DECOMPRESS
35a1fc18
SJ
1169 help
1170 This is the 842 algorithm.
0ea8530d
CM
1171
1172config CRYPTO_LZ4
1173 tristate "LZ4 compression algorithm"
1174 select CRYPTO_ALGAPI
8cd9330e 1175 select CRYPTO_ACOMP2
0ea8530d
CM
1176 select LZ4_COMPRESS
1177 select LZ4_DECOMPRESS
1178 help
1179 This is the LZ4 algorithm.
1180
1181config CRYPTO_LZ4HC
1182 tristate "LZ4HC compression algorithm"
1183 select CRYPTO_ALGAPI
91d53d96 1184 select CRYPTO_ACOMP2
0ea8530d
CM
1185 select LZ4HC_COMPRESS
1186 select LZ4_DECOMPRESS
1187 help
1188 This is the LZ4 high compression mode algorithm.
35a1fc18 1189
d28fc3db
NT
1190config CRYPTO_ZSTD
1191 tristate "Zstd compression algorithm"
1192 select CRYPTO_ALGAPI
1193 select CRYPTO_ACOMP2
1194 select ZSTD_COMPRESS
1195 select ZSTD_DECOMPRESS
1196 help
1197 This is the zstd algorithm.
1198
f1f142ad
RE
1199endmenu
1200
1201menu "Random number generation"
17f0f4a4
NH
1202
1203config CRYPTO_ANSI_CPRNG
1204 tristate "Pseudo Random Number Generation for Cryptographic modules"
1205 select CRYPTO_AES
1206 select CRYPTO_RNG
17f0f4a4
NH
1207 help
1208 This option enables the generic pseudo random number generator
1209 for cryptographic modules. Uses the Algorithm specified in
7dd607e8
JK
1210 ANSI X9.31 A.2.4. Note that this option must be enabled if
1211 CRYPTO_FIPS is selected
17f0f4a4 1212
f2c89a10 1213menuconfig CRYPTO_DRBG_MENU
419090c6 1214 tristate "NIST SP800-90A DRBG"
419090c6
SM
1215 help
1216 NIST SP800-90A compliant DRBG. In the following submenu, one or
1217 more of the DRBG types must be selected.
1218
f2c89a10 1219if CRYPTO_DRBG_MENU
419090c6
SM
1220
1221config CRYPTO_DRBG_HMAC
401e4238 1222 bool
419090c6 1223 default y
419090c6 1224 select CRYPTO_HMAC
5261cdf4 1225 select CRYPTO_SHA512
419090c6
SM
1226
1227config CRYPTO_DRBG_HASH
1228 bool "Enable Hash DRBG"
826775bb 1229 select CRYPTO_SHA256
419090c6
SM
1230 help
1231 Enable the Hash DRBG variant as defined in NIST SP800-90A.
1232
1233config CRYPTO_DRBG_CTR
1234 bool "Enable CTR DRBG"
419090c6 1235 select CRYPTO_AES
d6fc1a45 1236 select CRYPTO_CTR
419090c6
SM
1237 help
1238 Enable the CTR DRBG variant as defined in NIST SP800-90A.
1239
f2c89a10
HX
1240config CRYPTO_DRBG
1241 tristate
401e4238 1242 default CRYPTO_DRBG_MENU
f2c89a10 1243 select CRYPTO_RNG
bb5530e4 1244 select CRYPTO_JITTERENTROPY
f2c89a10
HX
1245
1246endif # if CRYPTO_DRBG_MENU
419090c6 1247
bb5530e4
SM
1248config CRYPTO_JITTERENTROPY
1249 tristate "Jitterentropy Non-Deterministic Random Number Generator"
2f313e02 1250 select CRYPTO_RNG
bb5530e4
SM
1251 help
1252 The Jitterentropy RNG is a noise that is intended
1253 to provide seed to another RNG. The RNG does not
1254 perform any cryptographic whitening of the generated
1255 random numbers. This Jitterentropy RNG registers with
1256 the kernel crypto API and can be used by any caller.
1257
026a733e
SM
1258config CRYPTO_KDF800108_CTR
1259 tristate
a88592cc 1260 select CRYPTO_HMAC
304b4ace 1261 select CRYPTO_SHA256
026a733e 1262
f1f142ad
RE
1263endmenu
1264menu "User-space interface"
1265
03c8efc1
HX
1266config CRYPTO_USER_API
1267 tristate
1268
fe869cdb
HX
1269config CRYPTO_USER_API_HASH
1270 tristate "User-space interface for hash algorithms"
7451708f 1271 depends on NET
fe869cdb
HX
1272 select CRYPTO_HASH
1273 select CRYPTO_USER_API
1274 help
1275 This option enables the user-spaces interface for hash
1276 algorithms.
1277
8ff59090
HX
1278config CRYPTO_USER_API_SKCIPHER
1279 tristate "User-space interface for symmetric key cipher algorithms"
7451708f 1280 depends on NET
b95bba5d 1281 select CRYPTO_SKCIPHER
8ff59090
HX
1282 select CRYPTO_USER_API
1283 help
1284 This option enables the user-spaces interface for symmetric
1285 key cipher algorithms.
1286
2f375538
SM
1287config CRYPTO_USER_API_RNG
1288 tristate "User-space interface for random number generator algorithms"
1289 depends on NET
1290 select CRYPTO_RNG
1291 select CRYPTO_USER_API
1292 help
1293 This option enables the user-spaces interface for random
1294 number generator algorithms.
1295
77ebdabe
EP
1296config CRYPTO_USER_API_RNG_CAVP
1297 bool "Enable CAVP testing of DRBG"
1298 depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
1299 help
1300 This option enables extra API for CAVP testing via the user-space
1301 interface: resetting of DRBG entropy, and providing Additional Data.
1302 This should only be enabled for CAVP testing. You should say
1303 no unless you know what this is.
1304
b64a2d95
HX
1305config CRYPTO_USER_API_AEAD
1306 tristate "User-space interface for AEAD cipher algorithms"
1307 depends on NET
1308 select CRYPTO_AEAD
b95bba5d 1309 select CRYPTO_SKCIPHER
72548b09 1310 select CRYPTO_NULL
b64a2d95
HX
1311 select CRYPTO_USER_API
1312 help
1313 This option enables the user-spaces interface for AEAD
1314 cipher algorithms.
1315
9ace6771
AB
1316config CRYPTO_USER_API_ENABLE_OBSOLETE
1317 bool "Enable obsolete cryptographic algorithms for userspace"
1318 depends on CRYPTO_USER_API
1319 default y
1320 help
1321 Allow obsolete cryptographic algorithms to be selected that have
1322 already been phased out from internal use by the kernel, and are
1323 only useful for userspace clients that still rely on them.
1324
cac5818c
CL
1325config CRYPTO_STATS
1326 bool "Crypto usage statistics for User-space"
a6a31385 1327 depends on CRYPTO_USER
cac5818c
CL
1328 help
1329 This option enables the gathering of crypto stats.
1330 This will collect:
1331 - encrypt/decrypt size and numbers of symmeric operations
1332 - compress/decompress size and numbers of compress operations
1333 - size and numbers of hash operations
1334 - encrypt/decrypt/sign/verify numbers for asymmetric operations
1335 - generate/seed numbers for rng operations
1336
f1f142ad
RE
1337endmenu
1338
ee08997f
DK
1339config CRYPTO_HASH_INFO
1340 bool
1341
4a329fec
RE
1342if ARM
1343source "arch/arm/crypto/Kconfig"
1344endif
1345if ARM64
1346source "arch/arm64/crypto/Kconfig"
1347endif
e45f710b
RE
1348if MIPS
1349source "arch/mips/crypto/Kconfig"
1350endif
6a490a4e
RE
1351if PPC
1352source "arch/powerpc/crypto/Kconfig"
1353endif
c9d24c97
RE
1354if S390
1355source "arch/s390/crypto/Kconfig"
1356endif
0e9f9ea6
RE
1357if SPARC
1358source "arch/sparc/crypto/Kconfig"
1359endif
28a936ef
RE
1360if X86
1361source "arch/x86/crypto/Kconfig"
1362endif
e45f710b 1363
1da177e4 1364source "drivers/crypto/Kconfig"
8636a1f9
MY
1365source "crypto/asymmetric_keys/Kconfig"
1366source "certs/Kconfig"
1da177e4 1367
cce9e06d 1368endif # if CRYPTO