blob: d779667671b23f03c57b5e887627f06da775ef2f [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#
Dan Williams685784a2007-07-09 11:56:42 -07003# Generic algorithms support
4#
5config XOR_BLOCKS
6 tristate
7
8#
Dan Williams9bc89cd2007-01-02 11:10:44 -07009# async_tx api: hardware offloaded memory transfer/transform support
10#
11source "crypto/async_tx/Kconfig"
12
13#
Linus Torvalds1da177e2005-04-16 15:20:36 -070014# Cryptographic API Configuration
15#
Jan Engelhardt2e290f42007-05-18 15:11:01 +100016menuconfig CRYPTO
Sebastian Siewiorc3715cb92008-03-30 16:36:09 +080017 tristate "Cryptographic API"
Eric Biggers7033b932022-07-25 11:36:34 -070018 select CRYPTO_LIB_UTILS
Linus Torvalds1da177e2005-04-16 15:20:36 -070019 help
20 This option provides the core Cryptographic API.
21
Herbert Xucce9e062006-08-21 21:08:13 +100022if CRYPTO
23
Robert Elliottf1f142a2022-08-20 13:41:44 -050024menu "Crypto core or helper"
Sebastian Siewior584fffc2008-04-05 21:04:48 +080025
Neil Hormanccb778e2008-08-05 14:13:08 +080026config CRYPTO_FIPS
27 bool "FIPS 200 compliance"
Herbert Xuf2c89a12014-07-04 22:15:08 +080028 depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS
Alec Ari1f696092016-10-04 19:34:30 -030029 depends on (MODULE_SIG || !MODULES)
Neil Hormanccb778e2008-08-05 14:13:08 +080030 help
Geert Uytterhoevend99324c2019-03-20 11:41:03 +010031 This option enables the fips boot option which is
32 required if you want the system to operate in a FIPS 200
Neil Hormanccb778e2008-08-05 14:13:08 +080033 certification. You should say no unless you know what
Chuck Ebberte84c5482010-09-03 19:17:49 +080034 this is.
Neil Hormanccb778e2008-08-05 14:13:08 +080035
Vladis Dronov5a447492022-07-08 14:33:13 +020036config 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
Herbert Xucce9e062006-08-21 21:08:13 +100057config CRYPTO_ALGAPI
58 tristate
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110059 select CRYPTO_ALGAPI2
Herbert Xucce9e062006-08-21 21:08:13 +100060 help
61 This option provides the API for cryptographic algorithms.
62
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110063config CRYPTO_ALGAPI2
64 tristate
65
Herbert Xu1ae97822007-08-30 15:36:14 +080066config CRYPTO_AEAD
67 tristate
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110068 select CRYPTO_AEAD2
Herbert Xu1ae97822007-08-30 15:36:14 +080069 select CRYPTO_ALGAPI
70
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110071config CRYPTO_AEAD2
72 tristate
73 select CRYPTO_ALGAPI2
Herbert Xu149a3972015-08-13 17:28:58 +080074 select CRYPTO_NULL2
75 select CRYPTO_RNG2
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110076
Eric Biggersb95bba52019-10-25 12:41:13 -070077config CRYPTO_SKCIPHER
Herbert Xu5cde0af2006-08-22 00:07:53 +100078 tristate
Eric Biggersb95bba52019-10-25 12:41:13 -070079 select CRYPTO_SKCIPHER2
Herbert Xu5cde0af2006-08-22 00:07:53 +100080 select CRYPTO_ALGAPI
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110081
Eric Biggersb95bba52019-10-25 12:41:13 -070082config CRYPTO_SKCIPHER2
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110083 tristate
84 select CRYPTO_ALGAPI2
85 select CRYPTO_RNG2
Herbert Xu5cde0af2006-08-22 00:07:53 +100086
Herbert Xu055bcee2006-08-19 22:24:23 +100087config CRYPTO_HASH
88 tristate
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110089 select CRYPTO_HASH2
Herbert Xu055bcee2006-08-19 22:24:23 +100090 select CRYPTO_ALGAPI
91
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110092config CRYPTO_HASH2
93 tristate
94 select CRYPTO_ALGAPI2
95
Neil Horman17f0f4a2008-08-14 22:15:52 +100096config CRYPTO_RNG
97 tristate
Herbert Xu6a0fcbb2008-12-10 23:29:44 +110098 select CRYPTO_RNG2
Neil Horman17f0f4a2008-08-14 22:15:52 +100099 select CRYPTO_ALGAPI
100
Herbert Xu6a0fcbb2008-12-10 23:29:44 +1100101config CRYPTO_RNG2
102 tristate
103 select CRYPTO_ALGAPI2
104
Herbert Xu401e4232015-06-03 14:49:31 +0800105config CRYPTO_RNG_DEFAULT
106 tristate
107 select CRYPTO_DRBG_MENU
108
Tadeusz Struk3c339ab2015-06-16 10:30:55 -0700109config CRYPTO_AKCIPHER2
110 tristate
111 select CRYPTO_ALGAPI2
112
113config CRYPTO_AKCIPHER
114 tristate
115 select CRYPTO_AKCIPHER2
116 select CRYPTO_ALGAPI
117
Salvatore Benedetto4e5f2c42016-06-22 17:49:13 +0100118config CRYPTO_KPP2
119 tristate
120 select CRYPTO_ALGAPI2
121
122config CRYPTO_KPP
123 tristate
124 select CRYPTO_ALGAPI
125 select CRYPTO_KPP2
126
Giovanni Cabiddu2ebda742016-10-21 13:19:47 +0100127config CRYPTO_ACOMP2
128 tristate
129 select CRYPTO_ALGAPI2
Bart Van Assche8cd579d2018-01-05 08:26:47 -0800130 select SGL_ALLOC
Giovanni Cabiddu2ebda742016-10-21 13:19:47 +0100131
132config CRYPTO_ACOMP
133 tristate
134 select CRYPTO_ALGAPI
135 select CRYPTO_ACOMP2
136
Herbert Xu2b8c19d2006-09-21 11:31:44 +1000137config CRYPTO_MANAGER
138 tristate "Cryptographic algorithm manager"
Herbert Xu6a0fcbb2008-12-10 23:29:44 +1100139 select CRYPTO_MANAGER2
Herbert Xu2b8c19d2006-09-21 11:31:44 +1000140 help
141 Create default cryptographic template instantiations such as
142 cbc(aes).
143
Herbert Xu6a0fcbb2008-12-10 23:29:44 +1100144config CRYPTO_MANAGER2
145 def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
146 select CRYPTO_AEAD2
147 select CRYPTO_HASH2
Eric Biggersb95bba52019-10-25 12:41:13 -0700148 select CRYPTO_SKCIPHER2
Tadeusz Struk946cc462015-06-16 10:31:06 -0700149 select CRYPTO_AKCIPHER2
Salvatore Benedetto4e5f2c42016-06-22 17:49:13 +0100150 select CRYPTO_KPP2
Giovanni Cabiddu2ebda742016-10-21 13:19:47 +0100151 select CRYPTO_ACOMP2
Herbert Xu6a0fcbb2008-12-10 23:29:44 +1100152
Steffen Klasserta38f7902011-09-27 07:23:50 +0200153config CRYPTO_USER
154 tristate "Userspace cryptographic algorithm configuration"
Herbert Xu5db017a2011-11-01 12:12:43 +1100155 depends on NET
Steffen Klasserta38f7902011-09-27 07:23:50 +0200156 select CRYPTO_MANAGER
157 help
Valdis.Kletnieks@vt.edud19978f2011-11-09 01:29:20 -0500158 Userspace configuration for cryptographic instantiations such as
Steffen Klasserta38f7902011-09-27 07:23:50 +0200159 cbc(aes).
160
Herbert Xu326a6342010-08-06 09:40:28 +0800161config CRYPTO_MANAGER_DISABLE_TESTS
162 bool "Disable run-time self tests"
Herbert Xu00ca28a2010-08-06 10:34:00 +0800163 default y
Alexander Shishkin0b767f92010-06-03 20:53:43 +1000164 help
Herbert Xu326a6342010-08-06 09:40:28 +0800165 Disable run-time self tests that normally take place at
166 algorithm registration.
Alexander Shishkin0b767f92010-06-03 20:53:43 +1000167
Eric Biggers5b2706a2019-01-31 23:51:44 -0800168config CRYPTO_MANAGER_EXTRA_TESTS
169 bool "Enable extra run-time crypto self tests"
Jason A. Donenfeld6569e302020-11-02 14:48:15 +0100170 depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_MANAGER
Eric Biggers5b2706a2019-01-31 23:51:44 -0800171 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
Rik Snelc494e072006-11-29 18:59:44 +1100178config CRYPTO_GF128MUL
Eric Biggerse590e132019-05-20 09:53:43 -0700179 tristate
Rik Snelc494e072006-11-29 18:59:44 +1100180
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800181config CRYPTO_NULL
182 tristate "Null algorithms"
Herbert Xu149a3972015-08-13 17:28:58 +0800183 select CRYPTO_NULL2
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800184 help
185 These are 'Null' algorithms, used by IPsec, which do nothing.
186
Herbert Xu149a3972015-08-13 17:28:58 +0800187config CRYPTO_NULL2
Herbert Xudd43c4e2015-08-17 20:39:40 +0800188 tristate
Herbert Xu149a3972015-08-13 17:28:58 +0800189 select CRYPTO_ALGAPI2
Eric Biggersb95bba52019-10-25 12:41:13 -0700190 select CRYPTO_SKCIPHER2
Herbert Xu149a3972015-08-13 17:28:58 +0800191 select CRYPTO_HASH2
192
Steffen Klassert5068c7a2010-01-07 15:57:19 +1100193config CRYPTO_PCRYPT
Kees Cook3b4afaf2012-10-02 11:16:49 -0700194 tristate "Parallel crypto engine"
195 depends on SMP
Steffen Klassert5068c7a2010-01-07 15:57:19 +1100196 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
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800203config CRYPTO_CRYPTD
204 tristate "Software async crypto daemon"
Eric Biggersb95bba52019-10-25 12:41:13 -0700205 select CRYPTO_SKCIPHER
Loc Hob8a28252008-05-14 21:23:00 +0800206 select CRYPTO_HASH
Herbert Xu43518402006-10-16 21:28:58 +1000207 select CRYPTO_MANAGER
Herbert Xudb131ef2006-09-21 11:44:08 +1000208 help
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800209 This is a generic software asynchronous crypto daemon that
210 converts an arbitrary synchronous software crypto algorithm
211 into an asynchronous algorithm that executes in a kernel thread.
212
213config CRYPTO_AUTHENC
214 tristate "Authenc support"
215 select CRYPTO_AEAD
Eric Biggersb95bba52019-10-25 12:41:13 -0700216 select CRYPTO_SKCIPHER
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800217 select CRYPTO_MANAGER
218 select CRYPTO_HASH
Herbert Xue94c6a72015-08-04 21:23:14 +0800219 select CRYPTO_NULL
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800220 help
221 Authenc: Combined mode wrapper for IPsec.
Robert Elliottcf514b22022-08-20 13:41:50 -0500222
223 This is required for IPSec ESP (XFRM_ESP).
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800224
225config CRYPTO_TEST
226 tristate "Testing module"
Ard Biesheuvel00ea27f2020-11-20 12:04:32 +0100227 depends on m || EXPERT
Herbert Xuda7f0332008-07-31 17:08:25 +0800228 select CRYPTO_MANAGER
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800229 help
230 Quick & dirty crypto test module.
231
Herbert Xu266d0512016-11-22 20:08:25 +0800232config CRYPTO_SIMD
233 tristate
234 select CRYPTO_CRYPTD
235
Baolin Wang735d37b2016-01-26 20:25:39 +0800236config CRYPTO_ENGINE
237 tristate
238
Robert Elliottf1f142a2022-08-20 13:41:44 -0500239endmenu
240
241menu "Public-key cryptography"
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300242
243config CRYPTO_RSA
Robert Elliott05b37462022-08-20 13:41:45 -0500244 tristate "RSA (Rivest-Shamir-Adleman)"
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300245 select CRYPTO_AKCIPHER
246 select CRYPTO_MANAGER
247 select MPILIB
248 select ASN1
249 help
Robert Elliott05b37462022-08-20 13:41:45 -0500250 RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300251
252config CRYPTO_DH
Robert Elliott05b37462022-08-20 13:41:45 -0500253 tristate "DH (Diffie-Hellman)"
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300254 select CRYPTO_KPP
255 select MPILIB
256 help
Robert Elliott05b37462022-08-20 13:41:45 -0500257 DH (Diffie-Hellman) key exchange algorithm
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300258
Nicolai Stange7dce5982022-02-21 13:10:53 +0100259config CRYPTO_DH_RFC7919_GROUPS
Robert Elliott05b37462022-08-20 13:41:45 -0500260 bool "RFC 7919 FFDHE groups"
Nicolai Stange7dce5982022-02-21 13:10:53 +0100261 depends on CRYPTO_DH
Nicolai Stange1e207962022-02-21 13:10:55 +0100262 select CRYPTO_RNG_DEFAULT
Nicolai Stange7dce5982022-02-21 13:10:53 +0100263 help
Robert Elliott05b37462022-08-20 13:41:45 -0500264 FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
265 defined in RFC7919.
266
267 Support these finite-field groups in DH key exchanges:
268 - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
269
270 If unsure, say N.
Nicolai Stange7dce5982022-02-21 13:10:53 +0100271
Vitaly Chikunov4a2289d2019-04-11 18:51:19 +0300272config CRYPTO_ECC
273 tristate
Arnd Bergmann38aa1922021-09-20 12:05:35 +0200274 select CRYPTO_RNG_DEFAULT
Vitaly Chikunov4a2289d2019-04-11 18:51:19 +0300275
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300276config CRYPTO_ECDH
Robert Elliott05b37462022-08-20 13:41:45 -0500277 tristate "ECDH (Elliptic Curve Diffie-Hellman)"
Vitaly Chikunov4a2289d2019-04-11 18:51:19 +0300278 select CRYPTO_ECC
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300279 select CRYPTO_KPP
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300280 help
Robert Elliott05b37462022-08-20 13:41:45 -0500281 ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
282 using curves P-192, P-256, and P-384 (FIPS 186)
Vitaly Chikunov3d6228a52019-04-11 18:51:18 +0300283
Stefan Berger4e660292021-03-16 17:07:32 -0400284config CRYPTO_ECDSA
Robert Elliott05b37462022-08-20 13:41:45 -0500285 tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
Stefan Berger4e660292021-03-16 17:07:32 -0400286 select CRYPTO_ECC
287 select CRYPTO_AKCIPHER
288 select ASN1
289 help
Robert Elliott05b37462022-08-20 13:41:45 -0500290 ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
291 ISO/IEC 14888-3)
292 using curves P-192, P-256, and P-384
293
294 Only signature verification is implemented.
Stefan Berger4e660292021-03-16 17:07:32 -0400295
Vitaly Chikunov0d7a7862019-04-11 18:51:20 +0300296config CRYPTO_ECRDSA
Robert Elliott05b37462022-08-20 13:41:45 -0500297 tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
Vitaly Chikunov0d7a7862019-04-11 18:51:20 +0300298 select CRYPTO_ECC
299 select CRYPTO_AKCIPHER
300 select CRYPTO_STREEBOG
Vitaly Chikunov10366332019-04-24 04:32:40 +0300301 select OID_REGISTRY
302 select ASN1
Vitaly Chikunov0d7a7862019-04-11 18:51:20 +0300303 help
304 Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
Robert Elliott05b37462022-08-20 13:41:45 -0500305 RFC 7091, ISO/IEC 14888-3)
306
307 One of the Russian cryptographic standard algorithms (called GOST
308 algorithms). Only signature verification is implemented.
Vitaly Chikunov0d7a7862019-04-11 18:51:20 +0300309
Tianjia Zhangea7ecb62020-09-21 00:20:57 +0800310config CRYPTO_SM2
Robert Elliott05b37462022-08-20 13:41:45 -0500311 tristate "SM2 (ShangMi 2)"
Jason A. Donenfeldd2825fa2022-03-13 21:11:01 -0600312 select CRYPTO_SM3
Tianjia Zhangea7ecb62020-09-21 00:20:57 +0800313 select CRYPTO_AKCIPHER
314 select CRYPTO_MANAGER
315 select MPILIB
316 select ASN1
317 help
Robert Elliott05b37462022-08-20 13:41:45 -0500318 SM2 (ShangMi 2) public key algorithm
319
320 Published by State Encryption Management Bureau, China,
Tianjia Zhangea7ecb62020-09-21 00:20:57 +0800321 as specified by OSCCA GM/T 0003.1-2012 -- 0003.5-2012.
322
323 References:
Robert Elliott05b37462022-08-20 13:41:45 -0500324 https://datatracker.ietf.org/doc/draft-shen-sm2-ecdsa/
Tianjia Zhangea7ecb62020-09-21 00:20:57 +0800325 http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
326 http://www.gmbz.org.cn/main/bzlb.html
327
Ard Biesheuvelee772cb2019-11-08 13:22:34 +0100328config CRYPTO_CURVE25519
Robert Elliott05b37462022-08-20 13:41:45 -0500329 tristate "Curve25519"
Ard Biesheuvelee772cb2019-11-08 13:22:34 +0100330 select CRYPTO_KPP
331 select CRYPTO_LIB_CURVE25519_GENERIC
Robert Elliott05b37462022-08-20 13:41:45 -0500332 help
333 Curve25519 elliptic curve (RFC7748)
Ard Biesheuvelee772cb2019-11-08 13:22:34 +0100334
Robert Elliottf1f142a2022-08-20 13:41:44 -0500335endmenu
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800336
Robert Elliottf1f142a2022-08-20 13:41:44 -0500337menu "Block ciphers"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338
339config CRYPTO_AES
Robert Elliottcf514b22022-08-20 13:41:50 -0500340 tristate "AES (Advanced Encryption Standard)"
Herbert Xucce9e062006-08-21 21:08:13 +1000341 select CRYPTO_ALGAPI
Ard Biesheuvel5bb12d72019-07-02 21:41:33 +0200342 select CRYPTO_LIB_AES
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500344 AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700345
346 Rijndael appears to be consistently a very good performer in
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800347 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.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700354
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800355 The AES specifies three key sizes: 128, 192 and 256 bits
Linus Torvalds1da177e2005-04-16 15:20:36 -0700356
Ard Biesheuvelb5e0b032017-02-02 16:37:40 +0000357config CRYPTO_AES_TI
Robert Elliottcf514b22022-08-20 13:41:50 -0500358 tristate "AES (Advanced Encryption Standard) (fixed time)"
Ard Biesheuvelb5e0b032017-02-02 16:37:40 +0000359 select CRYPTO_ALGAPI
Ard Biesheuvele59c1c92019-07-02 21:41:22 +0200360 select CRYPTO_LIB_AES
Ard Biesheuvelb5e0b032017-02-02 16:37:40 +0000361 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500362 AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
363
Ard Biesheuvelb5e0b032017-02-02 16:37:40 +0000364 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)
370
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
Eric Biggers0a6a40c2018-10-17 21:37:58 -0700375 block. Interrupts are also disabled to avoid races where cachelines
376 are evicted when the CPU is interrupted to do something else.
Ard Biesheuvelb5e0b032017-02-02 16:37:40 +0000377
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800378config CRYPTO_ANUBIS
Robert Elliottcf514b22022-08-20 13:41:50 -0500379 tristate "Anubis"
Ard Biesheuvel1674aea2020-09-11 17:11:03 +0300380 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800381 select CRYPTO_ALGAPI
382 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500383 Anubis cipher algorithm
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800384
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.
388
Robert Elliottcf514b22022-08-20 13:41:50 -0500389 See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html
390 for further information.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800391
Robert Elliottf1f142a2022-08-20 13:41:44 -0500392config CRYPTO_ARIA
Robert Elliottcf514b22022-08-20 13:41:50 -0500393 tristate "ARIA"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500394 select CRYPTO_ALGAPI
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800395 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500396 ARIA cipher algorithm (RFC5794)
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800397
Robert Elliottf1f142a2022-08-20 13:41:44 -0500398 ARIA is a standard encryption algorithm of the Republic of Korea.
399 The ARIA specifies three key sizes and rounds.
400 128-bit: 12 rounds.
401 192-bit: 14 rounds.
402 256-bit: 16 rounds.
403
Robert Elliottcf514b22022-08-20 13:41:50 -0500404 See:
405 https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800406
407config CRYPTO_BLOWFISH
Robert Elliottcf514b22022-08-20 13:41:50 -0500408 tristate "Blowfish"
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800409 select CRYPTO_ALGAPI
Jussi Kivilinna52ba8672011-09-02 01:45:07 +0300410 select CRYPTO_BLOWFISH_COMMON
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800411 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500412 Blowfish cipher algorithm, by Bruce Schneier
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800413
414 This is a variable key length cipher which can use keys from 32
415 bits to 448 bits in length. It's fast, simple and specifically
416 designed for use on "large microprocessors".
417
Robert Elliottcf514b22022-08-20 13:41:50 -0500418 See https://www.schneier.com/blowfish.html for further information.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800419
Jussi Kivilinna52ba8672011-09-02 01:45:07 +0300420config CRYPTO_BLOWFISH_COMMON
421 tristate
422 help
423 Common parts of the Blowfish cipher algorithm shared by the
424 generic c and the assembler implementations.
425
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800426config CRYPTO_CAMELLIA
Robert Elliottcf514b22022-08-20 13:41:50 -0500427 tristate "Camellia"
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800428 select CRYPTO_ALGAPI
429 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500430 Camellia cipher algorithms (ISO/IEC 18033-3)
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800431
432 Camellia is a symmetric key block cipher developed jointly
433 at NTT and Mitsubishi Electric Corporation.
434
435 The Camellia specifies three key sizes: 128, 192 and 256 bits.
436
Robert Elliottcf514b22022-08-20 13:41:50 -0500437 See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800438
Jussi Kivilinna044ab522012-11-13 11:43:14 +0200439config CRYPTO_CAST_COMMON
440 tristate
441 help
442 Common parts of the CAST cipher algorithms shared by the
443 generic c and the assembler implementations.
444
Linus Torvalds1da177e2005-04-16 15:20:36 -0700445config CRYPTO_CAST5
Robert Elliottcf514b22022-08-20 13:41:50 -0500446 tristate "CAST5 (CAST-128)"
Herbert Xucce9e062006-08-21 21:08:13 +1000447 select CRYPTO_ALGAPI
Jussi Kivilinna044ab522012-11-13 11:43:14 +0200448 select CRYPTO_CAST_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500450 CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451
452config CRYPTO_CAST6
Robert Elliottcf514b22022-08-20 13:41:50 -0500453 tristate "CAST6 (CAST-256)"
Herbert Xucce9e062006-08-21 21:08:13 +1000454 select CRYPTO_ALGAPI
Jussi Kivilinna044ab522012-11-13 11:43:14 +0200455 select CRYPTO_CAST_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500457 CAST6 (CAST-256) encryption algorithm (RFC2612)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800459config CRYPTO_DES
Robert Elliottcf514b22022-08-20 13:41:50 -0500460 tristate "DES and Triple DES EDE"
Herbert Xucce9e062006-08-21 21:08:13 +1000461 select CRYPTO_ALGAPI
Ard Biesheuvel04007b02019-08-15 12:01:09 +0300462 select CRYPTO_LIB_DES
Linus Torvalds1da177e2005-04-16 15:20:36 -0700463 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500464 DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and
465 Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3)
466 cipher algorithms
Linus Torvalds1da177e2005-04-16 15:20:36 -0700467
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800468config CRYPTO_FCRYPT
Robert Elliottcf514b22022-08-20 13:41:50 -0500469 tristate "FCrypt"
Herbert Xucce9e062006-08-21 21:08:13 +1000470 select CRYPTO_ALGAPI
Eric Biggersb95bba52019-10-25 12:41:13 -0700471 select CRYPTO_SKCIPHER
Linus Torvalds1da177e2005-04-16 15:20:36 -0700472 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500473 FCrypt algorithm used by RxRPC
474
475 See https://ota.polyonymo.us/fcrypt-paper.txt
Linus Torvalds1da177e2005-04-16 15:20:36 -0700476
477config CRYPTO_KHAZAD
Robert Elliottcf514b22022-08-20 13:41:50 -0500478 tristate "Khazad"
Ard Biesheuvel1674aea2020-09-11 17:11:03 +0300479 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
Herbert Xucce9e062006-08-21 21:08:13 +1000480 select CRYPTO_ALGAPI
Linus Torvalds1da177e2005-04-16 15:20:36 -0700481 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500482 Khazad cipher algorithm
Linus Torvalds1da177e2005-04-16 15:20:36 -0700483
484 Khazad was a finalist in the initial NESSIE competition. It is
485 an algorithm optimized for 64-bit processors with good performance
486 on 32-bit processors. Khazad uses an 128 bit key size.
487
Robert Elliottcf514b22022-08-20 13:41:50 -0500488 See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
489 for further information.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800491config CRYPTO_SEED
Robert Elliottcf514b22022-08-20 13:41:50 -0500492 tristate "SEED"
Ard Biesheuvel1674aea2020-09-11 17:11:03 +0300493 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800494 select CRYPTO_ALGAPI
495 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500496 SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800497
498 SEED is a 128-bit symmetric key block cipher that has been
499 developed by KISA (Korea Information Security Agency) as a
500 national standard encryption algorithm of the Republic of Korea.
501 It is a 16 round block cipher with the key size of 128 bit.
502
Robert Elliottcf514b22022-08-20 13:41:50 -0500503 See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
504 for further information.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800505
506config CRYPTO_SERPENT
Robert Elliottcf514b22022-08-20 13:41:50 -0500507 tristate "Serpent"
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800508 select CRYPTO_ALGAPI
509 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500510 Serpent cipher algorithm, by Anderson, Biham & Knudsen
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800511
512 Keys are allowed to be from 0 to 256 bits in length, in steps
Ard Biesheuvel784506a2021-02-01 19:02:30 +0100513 of 8 bits.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800514
Robert Elliottcf514b22022-08-20 13:41:50 -0500515 See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800516
Gilad Ben-Yossef747c8ce2018-03-06 09:44:42 +0000517config CRYPTO_SM4
Jason A. Donenfeldd2825fa2022-03-13 21:11:01 -0600518 tristate
519
520config CRYPTO_SM4_GENERIC
Robert Elliottcf514b22022-08-20 13:41:50 -0500521 tristate "SM4 (ShangMi 4)"
Gilad Ben-Yossef747c8ce2018-03-06 09:44:42 +0000522 select CRYPTO_ALGAPI
Jason A. Donenfeldd2825fa2022-03-13 21:11:01 -0600523 select CRYPTO_SM4
Gilad Ben-Yossef747c8ce2018-03-06 09:44:42 +0000524 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500525 SM4 cipher algorithms (OSCCA GB/T 32907-2016,
526 ISO/IEC 18033-3:2010/Amd 1:2021)
Gilad Ben-Yossef747c8ce2018-03-06 09:44:42 +0000527
528 SM4 (GBT.32907-2016) is a cryptographic standard issued by the
529 Organization of State Commercial Administration of China (OSCCA)
530 as an authorized cryptographic algorithms for the use within China.
531
532 SMS4 was originally created for use in protecting wireless
533 networks, and is mandated in the Chinese National Standard for
534 Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
535 (GB.15629.11-2003).
536
537 The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
538 standardized through TC 260 of the Standardization Administration
539 of the People's Republic of China (SAC).
540
541 The input, output, and key of SMS4 are each 128 bits.
542
Robert Elliottcf514b22022-08-20 13:41:50 -0500543 See https://eprint.iacr.org/2008/329.pdf for further information.
Gilad Ben-Yossef747c8ce2018-03-06 09:44:42 +0000544
545 If unsure, say N.
546
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800547config CRYPTO_TEA
Robert Elliottcf514b22022-08-20 13:41:50 -0500548 tristate "TEA, XTEA and XETA"
Ard Biesheuvel1674aea2020-09-11 17:11:03 +0300549 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800550 select CRYPTO_ALGAPI
551 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500552 TEA (Tiny Encryption Algorithm) cipher algorithms
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800553
554 Tiny Encryption Algorithm is a simple cipher that uses
555 many rounds for security. It is very fast and uses
556 little memory.
557
558 Xtendend Tiny Encryption Algorithm is a modification to
559 the TEA algorithm to address a potential key weakness
560 in the TEA algorithm.
561
562 Xtendend Encryption Tiny Algorithm is a mis-implementation
563 of the XTEA algorithm for compatibility purposes.
564
565config CRYPTO_TWOFISH
Robert Elliottcf514b22022-08-20 13:41:50 -0500566 tristate "Twofish"
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800567 select CRYPTO_ALGAPI
568 select CRYPTO_TWOFISH_COMMON
569 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500570 Twofish cipher algorithm
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800571
572 Twofish was submitted as an AES (Advanced Encryption Standard)
573 candidate cipher by researchers at CounterPane Systems. It is a
574 16 round block cipher supporting key sizes of 128, 192, and 256
575 bits.
576
Robert Elliottcf514b22022-08-20 13:41:50 -0500577 See https://www.schneier.com/twofish.html for further information.
Sebastian Siewior584fffc2008-04-05 21:04:48 +0800578
579config CRYPTO_TWOFISH_COMMON
580 tristate
581 help
582 Common parts of the Twofish cipher algorithm shared by the
583 generic c and the assembler implementations.
584
Robert Elliottf1f142a2022-08-20 13:41:44 -0500585endmenu
586
587menu "Length-preserving ciphers and modes"
588
589config CRYPTO_ADIANTUM
Robert Elliottcf514b22022-08-20 13:41:50 -0500590 tristate "Adiantum"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500591 select CRYPTO_CHACHA20
592 select CRYPTO_LIB_POLY1305_GENERIC
593 select CRYPTO_NHPOLY1305
594 select CRYPTO_MANAGER
595 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500596 Adiantum tweakable, length-preserving encryption mode
597
598 Designed for fast and secure disk encryption, especially on
Robert Elliottf1f142a2022-08-20 13:41:44 -0500599 CPUs without dedicated crypto instructions. It encrypts
600 each sector using the XChaCha12 stream cipher, two passes of
601 an ε-almost-∆-universal hash function, and an invocation of
602 the AES-256 block cipher on a single 16-byte block. On CPUs
603 without AES instructions, Adiantum is much faster than
604 AES-XTS.
605
606 Adiantum's security is provably reducible to that of its
607 underlying stream and block ciphers, subject to a security
608 bound. Unlike XTS, Adiantum is a true wide-block encryption
609 mode, so it actually provides an even stronger notion of
610 security than XTS, subject to the security bound.
611
612 If unsure, say N.
613
614config CRYPTO_ARC4
Robert Elliottcf514b22022-08-20 13:41:50 -0500615 tristate "ARC4 (Alleged Rivest Cipher 4)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500616 depends on CRYPTO_USER_API_ENABLE_OBSOLETE
617 select CRYPTO_SKCIPHER
618 select CRYPTO_LIB_ARC4
619 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500620 ARC4 cipher algorithm
Robert Elliottf1f142a2022-08-20 13:41:44 -0500621
622 ARC4 is a stream cipher using keys ranging from 8 bits to 2048
623 bits in length. This algorithm is required for driver-based
624 WEP, but it should not be for other purposes because of the
625 weakness of the algorithm.
626
627config CRYPTO_CHACHA20
Robert Elliottcf514b22022-08-20 13:41:50 -0500628 tristate "ChaCha"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500629 select CRYPTO_LIB_CHACHA_GENERIC
630 select CRYPTO_SKCIPHER
631 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500632 The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
Robert Elliottf1f142a2022-08-20 13:41:44 -0500633
634 ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
635 Bernstein and further specified in RFC7539 for use in IETF protocols.
Robert Elliottcf514b22022-08-20 13:41:50 -0500636 This is the portable C implementation of ChaCha20. See
637 https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500638
639 XChaCha20 is the application of the XSalsa20 construction to ChaCha20
640 rather than to Salsa20. XChaCha20 extends ChaCha20's nonce length
641 from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
Robert Elliottcf514b22022-08-20 13:41:50 -0500642 while provably retaining ChaCha20's security. See
643 https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500644
645 XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
646 reduced security margin but increased performance. It can be needed
647 in some performance-sensitive scenarios.
648
649config CRYPTO_CBC
Robert Elliottcf514b22022-08-20 13:41:50 -0500650 tristate "CBC (Cipher Block Chaining)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500651 select CRYPTO_SKCIPHER
652 select CRYPTO_MANAGER
653 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500654 CBC (Cipher Block Chaining) mode (NIST SP800-38A)
655
656 This block cipher mode is required for IPSec ESP (XFRM_ESP).
Robert Elliottf1f142a2022-08-20 13:41:44 -0500657
658config CRYPTO_CFB
Robert Elliottcf514b22022-08-20 13:41:50 -0500659 tristate "CFB (Cipher Feedback)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500660 select CRYPTO_SKCIPHER
661 select CRYPTO_MANAGER
662 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500663 CFB (Cipher Feedback) mode (NIST SP800-38A)
664
665 This block cipher mode is required for TPM2 Cryptography.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500666
667config CRYPTO_CTR
Robert Elliottcf514b22022-08-20 13:41:50 -0500668 tristate "CTR (Counter)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500669 select CRYPTO_SKCIPHER
670 select CRYPTO_MANAGER
671 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500672 CTR (Counter) mode (NIST SP800-38A)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500673
674config CRYPTO_CTS
Robert Elliottcf514b22022-08-20 13:41:50 -0500675 tristate "CTS (Cipher Text Stealing)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500676 select CRYPTO_SKCIPHER
677 select CRYPTO_MANAGER
678 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500679 CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
680 Addendum to SP800-38A (October 2010))
681
Robert Elliottf1f142a2022-08-20 13:41:44 -0500682 This mode is required for Kerberos gss mechanism support
683 for AES encryption.
684
Robert Elliottf1f142a2022-08-20 13:41:44 -0500685config CRYPTO_ECB
Robert Elliottcf514b22022-08-20 13:41:50 -0500686 tristate "ECB (Electronic Codebook)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500687 select CRYPTO_SKCIPHER
688 select CRYPTO_MANAGER
689 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500690 ECB (Electronic Codebook) mode (NIST SP800-38A)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500691
692config CRYPTO_HCTR2
Robert Elliottcf514b22022-08-20 13:41:50 -0500693 tristate "HCTR2"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500694 select CRYPTO_XCTR
695 select CRYPTO_POLYVAL
696 select CRYPTO_MANAGER
697 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500698 HCTR2 length-preserving encryption mode
699
700 A mode for storage encryption that is efficient on processors with
701 instructions to accelerate AES and carryless multiplication, e.g.
702 x86 processors with AES-NI and CLMUL, and ARM processors with the
703 ARMv8 crypto extensions.
704
705 See https://eprint.iacr.org/2021/1441
Robert Elliottf1f142a2022-08-20 13:41:44 -0500706
707config CRYPTO_KEYWRAP
Robert Elliottcf514b22022-08-20 13:41:50 -0500708 tristate "KW (AES Key Wrap)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500709 select CRYPTO_SKCIPHER
710 select CRYPTO_MANAGER
711 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500712 KW (AES Key Wrap) authenticated encryption mode (NIST SP800-38F
713 and RFC3394) without padding.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500714
715config CRYPTO_LRW
Robert Elliottcf514b22022-08-20 13:41:50 -0500716 tristate "LRW (Liskov Rivest Wagner)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500717 select CRYPTO_SKCIPHER
718 select CRYPTO_MANAGER
719 select CRYPTO_GF128MUL
720 select CRYPTO_ECB
721 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500722 LRW (Liskov Rivest Wagner) mode
723
724 A tweakable, non malleable, non movable
Robert Elliottf1f142a2022-08-20 13:41:44 -0500725 narrow block cipher mode for dm-crypt. Use it with cipher
726 specification string aes-lrw-benbi, the key must be 256, 320 or 384.
727 The first 128, 192 or 256 bits in the key are used for AES and the
728 rest is used to tie each cipher block to its logical position.
729
Robert Elliottcf514b22022-08-20 13:41:50 -0500730 See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
731
Robert Elliottf1f142a2022-08-20 13:41:44 -0500732config CRYPTO_OFB
Robert Elliottcf514b22022-08-20 13:41:50 -0500733 tristate "OFB (Output Feedback)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500734 select CRYPTO_SKCIPHER
735 select CRYPTO_MANAGER
736 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500737 OFB (Output Feedback) mode (NIST SP800-38A)
738
739 This mode makes a block cipher into a synchronous
Robert Elliottf1f142a2022-08-20 13:41:44 -0500740 stream cipher. It generates keystream blocks, which are then XORed
741 with the plaintext blocks to get the ciphertext. Flipping a bit in the
742 ciphertext produces a flipped bit in the plaintext at the same
743 location. This property allows many error correcting codes to function
744 normally even when applied before encryption.
745
746config CRYPTO_PCBC
Robert Elliottcf514b22022-08-20 13:41:50 -0500747 tristate "PCBC (Propagating Cipher Block Chaining)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500748 select CRYPTO_SKCIPHER
749 select CRYPTO_MANAGER
750 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500751 PCBC (Propagating Cipher Block Chaining) mode
752
753 This block cipher mode is required for RxRPC.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500754
755config CRYPTO_XCTR
756 tristate
757 select CRYPTO_SKCIPHER
758 select CRYPTO_MANAGER
759 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500760 XCTR (XOR Counter) mode for HCTR2
761
762 This blockcipher mode is a variant of CTR mode using XORs and little-endian
763 addition rather than big-endian arithmetic.
764
Robert Elliottf1f142a2022-08-20 13:41:44 -0500765 XCTR mode is used to implement HCTR2.
766
767config CRYPTO_XTS
Robert Elliottcf514b22022-08-20 13:41:50 -0500768 tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500769 select CRYPTO_SKCIPHER
770 select CRYPTO_MANAGER
771 select CRYPTO_ECB
772 help
Robert Elliottcf514b22022-08-20 13:41:50 -0500773 XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
774 and IEEE 1619)
775
776 Use with aes-xts-plain, key size 256, 384 or 512 bits. This
777 implementation currently can't handle a sectorsize which is not a
778 multiple of 16 bytes.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500779
780config CRYPTO_NHPOLY1305
781 tristate
782 select CRYPTO_HASH
783 select CRYPTO_LIB_POLY1305_GENERIC
784
785endmenu
786
787menu "AEAD (authenticated encryption with associated data) ciphers"
788
789config CRYPTO_AEGIS128
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500790 tristate "AEGIS-128"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500791 select CRYPTO_AEAD
792 select CRYPTO_AES # for AES S-box tables
793 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500794 AEGIS-128 AEAD algorithm
Robert Elliottf1f142a2022-08-20 13:41:44 -0500795
796config CRYPTO_AEGIS128_SIMD
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500797 bool "AEGIS-128 (arm NEON, arm64 NEON)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500798 depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
799 default y
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500800 help
801 AEGIS-128 AEAD algorithm
802
803 Architecture: arm or arm64 using:
804 - NEON (Advanced SIMD) extension
Robert Elliottf1f142a2022-08-20 13:41:44 -0500805
806config CRYPTO_CHACHA20POLY1305
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500807 tristate "ChaCha20-Poly1305"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500808 select CRYPTO_CHACHA20
809 select CRYPTO_POLY1305
810 select CRYPTO_AEAD
811 select CRYPTO_MANAGER
812 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500813 ChaCha20 stream cipher and Poly1305 authenticator combined
814 mode (RFC8439)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500815
816config CRYPTO_CCM
Robert Elliottcf514b22022-08-20 13:41:50 -0500817 tristate "CCM (Counter with Cipher Block Chaining-MAC)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500818 select CRYPTO_CTR
819 select CRYPTO_HASH
820 select CRYPTO_AEAD
821 select CRYPTO_MANAGER
822 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500823 CCM (Counter with Cipher Block Chaining-Message Authentication Code)
824 authenticated encryption mode (NIST SP800-38C)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500825
826config CRYPTO_GCM
Robert Elliottcf514b22022-08-20 13:41:50 -0500827 tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500828 select CRYPTO_CTR
829 select CRYPTO_AEAD
830 select CRYPTO_GHASH
831 select CRYPTO_NULL
832 select CRYPTO_MANAGER
833 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500834 GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
835 (GCM Message Authentication Code) (NIST SP800-38D)
836
837 This is required for IPSec ESP (XFRM_ESP).
Robert Elliottf1f142a2022-08-20 13:41:44 -0500838
839config CRYPTO_SEQIV
840 tristate "Sequence Number IV Generator"
841 select CRYPTO_AEAD
842 select CRYPTO_SKCIPHER
843 select CRYPTO_NULL
844 select CRYPTO_RNG_DEFAULT
845 select CRYPTO_MANAGER
846 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500847 Sequence Number IV generator
848
Robert Elliottf1f142a2022-08-20 13:41:44 -0500849 This IV generator generates an IV based on a sequence number by
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500850 xoring it with a salt. This algorithm is mainly useful for CTR.
851
852 This is required for IPsec ESP (XFRM_ESP).
Robert Elliottf1f142a2022-08-20 13:41:44 -0500853
854config CRYPTO_ECHAINIV
855 tristate "Encrypted Chain IV Generator"
856 select CRYPTO_AEAD
857 select CRYPTO_NULL
858 select CRYPTO_RNG_DEFAULT
859 select CRYPTO_MANAGER
860 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500861 Encrypted Chain IV generator
862
Robert Elliottf1f142a2022-08-20 13:41:44 -0500863 This IV generator generates an IV based on the encryption of
864 a sequence number xored with a salt. This is the default
865 algorithm for CBC.
866
867config CRYPTO_ESSIV
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500868 tristate "Encrypted Salt-Sector IV Generator"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500869 select CRYPTO_AUTHENC
870 help
Robert Elliotte3d2ead2022-08-20 13:41:47 -0500871 Encrypted Salt-Sector IV generator
872
873 This IV generator is used in some cases by fscrypt and/or
Robert Elliottf1f142a2022-08-20 13:41:44 -0500874 dm-crypt. It uses the hash of the block encryption key as the
875 symmetric key for a block encryption pass applied to the input
876 IV, making low entropy IV sources more suitable for block
877 encryption.
878
879 This driver implements a crypto API template that can be
880 instantiated either as an skcipher or as an AEAD (depending on the
881 type of the first template argument), and which defers encryption
882 and decryption requests to the encapsulated cipher after applying
883 ESSIV to the input IV. Note that in the AEAD case, it is assumed
884 that the keys are presented in the same format used by the authenc
885 template, and that the IV appears at the end of the authenticated
886 associated data (AAD) region (which is how dm-crypt uses it.)
887
888 Note that the use of ESSIV is not recommended for new deployments,
889 and so this only needs to be enabled when interoperability with
890 existing encrypted volumes of filesystems is required, or when
891 building for a particular system that requires it (e.g., when
892 the SoC in question has accelerated CBC but not XTS, making CBC
893 combined with ESSIV the only feasible mode for h/w accelerated
894 block encryption)
895
896endmenu
897
898menu "Hashes, digests, and MACs"
899
900config CRYPTO_BLAKE2B
Robert Elliott3f342a22022-08-20 13:41:48 -0500901 tristate "BLAKE2b"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500902 select CRYPTO_HASH
903 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500904 BLAKE2b cryptographic hash function (RFC 7693)
905
906 BLAKE2b is optimized for 64-bit platforms and can produce digests
907 of any size between 1 and 64 bytes. The keyed hash is also implemented.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500908
909 This module provides the following algorithms:
Robert Elliottf1f142a2022-08-20 13:41:44 -0500910 - blake2b-160
911 - blake2b-256
912 - blake2b-384
913 - blake2b-512
914
Robert Elliott3f342a22022-08-20 13:41:48 -0500915 Used by the btrfs filesystem.
916
Robert Elliottf1f142a2022-08-20 13:41:44 -0500917 See https://blake2.net for further information.
918
919config CRYPTO_CMAC
Robert Elliott3f342a22022-08-20 13:41:48 -0500920 tristate "CMAC (Cipher-based MAC)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500921 select CRYPTO_HASH
922 select CRYPTO_MANAGER
923 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500924 CMAC (Cipher-based Message Authentication Code) authentication
925 mode (NIST SP800-38B and IETF RFC4493)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500926
927config CRYPTO_GHASH
Robert Elliott3f342a22022-08-20 13:41:48 -0500928 tristate "GHASH"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500929 select CRYPTO_GF128MUL
930 select CRYPTO_HASH
931 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500932 GCM GHASH function (NIST SP800-38D)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500933
934config CRYPTO_HMAC
Robert Elliott3f342a22022-08-20 13:41:48 -0500935 tristate "HMAC (Keyed-Hash MAC)"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500936 select CRYPTO_HASH
937 select CRYPTO_MANAGER
938 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500939 HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
940 RFC2104)
941
942 This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
Robert Elliottf1f142a2022-08-20 13:41:44 -0500943
944config CRYPTO_MD4
Robert Elliott3f342a22022-08-20 13:41:48 -0500945 tristate "MD4"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500946 select CRYPTO_HASH
947 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500948 MD4 message digest algorithm (RFC1320)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500949
950config CRYPTO_MD5
Robert Elliott3f342a22022-08-20 13:41:48 -0500951 tristate "MD5"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500952 select CRYPTO_HASH
953 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500954 MD5 message digest algorithm (RFC1321)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500955
956config CRYPTO_MICHAEL_MIC
Robert Elliott3f342a22022-08-20 13:41:48 -0500957 tristate "Michael MIC"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500958 select CRYPTO_HASH
959 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500960 Michael MIC (Message Integrity Code) (IEEE 802.11i)
961
962 Defined by the IEEE 802.11i TKIP (Temporal Key Integrity Protocol),
963 known as WPA (Wif-Fi Protected Access).
964
965 This algorithm is required for TKIP, but it should not be used for
966 other purposes because of the weakness of the algorithm.
Robert Elliottf1f142a2022-08-20 13:41:44 -0500967
968config CRYPTO_POLYVAL
969 tristate
970 select CRYPTO_GF128MUL
971 select CRYPTO_HASH
972 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500973 POLYVAL hash function for HCTR2
974
975 This is used in HCTR2. It is not a general-purpose
Robert Elliottf1f142a2022-08-20 13:41:44 -0500976 cryptographic hash function.
977
978config CRYPTO_POLY1305
Robert Elliott3f342a22022-08-20 13:41:48 -0500979 tristate "Poly1305"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500980 select CRYPTO_HASH
981 select CRYPTO_LIB_POLY1305_GENERIC
982 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500983 Poly1305 authenticator algorithm (RFC7539)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500984
985 Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
986 It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
987 in IETF protocols. This is the portable C implementation of Poly1305.
988
989config CRYPTO_RMD160
Robert Elliott3f342a22022-08-20 13:41:48 -0500990 tristate "RIPEMD-160"
Robert Elliottf1f142a2022-08-20 13:41:44 -0500991 select CRYPTO_HASH
992 help
Robert Elliott3f342a22022-08-20 13:41:48 -0500993 RIPEMD-160 hash function (ISO/IEC 10118-3)
Robert Elliottf1f142a2022-08-20 13:41:44 -0500994
995 RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
996 to be used as a secure replacement for the 128-bit hash functions
997 MD4, MD5 and its predecessor RIPEMD
998 (not to be confused with RIPEMD-128).
999
Robert Elliott3f342a22022-08-20 13:41:48 -05001000 Its speed is comparable to SHA-1 and there are no known attacks
Robert Elliottf1f142a2022-08-20 13:41:44 -05001001 against RIPEMD-160.
1002
1003 Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
Robert Elliott3f342a22022-08-20 13:41:48 -05001004 See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
1005 for further information.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001006
1007config CRYPTO_SHA1
Robert Elliott3f342a22022-08-20 13:41:48 -05001008 tristate "SHA-1"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001009 select CRYPTO_HASH
1010 select CRYPTO_LIB_SHA1
1011 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001012 SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3)
Robert Elliottf1f142a2022-08-20 13:41:44 -05001013
1014config CRYPTO_SHA256
Robert Elliott3f342a22022-08-20 13:41:48 -05001015 tristate "SHA-224 and SHA-256"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001016 select CRYPTO_HASH
1017 select CRYPTO_LIB_SHA256
1018 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001019 SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC 10118-3)
Robert Elliottf1f142a2022-08-20 13:41:44 -05001020
Robert Elliott3f342a22022-08-20 13:41:48 -05001021 This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
1022 Used by the btrfs filesystem, Ceph, NFS, and SMB.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001023
1024config CRYPTO_SHA512
Robert Elliott3f342a22022-08-20 13:41:48 -05001025 tristate "SHA-384 and SHA-512"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001026 select CRYPTO_HASH
1027 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001028 SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC 10118-3)
Robert Elliottf1f142a2022-08-20 13:41:44 -05001029
1030config CRYPTO_SHA3
Robert Elliott3f342a22022-08-20 13:41:48 -05001031 tristate "SHA-3"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001032 select CRYPTO_HASH
1033 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001034 SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
Robert Elliottf1f142a2022-08-20 13:41:44 -05001035
1036config CRYPTO_SM3
1037 tristate
1038
1039config CRYPTO_SM3_GENERIC
Robert Elliott3f342a22022-08-20 13:41:48 -05001040 tristate "SM3 (ShangMi 3)"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001041 select CRYPTO_HASH
1042 select CRYPTO_SM3
1043 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001044 SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
1045
1046 This is part of the Chinese Commercial Cryptography suite.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001047
1048 References:
1049 http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
1050 https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
1051
1052config CRYPTO_STREEBOG
Robert Elliott3f342a22022-08-20 13:41:48 -05001053 tristate "Streebog"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001054 select CRYPTO_HASH
1055 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001056 Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
1057
1058 This is one of the Russian cryptographic standard algorithms (called
1059 GOST algorithms). This setting enables two hash algorithms with
1060 256 and 512 bits output.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001061
1062 References:
1063 https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
1064 https://tools.ietf.org/html/rfc6986
1065
1066config CRYPTO_VMAC
Robert Elliott3f342a22022-08-20 13:41:48 -05001067 tristate "VMAC"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001068 select CRYPTO_HASH
1069 select CRYPTO_MANAGER
1070 help
1071 VMAC is a message authentication algorithm designed for
1072 very high speed on 64-bit architectures.
1073
Robert Elliott3f342a22022-08-20 13:41:48 -05001074 See https://fastcrypto.org/vmac for further information.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001075
1076config CRYPTO_WP512
Robert Elliott3f342a22022-08-20 13:41:48 -05001077 tristate "Whirlpool"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001078 select CRYPTO_HASH
1079 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001080 Whirlpool hash function (ISO/IEC 10118-3)
1081
1082 512, 384 and 256-bit hashes.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001083
1084 Whirlpool-512 is part of the NESSIE cryptographic primitives.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001085
Robert Elliott3f342a22022-08-20 13:41:48 -05001086 See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
1087 for further information.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001088
1089config CRYPTO_XCBC
Robert Elliott3f342a22022-08-20 13:41:48 -05001090 tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001091 select CRYPTO_HASH
1092 select CRYPTO_MANAGER
1093 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001094 XCBC-MAC (Extended Cipher Block Chaining Message Authentication
1095 Code) (RFC3566)
Robert Elliottf1f142a2022-08-20 13:41:44 -05001096
1097config CRYPTO_XXHASH
Robert Elliott3f342a22022-08-20 13:41:48 -05001098 tristate "xxHash"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001099 select CRYPTO_HASH
1100 select XXHASH
1101 help
Robert Elliott3f342a22022-08-20 13:41:48 -05001102 xxHash non-cryptographic hash algorithm
1103
1104 Extremely fast, working at speeds close to RAM limits.
1105
1106 Used by the btrfs filesystem.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001107
1108endmenu
1109
1110menu "CRCs (cyclic redundancy checks)"
1111
1112config CRYPTO_CRC32C
Robert Elliottec843482022-08-20 13:41:46 -05001113 tristate "CRC32c"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001114 select CRYPTO_HASH
1115 select CRC32
1116 help
Robert Elliottec843482022-08-20 13:41:46 -05001117 CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1118
1119 A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1120 by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
1121 Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1122 on Communications, Vol. 41, No. 6, June 1993, selected for use with
1123 iSCSI.
1124
1125 Used by btrfs, ext4, jbd2, NVMeoF/TCP, and iSCSI.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001126
1127config CRYPTO_CRC32
Robert Elliottec843482022-08-20 13:41:46 -05001128 tristate "CRC32"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001129 select CRYPTO_HASH
1130 select CRC32
1131 help
Robert Elliottec843482022-08-20 13:41:46 -05001132 CRC32 CRC algorithm (IEEE 802.3)
1133
1134 Used by RoCEv2 and f2fs.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001135
1136config CRYPTO_CRCT10DIF
Robert Elliottec843482022-08-20 13:41:46 -05001137 tristate "CRCT10DIF"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001138 select CRYPTO_HASH
1139 help
Robert Elliottec843482022-08-20 13:41:46 -05001140 CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
1141
1142 CRC algorithm used by the SCSI Block Commands standard.
Robert Elliottf1f142a2022-08-20 13:41:44 -05001143
1144config CRYPTO_CRC64_ROCKSOFT
Robert Elliottec843482022-08-20 13:41:46 -05001145 tristate "CRC64 based on Rocksoft Model algorithm"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001146 depends on CRC64
1147 select CRYPTO_HASH
Robert Elliottec843482022-08-20 13:41:46 -05001148 help
1149 CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm
1150
1151 Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY)
1152
1153 See https://zlib.net/crc_v3.txt
Robert Elliottf1f142a2022-08-20 13:41:44 -05001154
1155endmenu
1156
1157menu "Compression"
Sebastian Siewior584fffc2008-04-05 21:04:48 +08001158
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159config CRYPTO_DEFLATE
Robert Elliotta9a98d42022-08-20 13:41:51 -05001160 tristate "Deflate"
Herbert Xucce9e062006-08-21 21:08:13 +10001161 select CRYPTO_ALGAPI
Giovanni Cabidduf6ded092016-10-21 13:19:53 +01001162 select CRYPTO_ACOMP2
Linus Torvalds1da177e2005-04-16 15:20:36 -07001163 select ZLIB_INFLATE
1164 select ZLIB_DEFLATE
1165 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001166 Deflate compression algorithm (RFC1951)
Sebastian Siewior584fffc2008-04-05 21:04:48 +08001167
Robert Elliotta9a98d42022-08-20 13:41:51 -05001168 Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08001170config CRYPTO_LZO
Robert Elliotta9a98d42022-08-20 13:41:51 -05001171 tristate "LZO"
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08001172 select CRYPTO_ALGAPI
Giovanni Cabidduac9d2c42016-10-21 13:19:49 +01001173 select CRYPTO_ACOMP2
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08001174 select LZO_COMPRESS
1175 select LZO_DECOMPRESS
1176 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001177 LZO compression algorithm
1178
1179 See https://www.oberhumer.com/opensource/lzo/ for further information.
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08001180
Seth Jennings35a1fc12012-07-19 09:42:41 -05001181config CRYPTO_842
Robert Elliotta9a98d42022-08-20 13:41:51 -05001182 tristate "842"
Dan Streetman2062c5b2015-05-07 13:49:15 -04001183 select CRYPTO_ALGAPI
Giovanni Cabiddu6a8de3a2016-10-21 13:19:52 +01001184 select CRYPTO_ACOMP2
Dan Streetman2062c5b2015-05-07 13:49:15 -04001185 select 842_COMPRESS
1186 select 842_DECOMPRESS
Seth Jennings35a1fc12012-07-19 09:42:41 -05001187 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001188 842 compression algorithm by IBM
1189
1190 See https://github.com/plauth/lib842 for further information.
Seth Jennings35a1fc12012-07-19 09:42:41 -05001191
Chanho Min0ea85302013-07-08 16:01:51 -07001192config CRYPTO_LZ4
Robert Elliotta9a98d42022-08-20 13:41:51 -05001193 tristate "LZ4"
Chanho Min0ea85302013-07-08 16:01:51 -07001194 select CRYPTO_ALGAPI
Giovanni Cabiddu8cd93302016-10-21 13:19:50 +01001195 select CRYPTO_ACOMP2
Chanho Min0ea85302013-07-08 16:01:51 -07001196 select LZ4_COMPRESS
1197 select LZ4_DECOMPRESS
1198 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001199 LZ4 compression algorithm
1200
1201 See https://github.com/lz4/lz4 for further information.
Chanho Min0ea85302013-07-08 16:01:51 -07001202
1203config CRYPTO_LZ4HC
Robert Elliotta9a98d42022-08-20 13:41:51 -05001204 tristate "LZ4HC"
Chanho Min0ea85302013-07-08 16:01:51 -07001205 select CRYPTO_ALGAPI
Giovanni Cabiddu91d53d92016-10-21 13:19:51 +01001206 select CRYPTO_ACOMP2
Chanho Min0ea85302013-07-08 16:01:51 -07001207 select LZ4HC_COMPRESS
1208 select LZ4_DECOMPRESS
1209 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001210 LZ4 high compression mode algorithm
1211
1212 See https://github.com/lz4/lz4 for further information.
Chanho Min0ea85302013-07-08 16:01:51 -07001213
Nick Terrelld28fc3d2018-03-30 12:14:53 -07001214config CRYPTO_ZSTD
Robert Elliotta9a98d42022-08-20 13:41:51 -05001215 tristate "Zstd"
Nick Terrelld28fc3d2018-03-30 12:14:53 -07001216 select CRYPTO_ALGAPI
1217 select CRYPTO_ACOMP2
1218 select ZSTD_COMPRESS
1219 select ZSTD_DECOMPRESS
1220 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001221 zstd compression algorithm
1222
1223 See https://github.com/facebook/zstd for further information.
Nick Terrelld28fc3d2018-03-30 12:14:53 -07001224
Robert Elliottf1f142a2022-08-20 13:41:44 -05001225endmenu
1226
1227menu "Random number generation"
Neil Horman17f0f4a2008-08-14 22:15:52 +10001228
1229config CRYPTO_ANSI_CPRNG
Robert Elliotta9a98d42022-08-20 13:41:51 -05001230 tristate "ANSI PRNG (Pseudo Random Number Generator)"
Neil Horman17f0f4a2008-08-14 22:15:52 +10001231 select CRYPTO_AES
1232 select CRYPTO_RNG
Neil Horman17f0f4a2008-08-14 22:15:52 +10001233 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001234 Pseudo RNG (random number generator) (ANSI X9.31 Appendix A.2.4)
1235
1236 This uses the AES cipher algorithm.
1237
1238 Note that this option must be enabled if CRYPTO_FIPS is selected
Neil Horman17f0f4a2008-08-14 22:15:52 +10001239
Herbert Xuf2c89a12014-07-04 22:15:08 +08001240menuconfig CRYPTO_DRBG_MENU
Robert Elliotta9a98d42022-08-20 13:41:51 -05001241 tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
Stephan Mueller419090c2014-05-31 17:22:31 +02001242 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001243 DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
1244
1245 In the following submenu, one or more of the DRBG types must be selected.
Stephan Mueller419090c2014-05-31 17:22:31 +02001246
Herbert Xuf2c89a12014-07-04 22:15:08 +08001247if CRYPTO_DRBG_MENU
Stephan Mueller419090c2014-05-31 17:22:31 +02001248
1249config CRYPTO_DRBG_HMAC
Herbert Xu401e4232015-06-03 14:49:31 +08001250 bool
Stephan Mueller419090c2014-05-31 17:22:31 +02001251 default y
Stephan Mueller419090c2014-05-31 17:22:31 +02001252 select CRYPTO_HMAC
Stephan Mueller5261cdf2021-06-30 12:32:52 +02001253 select CRYPTO_SHA512
Stephan Mueller419090c2014-05-31 17:22:31 +02001254
1255config CRYPTO_DRBG_HASH
Robert Elliotta9a98d42022-08-20 13:41:51 -05001256 bool "Hash_DRBG"
Herbert Xu826775b2015-06-11 08:55:10 +08001257 select CRYPTO_SHA256
Stephan Mueller419090c2014-05-31 17:22:31 +02001258 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001259 Hash_DRBG variant as defined in NIST SP800-90A.
1260
1261 This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms.
Stephan Mueller419090c2014-05-31 17:22:31 +02001262
1263config CRYPTO_DRBG_CTR
Robert Elliotta9a98d42022-08-20 13:41:51 -05001264 bool "CTR_DRBG"
Stephan Mueller419090c2014-05-31 17:22:31 +02001265 select CRYPTO_AES
Corentin Labbed6fc1a42020-04-24 13:40:47 +00001266 select CRYPTO_CTR
Stephan Mueller419090c2014-05-31 17:22:31 +02001267 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001268 CTR_DRBG variant as defined in NIST SP800-90A.
1269
1270 This uses the AES cipher algorithm with the counter block mode.
Stephan Mueller419090c2014-05-31 17:22:31 +02001271
Herbert Xuf2c89a12014-07-04 22:15:08 +08001272config CRYPTO_DRBG
1273 tristate
Herbert Xu401e4232015-06-03 14:49:31 +08001274 default CRYPTO_DRBG_MENU
Herbert Xuf2c89a12014-07-04 22:15:08 +08001275 select CRYPTO_RNG
Stephan Muellerbb5530e2015-05-25 15:10:20 +02001276 select CRYPTO_JITTERENTROPY
Herbert Xuf2c89a12014-07-04 22:15:08 +08001277
1278endif # if CRYPTO_DRBG_MENU
Stephan Mueller419090c2014-05-31 17:22:31 +02001279
Stephan Muellerbb5530e2015-05-25 15:10:20 +02001280config CRYPTO_JITTERENTROPY
Robert Elliotta9a98d42022-08-20 13:41:51 -05001281 tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
Arnd Bergmann2f313e02016-01-26 14:47:10 +01001282 select CRYPTO_RNG
Stephan Muellerbb5530e2015-05-25 15:10:20 +02001283 help
Robert Elliotta9a98d42022-08-20 13:41:51 -05001284 CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
1285
1286 A non-physical non-deterministic ("true") RNG (e.g., an entropy source
1287 compliant with NIST SP800-90B) intended to provide a seed to a
1288 deterministic RNG (e.g. per NIST SP800-90C).
1289 This RNG does not perform any cryptographic whitening of the generated
1290
1291 See https://www.chronox.de/jent.html
Stephan Muellerbb5530e2015-05-25 15:10:20 +02001292
Stephan Müller026a7332021-11-19 07:55:58 +01001293config CRYPTO_KDF800108_CTR
1294 tristate
Herbert Xua88592c2022-01-18 16:31:29 +11001295 select CRYPTO_HMAC
Stephan Müller304b4ac2021-12-21 20:31:42 +01001296 select CRYPTO_SHA256
Stephan Müller026a7332021-11-19 07:55:58 +01001297
Robert Elliottf1f142a2022-08-20 13:41:44 -05001298endmenu
Robert Elliott9bc51712022-08-20 13:41:49 -05001299menu "Userspace interface"
Robert Elliottf1f142a2022-08-20 13:41:44 -05001300
Herbert Xu03c8efc2010-10-19 21:12:39 +08001301config CRYPTO_USER_API
1302 tristate
1303
Herbert Xufe869cd2010-10-19 21:23:00 +08001304config CRYPTO_USER_API_HASH
Robert Elliott9bc51712022-08-20 13:41:49 -05001305 tristate "Hash algorithms"
Herbert Xu74517082010-11-29 22:56:03 +08001306 depends on NET
Herbert Xufe869cd2010-10-19 21:23:00 +08001307 select CRYPTO_HASH
1308 select CRYPTO_USER_API
1309 help
Robert Elliott9bc51712022-08-20 13:41:49 -05001310 Enable the userspace interface for hash algorithms.
1311
1312 See Documentation/crypto/userspace-if.rst and
1313 https://www.chronox.de/libkcapi/html/index.html
Herbert Xufe869cd2010-10-19 21:23:00 +08001314
Herbert Xu8ff59092010-10-19 21:31:55 +08001315config CRYPTO_USER_API_SKCIPHER
Robert Elliott9bc51712022-08-20 13:41:49 -05001316 tristate "Symmetric key cipher algorithms"
Herbert Xu74517082010-11-29 22:56:03 +08001317 depends on NET
Eric Biggersb95bba52019-10-25 12:41:13 -07001318 select CRYPTO_SKCIPHER
Herbert Xu8ff59092010-10-19 21:31:55 +08001319 select CRYPTO_USER_API
1320 help
Robert Elliott9bc51712022-08-20 13:41:49 -05001321 Enable the userspace interface for symmetric key cipher algorithms.
1322
1323 See Documentation/crypto/userspace-if.rst and
1324 https://www.chronox.de/libkcapi/html/index.html
Herbert Xu8ff59092010-10-19 21:31:55 +08001325
Stephan Mueller2f3755382014-12-25 23:00:39 +01001326config CRYPTO_USER_API_RNG
Robert Elliott9bc51712022-08-20 13:41:49 -05001327 tristate "RNG (random number generator) algorithms"
Stephan Mueller2f3755382014-12-25 23:00:39 +01001328 depends on NET
1329 select CRYPTO_RNG
1330 select CRYPTO_USER_API
1331 help
Robert Elliott9bc51712022-08-20 13:41:49 -05001332 Enable the userspace interface for RNG (random number generator)
1333 algorithms.
1334
1335 See Documentation/crypto/userspace-if.rst and
1336 https://www.chronox.de/libkcapi/html/index.html
Stephan Mueller2f3755382014-12-25 23:00:39 +01001337
Elena Petrova77ebdab2020-09-18 16:42:16 +01001338config CRYPTO_USER_API_RNG_CAVP
1339 bool "Enable CAVP testing of DRBG"
1340 depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
1341 help
Robert Elliott9bc51712022-08-20 13:41:49 -05001342 Enable extra APIs in the userspace interface for NIST CAVP
1343 (Cryptographic Algorithm Validation Program) testing:
1344 - resetting DRBG entropy
1345 - providing Additional Data
1346
Elena Petrova77ebdab2020-09-18 16:42:16 +01001347 This should only be enabled for CAVP testing. You should say
1348 no unless you know what this is.
1349
Herbert Xub64a2d92015-05-28 11:30:35 +08001350config CRYPTO_USER_API_AEAD
Robert Elliott9bc51712022-08-20 13:41:49 -05001351 tristate "AEAD cipher algorithms"
Herbert Xub64a2d92015-05-28 11:30:35 +08001352 depends on NET
1353 select CRYPTO_AEAD
Eric Biggersb95bba52019-10-25 12:41:13 -07001354 select CRYPTO_SKCIPHER
Stephan Mueller72548b02017-07-30 14:32:58 +02001355 select CRYPTO_NULL
Herbert Xub64a2d92015-05-28 11:30:35 +08001356 select CRYPTO_USER_API
1357 help
Robert Elliott9bc51712022-08-20 13:41:49 -05001358 Enable the userspace interface for AEAD cipher algorithms.
1359
1360 See Documentation/crypto/userspace-if.rst and
1361 https://www.chronox.de/libkcapi/html/index.html
Herbert Xub64a2d92015-05-28 11:30:35 +08001362
Ard Biesheuvel9ace6772020-08-31 18:16:49 +03001363config CRYPTO_USER_API_ENABLE_OBSOLETE
Robert Elliott9bc51712022-08-20 13:41:49 -05001364 bool "Obsolete cryptographic algorithms"
Ard Biesheuvel9ace6772020-08-31 18:16:49 +03001365 depends on CRYPTO_USER_API
1366 default y
1367 help
1368 Allow obsolete cryptographic algorithms to be selected that have
1369 already been phased out from internal use by the kernel, and are
1370 only useful for userspace clients that still rely on them.
1371
Corentin Labbecac58182018-09-19 10:10:54 +00001372config CRYPTO_STATS
Robert Elliott9bc51712022-08-20 13:41:49 -05001373 bool "Crypto usage statistics"
Corentin Labbea6a31382018-11-29 14:42:17 +00001374 depends on CRYPTO_USER
Corentin Labbecac58182018-09-19 10:10:54 +00001375 help
Robert Elliott9bc51712022-08-20 13:41:49 -05001376 Enable the gathering of crypto stats.
1377
1378 This collects data sizes, numbers of requests, and numbers
1379 of errors processed by:
1380 - AEAD ciphers (encrypt, decrypt)
1381 - asymmetric key ciphers (encrypt, decrypt, verify, sign)
1382 - symmetric key ciphers (encrypt, decrypt)
1383 - compression algorithms (compress, decompress)
1384 - hash algorithms (hash)
1385 - key-agreement protocol primitives (setsecret, generate
1386 public key, compute shared secret)
1387 - RNG (generate, seed)
Corentin Labbecac58182018-09-19 10:10:54 +00001388
Robert Elliottf1f142a2022-08-20 13:41:44 -05001389endmenu
1390
Dmitry Kasatkinee089972013-05-06 15:40:01 +03001391config CRYPTO_HASH_INFO
1392 bool
1393
Linus Torvalds27bc50f2022-10-10 17:53:04 -07001394if !KMSAN # avoid false positives from assembly
Robert Elliott4a329fe2022-08-20 13:41:41 -05001395if ARM
1396source "arch/arm/crypto/Kconfig"
1397endif
1398if ARM64
1399source "arch/arm64/crypto/Kconfig"
1400endif
Robert Elliotte45f7102022-08-20 13:41:35 -05001401if MIPS
1402source "arch/mips/crypto/Kconfig"
1403endif
Robert Elliott6a490a42022-08-20 13:41:36 -05001404if PPC
1405source "arch/powerpc/crypto/Kconfig"
1406endif
Robert Elliottc9d24c92022-08-20 13:41:37 -05001407if S390
1408source "arch/s390/crypto/Kconfig"
1409endif
Robert Elliott0e9f9ea62022-08-20 13:41:38 -05001410if SPARC
1411source "arch/sparc/crypto/Kconfig"
1412endif
Robert Elliott28a936e2022-08-20 13:41:39 -05001413if X86
1414source "arch/x86/crypto/Kconfig"
1415endif
Linus Torvalds27bc50f2022-10-10 17:53:04 -07001416endif
Robert Elliotte45f7102022-08-20 13:41:35 -05001417
Linus Torvalds1da177e2005-04-16 15:20:36 -07001418source "drivers/crypto/Kconfig"
Masahiro Yamada8636a1f2018-12-11 20:01:04 +09001419source "crypto/asymmetric_keys/Kconfig"
1420source "certs/Kconfig"
Linus Torvalds1da177e2005-04-16 15:20:36 -07001421
Herbert Xucce9e062006-08-21 21:08:13 +10001422endif # if CRYPTO