xref: /linux/crypto/Kconfig (revision fab183d632628381b466a41479489541ac0e29a0)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
3685784aaSDan Williams# Generic algorithms support
4685784aaSDan Williams#
5685784aaSDan Williams
6685784aaSDan Williams#
79bc89cd8SDan Williams# async_tx api: hardware offloaded memory transfer/transform support
89bc89cd8SDan Williams#
99bc89cd8SDan Williamssource "crypto/async_tx/Kconfig"
109bc89cd8SDan Williams
119bc89cd8SDan Williams#
121da177e4SLinus Torvalds# Cryptographic API Configuration
131da177e4SLinus Torvalds#
142e290f43SJan Engelhardtmenuconfig CRYPTO
15c3715cb9SSebastian Siewior	tristate "Cryptographic API"
167033b937SEric Biggers	select CRYPTO_LIB_UTILS
171da177e4SLinus Torvalds	help
181da177e4SLinus Torvalds	  This option provides the core Cryptographic API.
191da177e4SLinus Torvalds
20cce9e06dSHerbert Xuif CRYPTO
21cce9e06dSHerbert Xu
22f1f142adSRobert Elliottmenu "Crypto core or helper"
23584fffc8SSebastian Siewior
24ccb778e1SNeil Hormanconfig CRYPTO_FIPS
25ccb778e1SNeil Horman	bool "FIPS 200 compliance"
267339b0e0SEric Biggers	depends on CRYPTO_DRBG=y && CRYPTO_SELFTESTS
271f696097SAlec Ari	depends on (MODULE_SIG || !MODULES)
28ccb778e1SNeil Horman	help
29d99324c2SGeert Uytterhoeven	  This option enables the fips boot option which is
30d99324c2SGeert Uytterhoeven	  required if you want the system to operate in a FIPS 200
31ccb778e1SNeil Horman	  certification.  You should say no unless you know what
32e84c5480SChuck Ebbert	  this is.
33ccb778e1SNeil Horman
345a44749fSVladis Dronovconfig CRYPTO_FIPS_NAME
355a44749fSVladis Dronov	string "FIPS Module Name"
365a44749fSVladis Dronov	default "Linux Kernel Cryptographic API"
375a44749fSVladis Dronov	depends on CRYPTO_FIPS
385a44749fSVladis Dronov	help
395a44749fSVladis Dronov	  This option sets the FIPS Module name reported by the Crypto API via
405a44749fSVladis Dronov	  the /proc/sys/crypto/fips_name file.
415a44749fSVladis Dronov
425a44749fSVladis Dronovconfig CRYPTO_FIPS_CUSTOM_VERSION
435a44749fSVladis Dronov	bool "Use Custom FIPS Module Version"
445a44749fSVladis Dronov	depends on CRYPTO_FIPS
455a44749fSVladis Dronov	default n
465a44749fSVladis Dronov
475a44749fSVladis Dronovconfig CRYPTO_FIPS_VERSION
485a44749fSVladis Dronov	string "FIPS Module Version"
495a44749fSVladis Dronov	default "(none)"
505a44749fSVladis Dronov	depends on CRYPTO_FIPS_CUSTOM_VERSION
515a44749fSVladis Dronov	help
525a44749fSVladis Dronov	  This option provides the ability to override the FIPS Module Version.
535a44749fSVladis Dronov	  By default the KERNELRELEASE value is used.
545a44749fSVladis Dronov
55cce9e06dSHerbert Xuconfig CRYPTO_ALGAPI
56cce9e06dSHerbert Xu	tristate
576a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
58cce9e06dSHerbert Xu	help
59cce9e06dSHerbert Xu	  This option provides the API for cryptographic algorithms.
60cce9e06dSHerbert Xu
616a0fcbb4SHerbert Xuconfig CRYPTO_ALGAPI2
626a0fcbb4SHerbert Xu	tristate
636a0fcbb4SHerbert Xu
641ae97820SHerbert Xuconfig CRYPTO_AEAD
651ae97820SHerbert Xu	tristate
666a0fcbb4SHerbert Xu	select CRYPTO_AEAD2
671ae97820SHerbert Xu	select CRYPTO_ALGAPI
681ae97820SHerbert Xu
696a0fcbb4SHerbert Xuconfig CRYPTO_AEAD2
706a0fcbb4SHerbert Xu	tristate
716a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
726a0fcbb4SHerbert Xu
736cb8815fSHerbert Xuconfig CRYPTO_SIG
746cb8815fSHerbert Xu	tristate
756cb8815fSHerbert Xu	select CRYPTO_SIG2
766cb8815fSHerbert Xu	select CRYPTO_ALGAPI
776cb8815fSHerbert Xu
786cb8815fSHerbert Xuconfig CRYPTO_SIG2
796cb8815fSHerbert Xu	tristate
806cb8815fSHerbert Xu	select CRYPTO_ALGAPI2
816cb8815fSHerbert Xu
82b95bba5dSEric Biggersconfig CRYPTO_SKCIPHER
835cde0af2SHerbert Xu	tristate
84b95bba5dSEric Biggers	select CRYPTO_SKCIPHER2
855cde0af2SHerbert Xu	select CRYPTO_ALGAPI
8684534684SHerbert Xu	select CRYPTO_ECB
876a0fcbb4SHerbert Xu
88b95bba5dSEric Biggersconfig CRYPTO_SKCIPHER2
896a0fcbb4SHerbert Xu	tristate
906a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
915cde0af2SHerbert Xu
92055bcee3SHerbert Xuconfig CRYPTO_HASH
93055bcee3SHerbert Xu	tristate
946a0fcbb4SHerbert Xu	select CRYPTO_HASH2
95055bcee3SHerbert Xu	select CRYPTO_ALGAPI
96055bcee3SHerbert Xu
976a0fcbb4SHerbert Xuconfig CRYPTO_HASH2
986a0fcbb4SHerbert Xu	tristate
996a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
1006a0fcbb4SHerbert Xu
10117f0f4a4SNeil Hormanconfig CRYPTO_RNG
10217f0f4a4SNeil Horman	tristate
1036a0fcbb4SHerbert Xu	select CRYPTO_RNG2
10417f0f4a4SNeil Horman	select CRYPTO_ALGAPI
10517f0f4a4SNeil Horman
1066a0fcbb4SHerbert Xuconfig CRYPTO_RNG2
1076a0fcbb4SHerbert Xu	tristate
1086a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
1096a0fcbb4SHerbert Xu
1103c339ab8STadeusz Strukconfig CRYPTO_AKCIPHER2
1113c339ab8STadeusz Struk	tristate
1123c339ab8STadeusz Struk	select CRYPTO_ALGAPI2
1133c339ab8STadeusz Struk
1143c339ab8STadeusz Strukconfig CRYPTO_AKCIPHER
1153c339ab8STadeusz Struk	tristate
1163c339ab8STadeusz Struk	select CRYPTO_AKCIPHER2
1173c339ab8STadeusz Struk	select CRYPTO_ALGAPI
1183c339ab8STadeusz Struk
1194e5f2c40SSalvatore Benedettoconfig CRYPTO_KPP2
1204e5f2c40SSalvatore Benedetto	tristate
1214e5f2c40SSalvatore Benedetto	select CRYPTO_ALGAPI2
1224e5f2c40SSalvatore Benedetto
1234e5f2c40SSalvatore Benedettoconfig CRYPTO_KPP
1244e5f2c40SSalvatore Benedetto	tristate
1254e5f2c40SSalvatore Benedetto	select CRYPTO_ALGAPI
1264e5f2c40SSalvatore Benedetto	select CRYPTO_KPP2
1274e5f2c40SSalvatore Benedetto
1282ebda74fSGiovanni Cabidduconfig CRYPTO_ACOMP2
1292ebda74fSGiovanni Cabiddu	tristate
1302ebda74fSGiovanni Cabiddu	select CRYPTO_ALGAPI2
1318cd579d2SBart Van Assche	select SGL_ALLOC
1322ebda74fSGiovanni Cabiddu
1332ebda74fSGiovanni Cabidduconfig CRYPTO_ACOMP
1342ebda74fSGiovanni Cabiddu	tristate
1352ebda74fSGiovanni Cabiddu	select CRYPTO_ALGAPI
1362ebda74fSGiovanni Cabiddu	select CRYPTO_ACOMP2
1372ebda74fSGiovanni Cabiddu
1382b8c19dbSHerbert Xuconfig CRYPTO_MANAGER
1396f9d0f53SEric Biggers	tristate
14057999ed1SEric Biggers	default CRYPTO_ALGAPI if CRYPTO_SELFTESTS
1416a0fcbb4SHerbert Xu	select CRYPTO_MANAGER2
1422b8c19dbSHerbert Xu	help
14357999ed1SEric Biggers	  This provides the support for instantiating templates such as
14457999ed1SEric Biggers	  cbc(aes), and the support for the crypto self-tests.
1452b8c19dbSHerbert Xu
1466a0fcbb4SHerbert Xuconfig CRYPTO_MANAGER2
1476a0fcbb4SHerbert Xu	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
148cdadc143SEric Biggers	select CRYPTO_ACOMP2 if CRYPTO_SELFTESTS
149cdadc143SEric Biggers	select CRYPTO_AEAD2 if CRYPTO_SELFTESTS
150cdadc143SEric Biggers	select CRYPTO_AKCIPHER2 if CRYPTO_SELFTESTS
151cdadc143SEric Biggers	select CRYPTO_SIG2 if CRYPTO_SELFTESTS
152cdadc143SEric Biggers	select CRYPTO_HASH2 if CRYPTO_SELFTESTS
153cdadc143SEric Biggers	select CRYPTO_KPP2 if CRYPTO_SELFTESTS
154cdadc143SEric Biggers	select CRYPTO_RNG2 if CRYPTO_SELFTESTS
155cdadc143SEric Biggers	select CRYPTO_SKCIPHER2 if CRYPTO_SELFTESTS
1566a0fcbb4SHerbert Xu
157a38f7907SSteffen Klassertconfig CRYPTO_USER
158a38f7907SSteffen Klassert	tristate "Userspace cryptographic algorithm configuration"
1595db017aaSHerbert Xu	depends on NET
160a38f7907SSteffen Klassert	select CRYPTO_MANAGER
161cdadc143SEric Biggers	select CRYPTO_RNG
162a38f7907SSteffen Klassert	help
163d19978f5SValdis.Kletnieks@vt.edu	  Userspace configuration for cryptographic instantiations such as
164a38f7907SSteffen Klassert	  cbc(aes).
165a38f7907SSteffen Klassert
16640b99697SEric Biggersconfig CRYPTO_SELFTESTS
16740b99697SEric Biggers	bool "Enable cryptographic self-tests"
168ac90aad0SEric Biggers	depends on EXPERT
1690b767f96SAlexander Shishkin	help
17040b99697SEric Biggers	  Enable the cryptographic self-tests.
17140b99697SEric Biggers
17240b99697SEric Biggers	  The cryptographic self-tests run at boot time, or at algorithm
17340b99697SEric Biggers	  registration time if algorithms are dynamically loaded later.
17440b99697SEric Biggers
175ac90aad0SEric Biggers	  There are two main use cases for these tests:
176ac90aad0SEric Biggers
177ac90aad0SEric Biggers	  - Development and pre-release testing.  In this case, also enable
178ac90aad0SEric Biggers	    CRYPTO_SELFTESTS_FULL to get the full set of tests.  All crypto code
179ac90aad0SEric Biggers	    in the kernel is expected to pass the full set of tests.
180ac90aad0SEric Biggers
181ac90aad0SEric Biggers	  - Production kernels, to help prevent buggy drivers from being used
182ac90aad0SEric Biggers	    and/or meet FIPS 140-3 pre-operational testing requirements.  In
183ac90aad0SEric Biggers	    this case, enable CRYPTO_SELFTESTS but not CRYPTO_SELFTESTS_FULL.
184ac90aad0SEric Biggers
185ac90aad0SEric Biggersconfig CRYPTO_SELFTESTS_FULL
186ac90aad0SEric Biggers	bool "Enable the full set of cryptographic self-tests"
187ac90aad0SEric Biggers	depends on CRYPTO_SELFTESTS
188ac90aad0SEric Biggers	help
189ac90aad0SEric Biggers	  Enable the full set of cryptographic self-tests for each algorithm.
190ac90aad0SEric Biggers
191ac90aad0SEric Biggers	  The full set of tests should be enabled for development and
192ac90aad0SEric Biggers	  pre-release testing, but not in production kernels.
193ac90aad0SEric Biggers
194ac90aad0SEric Biggers	  All crypto code in the kernel is expected to pass the full tests.
1950b767f96SAlexander Shishkin
196584fffc8SSebastian Siewiorconfig CRYPTO_NULL
197584fffc8SSebastian Siewior	tristate "Null algorithms"
198bde39305SEric Biggers	select CRYPTO_ALGAPI
199bde39305SEric Biggers	select CRYPTO_SKCIPHER
200bde39305SEric Biggers	select CRYPTO_HASH
201584fffc8SSebastian Siewior	help
202584fffc8SSebastian Siewior	  These are 'Null' algorithms, used by IPsec, which do nothing.
203584fffc8SSebastian Siewior
2045068c7a8SSteffen Klassertconfig CRYPTO_PCRYPT
2053b4afaf2SKees Cook	tristate "Parallel crypto engine"
2063b4afaf2SKees Cook	depends on SMP
2075068c7a8SSteffen Klassert	select PADATA
2085068c7a8SSteffen Klassert	select CRYPTO_MANAGER
2095068c7a8SSteffen Klassert	select CRYPTO_AEAD
2105068c7a8SSteffen Klassert	help
2115068c7a8SSteffen Klassert	  This converts an arbitrary crypto algorithm into a parallel
2125068c7a8SSteffen Klassert	  algorithm that executes in kernel threads.
2135068c7a8SSteffen Klassert
214584fffc8SSebastian Siewiorconfig CRYPTO_CRYPTD
215584fffc8SSebastian Siewior	tristate "Software async crypto daemon"
216cdadc143SEric Biggers	select CRYPTO_AEAD
217b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
218b8a28251SLoc Ho	select CRYPTO_HASH
219584fffc8SSebastian Siewior	select CRYPTO_MANAGER
220584fffc8SSebastian Siewior	help
221584fffc8SSebastian Siewior	  This is a generic software asynchronous crypto daemon that
222584fffc8SSebastian Siewior	  converts an arbitrary synchronous software crypto algorithm
223584fffc8SSebastian Siewior	  into an asynchronous algorithm that executes in a kernel thread.
224584fffc8SSebastian Siewior
225584fffc8SSebastian Siewiorconfig CRYPTO_AUTHENC
226584fffc8SSebastian Siewior	tristate "Authenc support"
227584fffc8SSebastian Siewior	select CRYPTO_AEAD
228b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
229584fffc8SSebastian Siewior	select CRYPTO_MANAGER
230584fffc8SSebastian Siewior	select CRYPTO_HASH
231584fffc8SSebastian Siewior	help
232584fffc8SSebastian Siewior	  Authenc: Combined mode wrapper for IPsec.
233cf514b2aSRobert Elliott
234cf514b2aSRobert Elliott	  This is required for IPSec ESP (XFRM_ESP).
235584fffc8SSebastian Siewior
236d1775a17SDavid Howellsconfig CRYPTO_KRB5ENC
237d1775a17SDavid Howells	tristate "Kerberos 5 combined hash+cipher support"
238d1775a17SDavid Howells	select CRYPTO_AEAD
239d1775a17SDavid Howells	select CRYPTO_SKCIPHER
240d1775a17SDavid Howells	select CRYPTO_MANAGER
241d1775a17SDavid Howells	select CRYPTO_HASH
242d1775a17SDavid Howells	help
243d1775a17SDavid Howells	  Combined hash and cipher support for Kerberos 5 RFC3961 simplified
244d1775a17SDavid Howells	  profile.  This is required for Kerberos 5-style encryption, used by
245d1775a17SDavid Howells	  sunrpc/NFS and rxrpc/AFS.
246d1775a17SDavid Howells
2473357b6c9SEric Biggersconfig CRYPTO_BENCHMARK
2483357b6c9SEric Biggers	tristate "Crypto benchmarking module"
24900ea27f1SArd Biesheuvel	depends on m || EXPERT
250cdadc143SEric Biggers	select CRYPTO_AEAD
251cdadc143SEric Biggers	select CRYPTO_HASH
252da7f033dSHerbert Xu	select CRYPTO_MANAGER
253cdadc143SEric Biggers	select CRYPTO_SKCIPHER
254584fffc8SSebastian Siewior	help
2553357b6c9SEric Biggers	  Quick & dirty crypto benchmarking module.
2563357b6c9SEric Biggers
2573357b6c9SEric Biggers	  This is mainly intended for use by people developing cryptographic
2583357b6c9SEric Biggers	  algorithms in the kernel.  It should not be enabled in production
2593357b6c9SEric Biggers	  kernels.
260584fffc8SSebastian Siewior
261266d0516SHerbert Xuconfig CRYPTO_SIMD
262266d0516SHerbert Xu	tristate
263cdadc143SEric Biggers	select CRYPTO_AEAD
264266d0516SHerbert Xu	select CRYPTO_CRYPTD
265266d0516SHerbert Xu
266735d37b5SBaolin Wangconfig CRYPTO_ENGINE
267735d37b5SBaolin Wang	tristate
268cdadc143SEric Biggers	select CRYPTO_AEAD
269cdadc143SEric Biggers	select CRYPTO_AKCIPHER
270cdadc143SEric Biggers	select CRYPTO_HASH
271cdadc143SEric Biggers	select CRYPTO_KPP
272cdadc143SEric Biggers	select CRYPTO_SKCIPHER
273735d37b5SBaolin Wang
274f1f142adSRobert Elliottendmenu
275f1f142adSRobert Elliott
276f1f142adSRobert Elliottmenu "Public-key cryptography"
2773d6228a5SVitaly Chikunov
2783d6228a5SVitaly Chikunovconfig CRYPTO_RSA
27905b37465SRobert Elliott	tristate "RSA (Rivest-Shamir-Adleman)"
2803d6228a5SVitaly Chikunov	select CRYPTO_AKCIPHER
2813d6228a5SVitaly Chikunov	select CRYPTO_MANAGER
2821e562deaSLukas Wunner	select CRYPTO_SIG
2833d6228a5SVitaly Chikunov	select MPILIB
2843d6228a5SVitaly Chikunov	select ASN1
2853d6228a5SVitaly Chikunov	help
28605b37465SRobert Elliott	  RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
2873d6228a5SVitaly Chikunov
2883d6228a5SVitaly Chikunovconfig CRYPTO_DH
28905b37465SRobert Elliott	tristate "DH (Diffie-Hellman)"
2903d6228a5SVitaly Chikunov	select CRYPTO_KPP
2913d6228a5SVitaly Chikunov	select MPILIB
2923d6228a5SVitaly Chikunov	help
29305b37465SRobert Elliott	  DH (Diffie-Hellman) key exchange algorithm
2943d6228a5SVitaly Chikunov
2957dce5981SNicolai Stangeconfig CRYPTO_DH_RFC7919_GROUPS
29605b37465SRobert Elliott	bool "RFC 7919 FFDHE groups"
2977dce5981SNicolai Stange	depends on CRYPTO_DH
2987dce5981SNicolai Stange	help
29905b37465SRobert Elliott	  FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
30005b37465SRobert Elliott	  defined in RFC7919.
30105b37465SRobert Elliott
30205b37465SRobert Elliott	  Support these finite-field groups in DH key exchanges:
30305b37465SRobert Elliott	  - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
30405b37465SRobert Elliott
30505b37465SRobert Elliott	  If unsure, say N.
3067dce5981SNicolai Stange
3074a2289daSVitaly Chikunovconfig CRYPTO_ECC
3084a2289daSVitaly Chikunov	tristate
3094a2289daSVitaly Chikunov
3103d6228a5SVitaly Chikunovconfig CRYPTO_ECDH
31105b37465SRobert Elliott	tristate "ECDH (Elliptic Curve Diffie-Hellman)"
3124a2289daSVitaly Chikunov	select CRYPTO_ECC
3133d6228a5SVitaly Chikunov	select CRYPTO_KPP
3143d6228a5SVitaly Chikunov	help
31505b37465SRobert Elliott	  ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
31605b37465SRobert Elliott	  using curves P-192, P-256, and P-384 (FIPS 186)
3173d6228a5SVitaly Chikunov
3184e660291SStefan Bergerconfig CRYPTO_ECDSA
31905b37465SRobert Elliott	tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
3204e660291SStefan Berger	select CRYPTO_ECC
321ef132350SLukas Wunner	select CRYPTO_SIG
3224e660291SStefan Berger	select ASN1
3234e660291SStefan Berger	help
32405b37465SRobert Elliott	  ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
32505b37465SRobert Elliott	  ISO/IEC 14888-3)
32691790c7aSLukas Wunner	  using curves P-192, P-256, P-384 and P-521
32705b37465SRobert Elliott
32805b37465SRobert Elliott	  Only signature verification is implemented.
3294e660291SStefan Berger
3300d7a7864SVitaly Chikunovconfig CRYPTO_ECRDSA
33105b37465SRobert Elliott	tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
3320d7a7864SVitaly Chikunov	select CRYPTO_ECC
333ae117924SLukas Wunner	select CRYPTO_SIG
3340d7a7864SVitaly Chikunov	select CRYPTO_STREEBOG
3351036633eSVitaly Chikunov	select OID_REGISTRY
3361036633eSVitaly Chikunov	select ASN1
3370d7a7864SVitaly Chikunov	help
3380d7a7864SVitaly Chikunov	  Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
33905b37465SRobert Elliott	  RFC 7091, ISO/IEC 14888-3)
34005b37465SRobert Elliott
34105b37465SRobert Elliott	  One of the Russian cryptographic standard algorithms (called GOST
34205b37465SRobert Elliott	  algorithms). Only signature verification is implemented.
3430d7a7864SVitaly Chikunov
344d3b6dd90SDavid Howellsconfig CRYPTO_MLDSA
345d3b6dd90SDavid Howells	tristate "ML-DSA (Module-Lattice-Based Digital Signature Algorithm)"
346d3b6dd90SDavid Howells	select CRYPTO_SIG
347d3b6dd90SDavid Howells	select CRYPTO_LIB_MLDSA
348d3b6dd90SDavid Howells	help
349d3b6dd90SDavid Howells	  ML-DSA (Module-Lattice-Based Digital Signature Algorithm) (FIPS-204).
350d3b6dd90SDavid Howells
351d3b6dd90SDavid Howells	  Only signature verification is implemented.
352d3b6dd90SDavid Howells
353f1f142adSRobert Elliottendmenu
354584fffc8SSebastian Siewior
355f1f142adSRobert Elliottmenu "Block ciphers"
3561da177e4SLinus Torvalds
3571da177e4SLinus Torvaldsconfig CRYPTO_AES
358cf514b2aSRobert Elliott	tristate "AES (Advanced Encryption Standard)"
359cce9e06dSHerbert Xu	select CRYPTO_ALGAPI
3605bb12d78SArd Biesheuvel	select CRYPTO_LIB_AES
361*e073f123SEric Biggers	select CRYPTO_LIB_AES_CBC if CRYPTO_CBC != n || CRYPTO_CTS != n
362*e073f123SEric Biggers	select CRYPTO_LIB_AES_CBC_MACS if CRYPTO_CMAC != n || CRYPTO_XCBC != n || CRYPTO_CCM != n
3631da177e4SLinus Torvalds	select CRYPTO_LIB_AES_CCM if CRYPTO_CCM != n
364cf514b2aSRobert Elliott	select CRYPTO_LIB_AES_CTR if CRYPTO_CTR != n || CRYPTO_XCTR != n
3651da177e4SLinus Torvalds	select CRYPTO_LIB_AES_ECB if CRYPTO_ECB != n
3661da177e4SLinus Torvalds	select CRYPTO_LIB_AES_GCM if CRYPTO_GCM != n
3671da177e4SLinus Torvalds	select CRYPTO_LIB_AES_XTS if CRYPTO_XTS != n
3681da177e4SLinus Torvalds	select CRYPTO_AEAD if CRYPTO_GCM != n || CRYPTO_CCM != n
3691da177e4SLinus Torvalds	select CRYPTO_HASH if CRYPTO_CMAC != n || CRYPTO_XCBC != n || CRYPTO_CCM != n
3701da177e4SLinus Torvalds	# CRYPTO_SKCIPHER should be selected only if a mode that needs it is
3711da177e4SLinus Torvalds	# enabled, but that doesn't work due to a recursive dependency caused by
3721da177e4SLinus Torvalds	# CRYPTO_SKCIPHER selecting CRYPTO_ECB.  So just always select it.
3731da177e4SLinus Torvalds	select CRYPTO_SKCIPHER
3741da177e4SLinus Torvalds	help
3751da177e4SLinus Torvalds	  AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
3761da177e4SLinus Torvalds
3771da177e4SLinus Torvalds	  Rijndael appears to be consistently a very good performer in
378cf514b2aSRobert Elliott	  both hardware and software across a wide range of computing
3791674aea5SArd Biesheuvel	  environments regardless of its use in feedback or non-feedback
380cce9e06dSHerbert Xu	  modes. Its key setup time is excellent, and its key agility is
3811da177e4SLinus Torvalds	  good. Rijndael's very low memory requirements make it very well
382cf514b2aSRobert Elliott	  suited for restricted-space environments, in which it also
3831da177e4SLinus Torvalds	  demonstrates excellent performance. Rijndael's operations are
3841da177e4SLinus Torvalds	  among the easiest to defend against power and timing attacks.
3851da177e4SLinus Torvalds
3861da177e4SLinus Torvalds	  The AES specifies three key sizes: 128, 192 and 256 bits
3871da177e4SLinus Torvalds
388cf514b2aSRobert Elliottconfig CRYPTO_ANUBIS
389cf514b2aSRobert Elliott	tristate "Anubis"
3901da177e4SLinus Torvalds	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
391f1f142adSRobert Elliott	select CRYPTO_ALGAPI
392cf514b2aSRobert Elliott	help
393f1f142adSRobert Elliott	  Anubis cipher algorithm
394e2ee95b8SHye-Shik Chang
395cf514b2aSRobert Elliott	  Anubis is a variable key length cipher which can use keys from
396e2ee95b8SHye-Shik Chang	  128 bits to 320 bits in length.  It was evaluated as a entrant
397f1f142adSRobert Elliott	  in the NESSIE competition.
398f1f142adSRobert Elliott
399f1f142adSRobert Elliott	  See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html
400f1f142adSRobert Elliott	  for further information.
401f1f142adSRobert Elliott
402f1f142adSRobert Elliottconfig CRYPTO_ARIA
403cf514b2aSRobert Elliott	tristate "ARIA"
404cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
405584fffc8SSebastian Siewior	help
406584fffc8SSebastian Siewior	  ARIA cipher algorithm (RFC5794)
407cf514b2aSRobert Elliott
408584fffc8SSebastian Siewior	  ARIA is a standard encryption algorithm of the Republic of Korea.
40952ba867cSJussi Kivilinna	  The ARIA specifies three key sizes and rounds.
410584fffc8SSebastian Siewior	  128-bit: 12 rounds.
411cf514b2aSRobert Elliott	  192-bit: 14 rounds.
412584fffc8SSebastian Siewior	  256-bit: 16 rounds.
413584fffc8SSebastian Siewior
414584fffc8SSebastian Siewior	  See:
415584fffc8SSebastian Siewior	  https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do
416e2ee95b8SHye-Shik Chang
417cf514b2aSRobert Elliottconfig CRYPTO_BLOWFISH
418584fffc8SSebastian Siewior	tristate "Blowfish"
41952ba867cSJussi Kivilinna	select CRYPTO_ALGAPI
42052ba867cSJussi Kivilinna	select CRYPTO_BLOWFISH_COMMON
42152ba867cSJussi Kivilinna	help
42252ba867cSJussi Kivilinna	  Blowfish cipher algorithm, by Bruce Schneier
42352ba867cSJussi Kivilinna
42452ba867cSJussi Kivilinna	  This is a variable key length cipher which can use keys from 32
425584fffc8SSebastian Siewior	  bits to 448 bits in length.  It's fast, simple and specifically
426cf514b2aSRobert Elliott	  designed for use on "large microprocessors".
427584fffc8SSebastian Siewior
428584fffc8SSebastian Siewior	  See https://www.schneier.com/blowfish.html for further information.
429cf514b2aSRobert Elliott
430584fffc8SSebastian Siewiorconfig CRYPTO_BLOWFISH_COMMON
431584fffc8SSebastian Siewior	tristate
432584fffc8SSebastian Siewior	help
433584fffc8SSebastian Siewior	  Common parts of the Blowfish cipher algorithm shared by the
434584fffc8SSebastian Siewior	  generic c and the assembler implementations.
435584fffc8SSebastian Siewior
436cf514b2aSRobert Elliottconfig CRYPTO_CAMELLIA
437584fffc8SSebastian Siewior	tristate "Camellia"
438044ab525SJussi Kivilinna	select CRYPTO_ALGAPI
439044ab525SJussi Kivilinna	help
440044ab525SJussi Kivilinna	  Camellia cipher algorithms (ISO/IEC 18033-3)
441044ab525SJussi Kivilinna
442044ab525SJussi Kivilinna	  Camellia is a symmetric key block cipher developed jointly
443044ab525SJussi Kivilinna	  at NTT and Mitsubishi Electric Corporation.
444584fffc8SSebastian Siewior
445cf514b2aSRobert Elliott	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
446584fffc8SSebastian Siewior
447044ab525SJussi Kivilinna	  See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information.
448584fffc8SSebastian Siewior
449cf514b2aSRobert Elliottconfig CRYPTO_CAST_COMMON
450584fffc8SSebastian Siewior	tristate
451584fffc8SSebastian Siewior	help
452cf514b2aSRobert Elliott	  Common parts of the CAST cipher algorithms shared by the
453584fffc8SSebastian Siewior	  generic c and the assembler implementations.
454044ab525SJussi Kivilinna
455584fffc8SSebastian Siewiorconfig CRYPTO_CAST5
456cf514b2aSRobert Elliott	tristate "CAST5 (CAST-128)"
457584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
458584fffc8SSebastian Siewior	select CRYPTO_CAST_COMMON
459cf514b2aSRobert Elliott	help
460584fffc8SSebastian Siewior	  CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3)
46104007b0eSArd Biesheuvel
462584fffc8SSebastian Siewiorconfig CRYPTO_CAST6
463cf514b2aSRobert Elliott	tristate "CAST6 (CAST-256)"
464cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
465cf514b2aSRobert Elliott	select CRYPTO_CAST_COMMON
466584fffc8SSebastian Siewior	help
467584fffc8SSebastian Siewior	  CAST6 (CAST-256) encryption algorithm (RFC2612)
468cf514b2aSRobert Elliott
4691674aea5SArd Biesheuvelconfig CRYPTO_DES
470584fffc8SSebastian Siewior	tristate "DES and Triple DES EDE"
471584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
472cf514b2aSRobert Elliott	select CRYPTO_LIB_DES
473584fffc8SSebastian Siewior	help
474584fffc8SSebastian Siewior	  DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and
475584fffc8SSebastian Siewior	  Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3)
476584fffc8SSebastian Siewior	  cipher algorithms
477584fffc8SSebastian Siewior
478cf514b2aSRobert Elliottconfig CRYPTO_KHAZAD
479cf514b2aSRobert Elliott	tristate "Khazad"
480e2ee95b8SHye-Shik Chang	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
481584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
482cf514b2aSRobert Elliott	help
4831674aea5SArd Biesheuvel	  Khazad cipher algorithm
484584fffc8SSebastian Siewior
485584fffc8SSebastian Siewior	  Khazad was a finalist in the initial NESSIE competition.  It is
486cf514b2aSRobert Elliott	  an algorithm optimized for 64-bit processors with good performance
487584fffc8SSebastian Siewior	  on 32-bit processors.  Khazad uses an 128 bit key size.
488584fffc8SSebastian Siewior
489584fffc8SSebastian Siewior	  See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
490584fffc8SSebastian Siewior	  for further information.
491584fffc8SSebastian Siewior
492584fffc8SSebastian Siewiorconfig CRYPTO_SEED
493cf514b2aSRobert Elliott	tristate "SEED"
494cf514b2aSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
495584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
496584fffc8SSebastian Siewior	help
497cf514b2aSRobert Elliott	  SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
498584fffc8SSebastian Siewior
499584fffc8SSebastian Siewior	  SEED is a 128-bit symmetric key block cipher that has been
500cf514b2aSRobert Elliott	  developed by KISA (Korea Information Security Agency) as a
501584fffc8SSebastian Siewior	  national standard encryption algorithm of the Republic of Korea.
502584fffc8SSebastian Siewior	  It is a 16 round block cipher with the key size of 128 bit.
503784506a1SArd Biesheuvel
504584fffc8SSebastian Siewior	  See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
505cf514b2aSRobert Elliott	  for further information.
506584fffc8SSebastian Siewior
507747c8ce4SGilad Ben-Yossefconfig CRYPTO_SERPENT
508d2825fa9SJason A. Donenfeld	tristate "Serpent"
509d2825fa9SJason A. Donenfeld	select CRYPTO_ALGAPI
510d2825fa9SJason A. Donenfeld	help
511cf514b2aSRobert Elliott	  Serpent cipher algorithm, by Anderson, Biham & Knudsen
512747c8ce4SGilad Ben-Yossef
513d2825fa9SJason A. Donenfeld	  Keys are allowed to be from 0 to 256 bits in length, in steps
514747c8ce4SGilad Ben-Yossef	  of 8 bits.
515cf514b2aSRobert Elliott
516cf514b2aSRobert Elliott	  See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
517747c8ce4SGilad Ben-Yossef
518747c8ce4SGilad Ben-Yossefconfig CRYPTO_SM4
519747c8ce4SGilad Ben-Yossef	tristate
520747c8ce4SGilad Ben-Yossef
521747c8ce4SGilad Ben-Yossefconfig CRYPTO_SM4_GENERIC
522747c8ce4SGilad Ben-Yossef	tristate "SM4 (ShangMi 4)"
523747c8ce4SGilad Ben-Yossef	select CRYPTO_ALGAPI
524747c8ce4SGilad Ben-Yossef	select CRYPTO_SM4
525747c8ce4SGilad Ben-Yossef	help
526747c8ce4SGilad Ben-Yossef	  SM4 cipher algorithms (OSCCA GB/T 32907-2016,
527747c8ce4SGilad Ben-Yossef	  ISO/IEC 18033-3:2010/Amd 1:2021)
528747c8ce4SGilad Ben-Yossef
529747c8ce4SGilad Ben-Yossef	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
530747c8ce4SGilad Ben-Yossef	  Organization of State Commercial Administration of China (OSCCA)
531747c8ce4SGilad Ben-Yossef	  as an authorized cryptographic algorithms for the use within China.
532747c8ce4SGilad Ben-Yossef
533cf514b2aSRobert Elliott	  SMS4 was originally created for use in protecting wireless
534747c8ce4SGilad Ben-Yossef	  networks, and is mandated in the Chinese National Standard for
535747c8ce4SGilad Ben-Yossef	  Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
536747c8ce4SGilad Ben-Yossef	  (GB.15629.11-2003).
537584fffc8SSebastian Siewior
538cf514b2aSRobert Elliott	  The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
5391674aea5SArd Biesheuvel	  standardized through TC 260 of the Standardization Administration
540584fffc8SSebastian Siewior	  of the People's Republic of China (SAC).
541584fffc8SSebastian Siewior
542cf514b2aSRobert Elliott	  The input, output, and key of SMS4 are each 128 bits.
543584fffc8SSebastian Siewior
544584fffc8SSebastian Siewior	  See https://eprint.iacr.org/2008/329.pdf for further information.
545584fffc8SSebastian Siewior
546584fffc8SSebastian Siewior	  If unsure, say N.
547584fffc8SSebastian Siewior
548584fffc8SSebastian Siewiorconfig CRYPTO_TEA
549584fffc8SSebastian Siewior	tristate "TEA, XTEA and XETA"
550584fffc8SSebastian Siewior	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
551584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
552584fffc8SSebastian Siewior	help
553584fffc8SSebastian Siewior	  TEA (Tiny Encryption Algorithm) cipher algorithms
554584fffc8SSebastian Siewior
555584fffc8SSebastian Siewior	  Tiny Encryption Algorithm is a simple cipher that uses
556cf514b2aSRobert Elliott	  many rounds for security.  It is very fast and uses
557584fffc8SSebastian Siewior	  little memory.
558584fffc8SSebastian Siewior
559584fffc8SSebastian Siewior	  Xtendend Tiny Encryption Algorithm is a modification to
560cf514b2aSRobert Elliott	  the TEA algorithm to address a potential key weakness
561584fffc8SSebastian Siewior	  in the TEA algorithm.
562584fffc8SSebastian Siewior
563584fffc8SSebastian Siewior	  Xtendend Encryption Tiny Algorithm is a mis-implementation
564584fffc8SSebastian Siewior	  of the XTEA algorithm for compatibility purposes.
565584fffc8SSebastian Siewior
566584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH
567cf514b2aSRobert Elliott	tristate "Twofish"
568584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
569584fffc8SSebastian Siewior	select CRYPTO_TWOFISH_COMMON
570584fffc8SSebastian Siewior	help
571584fffc8SSebastian Siewior	  Twofish cipher algorithm
572584fffc8SSebastian Siewior
573584fffc8SSebastian Siewior	  Twofish was submitted as an AES (Advanced Encryption Standard)
574584fffc8SSebastian Siewior	  candidate cipher by researchers at CounterPane Systems.  It is a
575f1f142adSRobert Elliott	  16 round block cipher supporting key sizes of 128, 192, and 256
576f1f142adSRobert Elliott	  bits.
577f1f142adSRobert Elliott
578f1f142adSRobert Elliott	  See https://www.schneier.com/twofish.html for further information.
579f1f142adSRobert Elliott
580cf514b2aSRobert Elliottconfig CRYPTO_TWOFISH_COMMON
581f1f142adSRobert Elliott	tristate
58276987479SEric Biggers	help
583b646b782SEric Biggers	  Common parts of the Twofish cipher algorithm shared by the
584f1f142adSRobert Elliott	  generic c and the assembler implementations.
585f1f142adSRobert Elliott
586f1f142adSRobert Elliottendmenu
587cf514b2aSRobert Elliott
588cf514b2aSRobert Elliottmenu "Length-preserving ciphers and modes"
589cf514b2aSRobert Elliott
590f1f142adSRobert Elliottconfig CRYPTO_ADIANTUM
591f1f142adSRobert Elliott	tristate "Adiantum"
592f1f142adSRobert Elliott	select CRYPTO_CHACHA20
593f1f142adSRobert Elliott	select CRYPTO_LIB_NH
594f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305
595f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305_GENERIC
596f1f142adSRobert Elliott	select CRYPTO_MANAGER
597f1f142adSRobert Elliott	help
598f1f142adSRobert Elliott	  Adiantum tweakable, length-preserving encryption mode
599f1f142adSRobert Elliott
600f1f142adSRobert Elliott	  Designed for fast and secure disk encryption, especially on
601f1f142adSRobert Elliott	  CPUs without dedicated crypto instructions.  It encrypts
602f1f142adSRobert Elliott	  each sector using the XChaCha12 stream cipher, two passes of
603f1f142adSRobert Elliott	  an ε-almost-∆-universal hash function, and an invocation of
604f1f142adSRobert Elliott	  the AES-256 block cipher on a single 16-byte block.  On CPUs
605f1f142adSRobert Elliott	  without AES instructions, Adiantum is much faster than
606cf514b2aSRobert Elliott	  AES-XTS.
607f1f142adSRobert Elliott
608f1f142adSRobert Elliott	  Adiantum's security is provably reducible to that of its
609f1f142adSRobert Elliott	  underlying stream and block ciphers, subject to a security
610f1f142adSRobert Elliott	  bound.  Unlike XTS, Adiantum is a true wide-block encryption
611cf514b2aSRobert Elliott	  mode, so it actually provides an even stronger notion of
612f1f142adSRobert Elliott	  security than XTS, subject to the security bound.
613f1f142adSRobert Elliott
614f1f142adSRobert Elliott	  If unsure, say N.
615f1f142adSRobert Elliott
616f1f142adSRobert Elliottconfig CRYPTO_ARC4
617f1f142adSRobert Elliott	tristate "ARC4 (Alleged Rivest Cipher 4)"
618f1f142adSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
619cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
620879f4754SEric Biggers	select CRYPTO_LIB_ARC4
621f1f142adSRobert Elliott	help
622f1f142adSRobert Elliott	  ARC4 cipher algorithm
623cf514b2aSRobert Elliott
624f1f142adSRobert Elliott	  ARC4 is a stream cipher using keys ranging from 8 bits to 2048
625f1f142adSRobert Elliott	  bits in length.  This algorithm is required for driver-based
626f1f142adSRobert Elliott	  WEP, but it should not be for other purposes because of the
627cf514b2aSRobert Elliott	  weakness of the algorithm.
628cf514b2aSRobert Elliott
629f1f142adSRobert Elliottconfig CRYPTO_CHACHA20
630f1f142adSRobert Elliott	tristate "ChaCha"
631f1f142adSRobert Elliott	select CRYPTO_LIB_CHACHA
632f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
633cf514b2aSRobert Elliott	help
634cf514b2aSRobert Elliott	  The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
635f1f142adSRobert Elliott
636f1f142adSRobert Elliott	  ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
637f1f142adSRobert Elliott	  Bernstein and further specified in RFC7539 for use in IETF protocols.
638f1f142adSRobert Elliott	  This is the portable C implementation of ChaCha20.  See
639f1f142adSRobert Elliott	  https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
640f1f142adSRobert Elliott
641cf514b2aSRobert Elliott	  XChaCha20 is the application of the XSalsa20 construction to ChaCha20
642f1f142adSRobert Elliott	  rather than to Salsa20.  XChaCha20 extends ChaCha20's nonce length
643f1f142adSRobert Elliott	  from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
644f1f142adSRobert Elliott	  while provably retaining ChaCha20's security.  See
645cf514b2aSRobert Elliott	  https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
646cf514b2aSRobert Elliott
647cf514b2aSRobert Elliott	  XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
648f1f142adSRobert Elliott	  reduced security margin but increased performance.  It can be needed
649f1f142adSRobert Elliott	  in some performance-sensitive scenarios.
650cf514b2aSRobert Elliott
651f1f142adSRobert Elliottconfig CRYPTO_CBC
652f1f142adSRobert Elliott	tristate "CBC (Cipher Block Chaining)"
653f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
654cf514b2aSRobert Elliott	select CRYPTO_MANAGER
655f1f142adSRobert Elliott	help
656f1f142adSRobert Elliott	  CBC (Cipher Block Chaining) mode (NIST SP800-38A)
657cf514b2aSRobert Elliott
658f1f142adSRobert Elliott	  This block cipher mode is required for IPSec ESP (XFRM_ESP).
659f1f142adSRobert Elliott
660f1f142adSRobert Elliottconfig CRYPTO_CTR
661cf514b2aSRobert Elliott	tristate "CTR (Counter)"
662cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
663cf514b2aSRobert Elliott	select CRYPTO_MANAGER
664f1f142adSRobert Elliott	help
665f1f142adSRobert Elliott	  CTR (Counter) mode (NIST SP800-38A)
666f1f142adSRobert Elliott
667f1f142adSRobert Elliottconfig CRYPTO_CTS
668cf514b2aSRobert Elliott	tristate "CTS (Cipher Text Stealing)"
66984534684SHerbert Xu	select CRYPTO_SKCIPHER
670f1f142adSRobert Elliott	select CRYPTO_MANAGER
671f1f142adSRobert Elliott	help
672cf514b2aSRobert Elliott	  CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
673f1f142adSRobert Elliott	  Addendum to SP800-38A (October 2010))
674f1f142adSRobert Elliott
675cf514b2aSRobert Elliott	  This mode is required for Kerberos gss mechanism support
676f1f142adSRobert Elliott	  for AES encryption.
67761f66c52SEric Biggers
678f1f142adSRobert Elliottconfig CRYPTO_ECB
679f1f142adSRobert Elliott	tristate "ECB (Electronic Codebook)"
680cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER2
681cf514b2aSRobert Elliott	select CRYPTO_MANAGER
682cf514b2aSRobert Elliott	help
683cf514b2aSRobert Elliott	  ECB (Electronic Codebook) mode (NIST SP800-38A)
684cf514b2aSRobert Elliott
685cf514b2aSRobert Elliottconfig CRYPTO_HCTR2
686cf514b2aSRobert Elliott	tristate "HCTR2"
687cf514b2aSRobert Elliott	select CRYPTO_XCTR
688f1f142adSRobert Elliott	select CRYPTO_LIB_GF128HASH
689f1f142adSRobert Elliott	select CRYPTO_MANAGER
690cf514b2aSRobert Elliott	help
69161c581a4SArd Biesheuvel	  HCTR2 length-preserving encryption mode
692f1f142adSRobert Elliott
693f1f142adSRobert Elliott	  A mode for storage encryption that is efficient on processors with
694f1f142adSRobert Elliott	  instructions to accelerate AES and carryless multiplication, e.g.
695f1f142adSRobert Elliott	  x86 processors with AES-NI and CLMUL, and ARM processors with the
696cf514b2aSRobert Elliott	  ARMv8 crypto extensions.
697cf514b2aSRobert Elliott
698cf514b2aSRobert Elliott	  See https://eprint.iacr.org/2021/1441
699f1f142adSRobert Elliott
700f1f142adSRobert Elliottconfig CRYPTO_LRW
701f1f142adSRobert Elliott	tristate "LRW (Liskov Rivest Wagner)"
702f1f142adSRobert Elliott	select CRYPTO_LIB_GF128MUL
703f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
704cf514b2aSRobert Elliott	select CRYPTO_MANAGER
705cf514b2aSRobert Elliott	select CRYPTO_ECB
706f1f142adSRobert Elliott	help
707f1f142adSRobert Elliott	  LRW (Liskov Rivest Wagner) mode
708f1f142adSRobert Elliott
709f1f142adSRobert Elliott	  A tweakable, non malleable, non movable
710f1f142adSRobert Elliott	  narrow block cipher mode for dm-crypt.  Use it with cipher
711cf514b2aSRobert Elliott	  specification string aes-lrw-benbi, the key must be 256, 320 or 384.
712cf514b2aSRobert Elliott	  The first 128, 192 or 256 bits in the key are used for AES and the
713cf514b2aSRobert Elliott	  rest is used to tie each cipher block to its logical position.
714cf514b2aSRobert Elliott
715cf514b2aSRobert Elliott	  See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
716f1f142adSRobert Elliott
717f1f142adSRobert Elliottconfig CRYPTO_XCTR
718f1f142adSRobert Elliott	tristate
719cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
720f1f142adSRobert Elliott	select CRYPTO_MANAGER
721f1f142adSRobert Elliott	help
722f1f142adSRobert Elliott	  XCTR (XOR Counter) mode for HCTR2
723f1f142adSRobert Elliott
724cf514b2aSRobert Elliott	  This blockcipher mode is a variant of CTR mode using XORs and little-endian
725cf514b2aSRobert Elliott	  addition rather than big-endian arithmetic.
726cf514b2aSRobert Elliott
727cf514b2aSRobert Elliott	  XCTR mode is used to implement HCTR2.
728cf514b2aSRobert Elliott
729cf514b2aSRobert Elliottconfig CRYPTO_XTS
730f1f142adSRobert Elliott	tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
731f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
732f1f142adSRobert Elliott	select CRYPTO_MANAGER
733f1f142adSRobert Elliott	select CRYPTO_ECB
734f1f142adSRobert Elliott	help
735f1f142adSRobert Elliott	  XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
736e3d2eaddSRobert Elliott	  and IEEE 1619)
737f1f142adSRobert Elliott
738637e73efSEric Biggers	  Use with aes-xts-plain, key size 256, 384 or 512 bits. This
739f1f142adSRobert Elliott	  implementation currently can't handle a sectorsize which is not a
740e3d2eaddSRobert Elliott	  multiple of 16 bytes.
741f1f142adSRobert Elliott
742f1f142adSRobert Elliottendmenu
743e3d2eaddSRobert Elliott
744f1f142adSRobert Elliottmenu "AEAD (authenticated encryption with associated data) ciphers"
745f1f142adSRobert Elliott
746e3d2eaddSRobert Elliottconfig CRYPTO_AEGIS128
747e3d2eaddSRobert Elliott	tristate "AEGIS-128"
748e3d2eaddSRobert Elliott	select CRYPTO_AEAD
749e3d2eaddSRobert Elliott	select CRYPTO_LIB_AES  # for AES S-box tables
750e3d2eaddSRobert Elliott	help
751f1f142adSRobert Elliott	  AEGIS-128 AEAD algorithm
752f1f142adSRobert Elliott
753e3d2eaddSRobert Elliottconfig CRYPTO_AEGIS128_SIMD
754f1f142adSRobert Elliott	bool "AEGIS-128 (arm NEON, arm64 NEON)"
755f1f142adSRobert Elliott	depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
756a298765eSHerbert Xu	default y
757f1f142adSRobert Elliott	help
758f1f142adSRobert Elliott	  AEGIS-128 AEAD algorithm
759e3d2eaddSRobert Elliott
760e3d2eaddSRobert Elliott	  Architecture: arm or arm64 using:
761f1f142adSRobert Elliott	  - NEON (Advanced SIMD) extension
762f1f142adSRobert Elliott
763cf514b2aSRobert Elliottconfig CRYPTO_CHACHA20POLY1305
764f1f142adSRobert Elliott	tristate "ChaCha20-Poly1305"
765f1f142adSRobert Elliott	select CRYPTO_CHACHA20
766f1f142adSRobert Elliott	select CRYPTO_AEAD
767f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305
768f1f142adSRobert Elliott	select CRYPTO_MANAGER
769e3d2eaddSRobert Elliott	help
770e3d2eaddSRobert Elliott	  ChaCha20 stream cipher and Poly1305 authenticator combined
771f1f142adSRobert Elliott	  mode (RFC8439)
772f1f142adSRobert Elliott
773cf514b2aSRobert Elliottconfig CRYPTO_CCM
774f1f142adSRobert Elliott	tristate "CCM (Counter with Cipher Block Chaining-MAC)"
775f1f142adSRobert Elliott	select CRYPTO_CTR
7769f4e9553SEric Biggers	select CRYPTO_HASH
777f1f142adSRobert Elliott	select CRYPTO_AEAD
778f1f142adSRobert Elliott	select CRYPTO_MANAGER
779e3d2eaddSRobert Elliott	help
780e3d2eaddSRobert Elliott	  CCM (Counter with Cipher Block Chaining-Message Authentication Code)
781e3d2eaddSRobert Elliott	  authenticated encryption mode (NIST SP800-38C)
782e3d2eaddSRobert Elliott
783f1f142adSRobert Elliottconfig CRYPTO_GCM
784ba51738fSHerbert Xu	tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
785ba51738fSHerbert Xu	select CRYPTO_CTR
786ba51738fSHerbert Xu	select CRYPTO_AEAD
787ba51738fSHerbert Xu	select CRYPTO_LIB_GF128HASH
788ba51738fSHerbert Xu	select CRYPTO_MANAGER
789f1f142adSRobert Elliott	help
790f1f142adSRobert Elliott	  GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
791ba51738fSHerbert Xu	  (GCM Message Authentication Code) (NIST SP800-38D)
792f1f142adSRobert Elliott
793e3d2eaddSRobert Elliott	  This is required for IPSec ESP (XFRM_ESP).
794e3d2eaddSRobert Elliott
795f1f142adSRobert Elliottconfig CRYPTO_GENIV
796e3d2eaddSRobert Elliott	tristate
797e3d2eaddSRobert Elliott	select CRYPTO_AEAD
798e3d2eaddSRobert Elliott	select CRYPTO_MANAGER
799f1f142adSRobert Elliott
800f1f142adSRobert Elliottconfig CRYPTO_SEQIV
801f1f142adSRobert Elliott	tristate "Sequence Number IV Generator"
802ba51738fSHerbert Xu	select CRYPTO_GENIV
803f1f142adSRobert Elliott	help
804e3d2eaddSRobert Elliott	  Sequence Number IV generator
805e3d2eaddSRobert Elliott
806f1f142adSRobert Elliott	  This IV generator generates an IV based on a sequence number by
807f1f142adSRobert Elliott	  xoring it with a salt.  This algorithm is mainly useful for CTR.
808f1f142adSRobert Elliott
809f1f142adSRobert Elliott	  This is required for IPsec ESP (XFRM_ESP).
810f1f142adSRobert Elliott
811e3d2eaddSRobert Elliottconfig CRYPTO_ECHAINIV
812f1f142adSRobert Elliott	tristate "Encrypted Chain IV Generator"
813f1f142adSRobert Elliott	select CRYPTO_GENIV
814e3d2eaddSRobert Elliott	help
815e3d2eaddSRobert Elliott	  Encrypted Chain IV generator
816e3d2eaddSRobert Elliott
817f1f142adSRobert Elliott	  This IV generator generates an IV based on the encryption of
818f1f142adSRobert Elliott	  a sequence number xored with a salt.  This is the default
819f1f142adSRobert Elliott	  algorithm for CBC.
820f1f142adSRobert Elliott
821f1f142adSRobert Elliottconfig CRYPTO_ESSIV
822f1f142adSRobert Elliott	tristate "Encrypted Salt-Sector IV Generator"
823f1f142adSRobert Elliott	select CRYPTO_AUTHENC
824f1f142adSRobert Elliott	help
825f1f142adSRobert Elliott	  Encrypted Salt-Sector IV generator
826f1f142adSRobert Elliott
827f1f142adSRobert Elliott	  This IV generator is used in some cases by fscrypt and/or
828f1f142adSRobert Elliott	  dm-crypt. It uses the hash of the block encryption key as the
829f1f142adSRobert Elliott	  symmetric key for a block encryption pass applied to the input
830f1f142adSRobert Elliott	  IV, making low entropy IV sources more suitable for block
831f1f142adSRobert Elliott	  encryption.
832f1f142adSRobert Elliott
833f1f142adSRobert Elliott	  This driver implements a crypto API template that can be
834f1f142adSRobert Elliott	  instantiated either as an skcipher or as an AEAD (depending on the
835f1f142adSRobert Elliott	  type of the first template argument), and which defers encryption
836f1f142adSRobert Elliott	  and decryption requests to the encapsulated cipher after applying
837f1f142adSRobert Elliott	  ESSIV to the input IV. Note that in the AEAD case, it is assumed
838f1f142adSRobert Elliott	  that the keys are presented in the same format used by the authenc
839f1f142adSRobert Elliott	  template, and that the IV appears at the end of the authenticated
840f1f142adSRobert Elliott	  associated data (AAD) region (which is how dm-crypt uses it.)
841f1f142adSRobert Elliott
842f1f142adSRobert Elliott	  Note that the use of ESSIV is not recommended for new deployments,
843f1f142adSRobert Elliott	  and so this only needs to be enabled when interoperability with
8443f342a23SRobert Elliott	  existing encrypted volumes of filesystems is required, or when
845f1f142adSRobert Elliott	  building for a particular system that requires it (e.g., when
846fa3ca9bfSEric Biggers	  the SoC in question has accelerated CBC but not XTS, making CBC
847f1f142adSRobert Elliott	  combined with ESSIV the only feasible mode for h/w accelerated
8483f342a23SRobert Elliott	  block encryption)
8493f342a23SRobert Elliott
8503f342a23SRobert Elliottendmenu
8513f342a23SRobert Elliott
852f1f142adSRobert Elliottmenu "Hashes, digests, and MACs"
853f1f142adSRobert Elliott
854f1f142adSRobert Elliottconfig CRYPTO_BLAKE2B
855f1f142adSRobert Elliott	tristate "BLAKE2b"
856f1f142adSRobert Elliott	select CRYPTO_HASH
857f1f142adSRobert Elliott	select CRYPTO_LIB_BLAKE2B
858f1f142adSRobert Elliott	help
8593f342a23SRobert Elliott	  BLAKE2b cryptographic hash function (RFC 7693)
8603f342a23SRobert Elliott
861f1f142adSRobert Elliott	  BLAKE2b is optimized for 64-bit platforms and can produce digests
8623f342a23SRobert Elliott	  of any size between 1 and 64 bytes. The keyed hash is also implemented.
863f1f142adSRobert Elliott
864f1f142adSRobert Elliott	  This module provides the following algorithms:
865f1f142adSRobert Elliott	  - blake2b-160
8663f342a23SRobert Elliott	  - blake2b-256
8673f342a23SRobert Elliott	  - blake2b-384
868f1f142adSRobert Elliott	  - blake2b-512
869f1f142adSRobert Elliott
8703f342a23SRobert Elliott	  See https://blake2.net for further information.
871f1f142adSRobert Elliott
872f1f142adSRobert Elliottconfig CRYPTO_CMAC
873f1f142adSRobert Elliott	tristate "CMAC (Cipher-based MAC)"
8743f342a23SRobert Elliott	select CRYPTO_HASH
8753f342a23SRobert Elliott	select CRYPTO_MANAGER
8763f342a23SRobert Elliott	help
8773f342a23SRobert Elliott	  CMAC (Cipher-based Message Authentication Code) authentication
878f1f142adSRobert Elliott	  mode (NIST SP800-38B and IETF RFC4493)
879f1f142adSRobert Elliott
8803f342a23SRobert Elliottconfig CRYPTO_HMAC
881f1f142adSRobert Elliott	tristate "HMAC (Keyed-Hash MAC)"
882f1f142adSRobert Elliott	select CRYPTO_HASH
8833f342a23SRobert Elliott	select CRYPTO_MANAGER
884f1f142adSRobert Elliott	help
885f1f142adSRobert Elliott	  HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
8863f342a23SRobert Elliott	  RFC2104)
887f1f142adSRobert Elliott
888ba8ee22aSEric Biggers	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
889f1f142adSRobert Elliott
890ba8ee22aSEric Biggersconfig CRYPTO_MD4
891f1f142adSRobert Elliott	tristate "MD4"
892f1f142adSRobert Elliott	select CRYPTO_HASH
8933f342a23SRobert Elliott	help
894f1f142adSRobert Elliott	  MD4 message digest algorithm (RFC1320)
895f1f142adSRobert Elliott
8963f342a23SRobert Elliottconfig CRYPTO_MD5
897f1f142adSRobert Elliott	tristate "MD5"
898f1f142adSRobert Elliott	select CRYPTO_HASH
899f1f142adSRobert Elliott	select CRYPTO_LIB_MD5
900f1f142adSRobert Elliott	help
901f1f142adSRobert Elliott	  MD5 message digest algorithm (RFC1321), including HMAC support.
902f1f142adSRobert Elliott
9033f342a23SRobert Elliottconfig CRYPTO_RMD160
904f1f142adSRobert Elliott	tristate "RIPEMD-160"
905f1f142adSRobert Elliott	select CRYPTO_HASH
906f1f142adSRobert Elliott	help
9073f342a23SRobert Elliott	  RIPEMD-160 hash function (ISO/IEC 10118-3)
9083f342a23SRobert Elliott
909f1f142adSRobert Elliott	  RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
910f1f142adSRobert Elliott	  to be used as a secure replacement for the 128-bit hash functions
9113f342a23SRobert Elliott	  MD4, MD5 and its predecessor RIPEMD
912f1f142adSRobert Elliott	  (not to be confused with RIPEMD-128).
913f1f142adSRobert Elliott
914f1f142adSRobert Elliott	  Its speed is comparable to SHA-1 and there are no known attacks
9158bc79ab6SEric Biggers	  against RIPEMD-160.
9168bc79ab6SEric Biggers
917f1f142adSRobert Elliott	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
918f1f142adSRobert Elliott	  See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
9193f342a23SRobert Elliott	  for further information.
920f1f142adSRobert Elliott
921f1f142adSRobert Elliottconfig CRYPTO_SHA1
922f1f142adSRobert Elliott	tristate "SHA-1"
923e0cd3716SEric Biggers	select CRYPTO_HASH
924e0cd3716SEric Biggers	select CRYPTO_LIB_SHA1
925f1f142adSRobert Elliott	help
9263f342a23SRobert Elliott	  SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3), including
927f1f142adSRobert Elliott	  HMAC support.
928f1f142adSRobert Elliott
9293f342a23SRobert Elliottconfig CRYPTO_SHA256
930f1f142adSRobert Elliott	tristate "SHA-224 and SHA-256"
931469acaa1SEric Biggers	select CRYPTO_HASH
932f1f142adSRobert Elliott	select CRYPTO_LIB_SHA256
933469acaa1SEric Biggers	help
934469acaa1SEric Biggers	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC
935f1f142adSRobert Elliott	  10118-3), including HMAC support.
936f1f142adSRobert Elliott
9373f342a23SRobert Elliott	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
938f1f142adSRobert Elliott
939f1799d17SEric Biggersconfig CRYPTO_SHA512
940f1f142adSRobert Elliott	tristate "SHA-384 and SHA-512"
9413f342a23SRobert Elliott	select CRYPTO_HASH
942f1f142adSRobert Elliott	select CRYPTO_LIB_SHA512
9436dc7fce9SEric Biggers	help
9443f342a23SRobert Elliott	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC
945f1f142adSRobert Elliott	  10118-3), including HMAC support.
946f4065b2fSHerbert Xu
947f1f142adSRobert Elliottconfig CRYPTO_SHA3
9483f342a23SRobert Elliott	tristate "SHA-3"
9493f342a23SRobert Elliott	select CRYPTO_HASH
9503f342a23SRobert Elliott	select CRYPTO_LIB_SHA3
951f1f142adSRobert Elliott	help
952f1f142adSRobert Elliott	  SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
953f1f142adSRobert Elliott
954f1f142adSRobert Elliottconfig CRYPTO_SM3
955f1f142adSRobert Elliott	tristate "SM3 (ShangMi 3)"
956f1f142adSRobert Elliott	select CRYPTO_HASH
9573f342a23SRobert Elliott	select CRYPTO_LIB_SM3
958f1f142adSRobert Elliott	help
959f1f142adSRobert Elliott	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
9603f342a23SRobert Elliott
9613f342a23SRobert Elliott	  This is part of the Chinese Commercial Cryptography suite.
9623f342a23SRobert Elliott
9633f342a23SRobert Elliott	  References:
9643f342a23SRobert Elliott	  http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
965f1f142adSRobert Elliott	  https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
966f1f142adSRobert Elliott
967f1f142adSRobert Elliottconfig CRYPTO_STREEBOG
968f1f142adSRobert Elliott	tristate "Streebog"
969f1f142adSRobert Elliott	select CRYPTO_HASH
970f1f142adSRobert Elliott	help
9713f342a23SRobert Elliott	  Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
972f1f142adSRobert Elliott
973f1f142adSRobert Elliott	  This is one of the Russian cryptographic standard algorithms (called
9743f342a23SRobert Elliott	  GOST algorithms). This setting enables two hash algorithms with
9753f342a23SRobert Elliott	  256 and 512 bits output.
9763f342a23SRobert Elliott
977f1f142adSRobert Elliott	  References:
978f1f142adSRobert Elliott	  https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
979f1f142adSRobert Elliott	  https://tools.ietf.org/html/rfc6986
9803f342a23SRobert Elliott
9813f342a23SRobert Elliottconfig CRYPTO_WP512
982f1f142adSRobert Elliott	tristate "Whirlpool"
983f1f142adSRobert Elliott	select CRYPTO_HASH
9843f342a23SRobert Elliott	help
985f1f142adSRobert Elliott	  Whirlpool hash function (ISO/IEC 10118-3)
986f1f142adSRobert Elliott
987f1f142adSRobert Elliott	  512, 384 and 256-bit hashes.
9883f342a23SRobert Elliott
9893f342a23SRobert Elliott	  Whirlpool-512 is part of the NESSIE cryptographic primitives.
990f1f142adSRobert Elliott
991f1f142adSRobert Elliott	  See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
9923f342a23SRobert Elliott	  for further information.
993f1f142adSRobert Elliott
994f1f142adSRobert Elliottconfig CRYPTO_XCBC
995f1f142adSRobert Elliott	tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
9963f342a23SRobert Elliott	select CRYPTO_HASH
9973f342a23SRobert Elliott	select CRYPTO_MANAGER
9983f342a23SRobert Elliott	help
9993f342a23SRobert Elliott	  XCBC-MAC (Extended Cipher Block Chaining Message Authentication
1000f1f142adSRobert Elliott	  Code) (RFC3566)
1001f1f142adSRobert Elliott
1002f1f142adSRobert Elliottconfig CRYPTO_XXHASH
1003f1f142adSRobert Elliott	tristate "xxHash"
1004f1f142adSRobert Elliott	select CRYPTO_HASH
1005ec84348dSRobert Elliott	select XXHASH
1006f1f142adSRobert Elliott	help
1007f1f142adSRobert Elliott	  xxHash non-cryptographic hash algorithm
1008f1f142adSRobert Elliott
1009ec84348dSRobert Elliott	  Extremely fast, working at speeds close to RAM limits.
1010ec84348dSRobert Elliott
1011ec84348dSRobert Elliottendmenu
1012ec84348dSRobert Elliott
1013ec84348dSRobert Elliottmenu "CRCs (cyclic redundancy checks)"
1014ec84348dSRobert Elliott
1015ec84348dSRobert Elliottconfig CRYPTO_CRC32C
1016ec84348dSRobert Elliott	tristate "CRC32c"
1017f1f142adSRobert Elliott	select CRYPTO_HASH
1018ec84348dSRobert Elliott	select CRC32
1019f1f142adSRobert Elliott	help
1020f1f142adSRobert Elliott	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1021f1f142adSRobert Elliott
1022ec84348dSRobert Elliott	  A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1023ec84348dSRobert Elliott	  by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
1024f1f142adSRobert Elliott	  Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1025f1f142adSRobert Elliott	  on Communications, Vol. 41, No. 6, June 1993, selected for use with
1026f1f142adSRobert Elliott	  iSCSI.
1027584fffc8SSebastian Siewior
10281da177e4SLinus Torvaldsconfig CRYPTO_CRC32
1029a9a98d49SRobert Elliott	tristate "CRC32"
1030cce9e06dSHerbert Xu	select CRYPTO_HASH
1031f6ded09dSGiovanni Cabiddu	select CRC32
10321da177e4SLinus Torvalds	help
10331da177e4SLinus Torvalds	  CRC32 CRC algorithm (IEEE 802.3)
10341da177e4SLinus Torvalds
1035a9a98d49SRobert Elliottendmenu
10361da177e4SLinus Torvalds
1037a9a98d49SRobert Elliottmenu "Compression"
10381da177e4SLinus Torvalds
10390b77abb3SZoltan Sogorconfig CRYPTO_DEFLATE
1040a9a98d49SRobert Elliott	tristate "Deflate"
10410b77abb3SZoltan Sogor	select CRYPTO_ALGAPI
1042ac9d2c4bSGiovanni Cabiddu	select CRYPTO_ACOMP2
10430b77abb3SZoltan Sogor	select ZLIB_INFLATE
10440b77abb3SZoltan Sogor	select ZLIB_DEFLATE
10450b77abb3SZoltan Sogor	help
1046a9a98d49SRobert Elliott	  Deflate compression algorithm (RFC1951)
1047a9a98d49SRobert Elliott
1048a9a98d49SRobert Elliott	  Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
10490b77abb3SZoltan Sogor
105035a1fc18SSeth Jenningsconfig CRYPTO_LZO
1051a9a98d49SRobert Elliott	tristate "LZO"
10522062c5b6SDan Streetman	select CRYPTO_ALGAPI
10536a8de3aeSGiovanni Cabiddu	select CRYPTO_ACOMP2
10542062c5b6SDan Streetman	select LZO_COMPRESS
10552062c5b6SDan Streetman	select LZO_DECOMPRESS
105635a1fc18SSeth Jennings	help
1057a9a98d49SRobert Elliott	  LZO compression algorithm
1058a9a98d49SRobert Elliott
1059a9a98d49SRobert Elliott	  See https://www.oberhumer.com/opensource/lzo/ for further information.
106035a1fc18SSeth Jennings
10610ea8530dSChanho Minconfig CRYPTO_842
1062a9a98d49SRobert Elliott	tristate "842"
10630ea8530dSChanho Min	select CRYPTO_ALGAPI
10648cd9330eSGiovanni Cabiddu	select CRYPTO_ACOMP2
10650ea8530dSChanho Min	select 842_COMPRESS
10660ea8530dSChanho Min	select 842_DECOMPRESS
10670ea8530dSChanho Min	help
1068a9a98d49SRobert Elliott	  842 compression algorithm by IBM
1069a9a98d49SRobert Elliott
1070a9a98d49SRobert Elliott	  See https://github.com/plauth/lib842 for further information.
10710ea8530dSChanho Min
10720ea8530dSChanho Minconfig CRYPTO_LZ4
1073a9a98d49SRobert Elliott	tristate "LZ4"
10740ea8530dSChanho Min	select CRYPTO_ALGAPI
107591d53d96SGiovanni Cabiddu	select CRYPTO_ACOMP2
10760ea8530dSChanho Min	select LZ4_COMPRESS
10770ea8530dSChanho Min	select LZ4_DECOMPRESS
10780ea8530dSChanho Min	help
1079a9a98d49SRobert Elliott	  LZ4 compression algorithm
1080a9a98d49SRobert Elliott
1081a9a98d49SRobert Elliott	  See https://github.com/lz4/lz4 for further information.
10820ea8530dSChanho Min
1083d28fc3dbSNick Terrellconfig CRYPTO_LZ4HC
1084a9a98d49SRobert Elliott	tristate "LZ4HC"
1085d28fc3dbSNick Terrell	select CRYPTO_ALGAPI
1086d28fc3dbSNick Terrell	select CRYPTO_ACOMP2
1087d28fc3dbSNick Terrell	select LZ4HC_COMPRESS
1088d28fc3dbSNick Terrell	select LZ4_DECOMPRESS
1089d28fc3dbSNick Terrell	help
1090a9a98d49SRobert Elliott	  LZ4 high compression mode algorithm
1091a9a98d49SRobert Elliott
1092a9a98d49SRobert Elliott	  See https://github.com/lz4/lz4 for further information.
1093d28fc3dbSNick Terrell
1094f1f142adSRobert Elliottconfig CRYPTO_ZSTD
1095f1f142adSRobert Elliott	tristate "Zstd"
1096f1f142adSRobert Elliott	select CRYPTO_ALGAPI
109717f0f4a4SNeil Horman	select CRYPTO_ACOMP2
1098f2c89a10SHerbert Xu	select ZSTD_COMPRESS
10995dd76c87SEric Biggers	select ZSTD_DECOMPRESS
1100bb5530e4SStephan Mueller	help
1101245c8d0dSEric Biggers	  zstd compression algorithm
1102f01d721cSEric Biggers
11035dd76c87SEric Biggers	  See https://github.com/facebook/zstd for further information.
11045dd76c87SEric Biggers
1105f2c89a10SHerbert Xuendmenu
11065dd76c87SEric Biggers
11075dd76c87SEric Biggersmenu "Random number generation"
1108419090c6SStephan Mueller
1109bb5530e4SStephan Muellerconfig CRYPTO_DRBG
1110a9a98d49SRobert Elliott	tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
1111ce260754SDavid Howells	select CRYPTO_JITTERENTROPY
11122f313e02SArnd Bergmann	select CRYPTO_LIB_SHA512
1113bb5530e4SStephan Mueller	select CRYPTO_RNG
1114a9a98d49SRobert Elliott	help
1115a9a98d49SRobert Elliott	  DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
1116a9a98d49SRobert Elliott
1117a9a98d49SRobert Elliott	  Enable this only if you need it for a FIPS 140 certification.
1118e63df1ecSRandy Dunlap	  It's otherwise redundant with the kernel's regular RNG.
1119a9a98d49SRobert Elliott
1120e63df1ecSRandy Dunlapconfig CRYPTO_JITTERENTROPY
1121a9a98d49SRobert Elliott	tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
1122e63df1ecSRandy Dunlap	select CRYPTO_LIB_SHA3
1123bb5530e4SStephan Mueller	select CRYPTO_RNG
1124e7ed6473SHerbert Xu	help
1125e7ed6473SHerbert Xu	  CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
1126e7ed6473SHerbert Xu
112759bcfd78SStephan Müller	  A non-physical non-deterministic ("true") RNG (e.g., an entropy source
112859bcfd78SStephan Müller	  compliant with NIST SP800-90B) intended to provide a seed to a
112959bcfd78SStephan Müller	  deterministic RNG (e.g., per NIST SP800-90C).
113059bcfd78SStephan Müller	  This RNG does not perform any cryptographic whitening of the generated
113159bcfd78SStephan Müller	  random numbers.
113259bcfd78SStephan Müller
113359bcfd78SStephan Müller	  See https://www.chronox.de/jent/
113459bcfd78SStephan Müller
113559bcfd78SStephan Müllerif CRYPTO_JITTERENTROPY
113659bcfd78SStephan Müllerif CRYPTO_FIPS && EXPERT
113759bcfd78SStephan Müller
113859bcfd78SStephan Müllerchoice
113959bcfd78SStephan Müller	prompt "CPU Jitter RNG Memory Size"
114059bcfd78SStephan Müller	default CRYPTO_JITTERENTROPY_MEMSIZE_2
114159bcfd78SStephan Müller	help
114259bcfd78SStephan Müller	  The Jitter RNG measures the execution time of memory accesses.
114359bcfd78SStephan Müller	  Multiple consecutive memory accesses are performed. If the memory
114459bcfd78SStephan Müller	  size fits into a cache (e.g. L1), only the memory access timing
114559bcfd78SStephan Müller	  to that cache is measured. The closer the cache is to the CPU
114659bcfd78SStephan Müller	  the less variations are measured and thus the less entropy is
114759bcfd78SStephan Müller	  obtained. Thus, if the memory size fits into the L1 cache, the
114859bcfd78SStephan Müller	  obtained entropy is less than if the memory size fits within
114959bcfd78SStephan Müller	  L1 + L2, which in turn is less if the memory fits into
115059bcfd78SStephan Müller	  L1 + L2 + L3. Thus, by selecting a different memory size,
115159bcfd78SStephan Müller	  the entropy rate produced by the Jitter RNG can be modified.
115259bcfd78SStephan Müller
115359bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_2
115459bcfd78SStephan Müller		bool "2048 Bytes (default)"
115559bcfd78SStephan Müller
115659bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_128
115759bcfd78SStephan Müller		bool "128 kBytes"
115859bcfd78SStephan Müller
115959bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_1024
116059bcfd78SStephan Müller		bool "1024 kBytes"
116159bcfd78SStephan Müller
116259bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_8192
116359bcfd78SStephan Müller		bool "8192 kBytes"
116459bcfd78SStephan Müllerendchoice
116559bcfd78SStephan Müller
116659bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
116759bcfd78SStephan Müller	int
116859bcfd78SStephan Müller	default 64 if CRYPTO_JITTERENTROPY_MEMSIZE_2
11690baa8fabSStephan Müller	default 512 if CRYPTO_JITTERENTROPY_MEMSIZE_128
11700baa8fabSStephan Müller	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
11710baa8fabSStephan Müller	default 4096 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
117295a798d2SStephan Mueller
11730baa8fabSStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
11740baa8fabSStephan Müller	int
11750baa8fabSStephan Müller	default 32 if CRYPTO_JITTERENTROPY_MEMSIZE_2
11760baa8fabSStephan Müller	default 256 if CRYPTO_JITTERENTROPY_MEMSIZE_128
11770baa8fabSStephan Müller	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
11780baa8fabSStephan Müller	default 2048 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
11790baa8fabSStephan Müller
11800baa8fabSStephan Müllerconfig CRYPTO_JITTERENTROPY_OSR
11810baa8fabSStephan Müller	int "CPU Jitter RNG Oversampling Rate"
11820baa8fabSStephan Müller	range 1 15
11830baa8fabSStephan Müller	default 3
11840baa8fabSStephan Müller	help
118569f1c387SStephan Müller	  The Jitter RNG allows the specification of an oversampling rate (OSR).
118669f1c387SStephan Müller	  The Jitter RNG operation requires a fixed amount of timing
118769f1c387SStephan Müller	  measurements to produce one output block of random numbers. The
118869f1c387SStephan Müller	  OSR value is multiplied with the amount of timing measurements to
118969f1c387SStephan Müller	  generate one output block. Thus, the timing measurement is oversampled
119069f1c387SStephan Müller	  by the OSR factor. The oversampling allows the Jitter RNG to operate
119169f1c387SStephan Müller	  on hardware whose timers deliver limited amount of entropy (e.g.
119269f1c387SStephan Müller	  the timer is coarse) by setting the OSR to a higher value. The
119369f1c387SStephan Müller	  trade-off, however, is that the Jitter RNG now requires more time
119469f1c387SStephan Müller	  to generate random numbers.
119569f1c387SStephan Müller
119669f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_TESTINTERFACE
119769f1c387SStephan Müller	bool "CPU Jitter RNG Test Interface"
119869f1c387SStephan Müller	help
119969f1c387SStephan Müller	  The test interface allows a privileged process to capture
120069f1c387SStephan Müller	  the raw unconditioned high resolution time stamp noise that
120169f1c387SStephan Müller	  is collected by the Jitter RNG for statistical analysis. As
120269f1c387SStephan Müller	  this data is used at the same time to generate random bits,
120369f1c387SStephan Müller	  the Jitter RNG operates in an insecure mode as long as the
1204e7ed6473SHerbert Xu	  recording is enabled. This interface therefore is only
1205e7ed6473SHerbert Xu	  intended for testing purposes and is not suitable for
1206e7ed6473SHerbert Xu	  production systems.
1207e7ed6473SHerbert Xu
1208e7ed6473SHerbert Xu	  The raw noise data can be obtained using the jent_raw_hires
1209e7ed6473SHerbert Xu	  debugfs file. Using the option
1210e7ed6473SHerbert Xu	  jitterentropy_testing.boot_raw_hires_test=1 the raw noise of
1211e7ed6473SHerbert Xu	  the first 1000 entropy events since boot can be sampled.
1212e7ed6473SHerbert Xu
1213e7ed6473SHerbert Xu	  If unsure, select N.
1214e7ed6473SHerbert Xu
1215e7ed6473SHerbert Xuendif	# if CRYPTO_FIPS && EXPERT
1216e7ed6473SHerbert Xu
1217e7ed6473SHerbert Xuif !(CRYPTO_FIPS && EXPERT)
1218e7ed6473SHerbert Xu
1219e7ed6473SHerbert Xuconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
1220e7ed6473SHerbert Xu	int
1221e7ed6473SHerbert Xu	default 64
1222e7ed6473SHerbert Xu
1223e7ed6473SHerbert Xuconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
1224e7ed6473SHerbert Xu	int
1225e7ed6473SHerbert Xu	default 32
1226026a733eSStephan Müller
1227026a733eSStephan Müllerconfig CRYPTO_JITTERENTROPY_OSR
1228a88592ccSHerbert Xu	int
1229304b4aceSStephan Müller	default 1
1230026a733eSStephan Müller
1231f1f142adSRobert Elliottconfig CRYPTO_JITTERENTROPY_TESTINTERFACE
1232a67afb18SEric Biggers	bool
1233f1f142adSRobert Elliott
123403c8efc1SHerbert Xuendif	# if !(CRYPTO_FIPS && EXPERT)
123503c8efc1SHerbert Xuendif	# if CRYPTO_JITTERENTROPY
123603c8efc1SHerbert Xu
1237fe869cdbSHerbert Xuconfig CRYPTO_KDF800108_CTR
1238a67afb18SEric Biggers	tristate
12397451708fSHerbert Xu	select CRYPTO_HMAC
1240fe869cdbSHerbert Xu	select CRYPTO_SHA256
1241fe869cdbSHerbert Xu
1242fe869cdbSHerbert Xuendmenu
1243a67afb18SEric Biggersmenu "Userspace interface (deprecated)"
1244a67afb18SEric Biggers
1245a67afb18SEric Biggersconfig CRYPTO_USER_API
12469bc51715SRobert Elliott	tristate
1247a67afb18SEric Biggers
1248a67afb18SEric Biggersconfig CRYPTO_USER_API_HASH
1249a67afb18SEric Biggers	tristate "Hash algorithms (deprecated)"
1250a67afb18SEric Biggers	depends on NET
1251a67afb18SEric Biggers	select CRYPTO_HASH
1252a67afb18SEric Biggers	select CRYPTO_USER_API
1253a67afb18SEric Biggers	help
1254a67afb18SEric Biggers	  Enable the AF_ALG userspace interface for hash algorithms.  This
1255fe869cdbSHerbert Xu	  provides unprivileged userspace programs access to arbitrary hash
12568ff59090SHerbert Xu	  algorithms implemented in the kernel's privileged execution context.
1257a67afb18SEric Biggers
12587451708fSHerbert Xu	  This interface is deprecated and is supported only for backwards
1259b95bba5dSEric Biggers	  compatibility.  It regularly has vulnerabilities, and the capabilities
12608ff59090SHerbert Xu	  it provides are redundant with userspace crypto libraries.
12618ff59090SHerbert Xu
1262a67afb18SEric Biggers	  Enable this only if needed for support for a program that hasn't yet
1263a67afb18SEric Biggers	  been converted to userspace crypto, for example iwd.
1264a67afb18SEric Biggers
1265a67afb18SEric Biggers	  See also Documentation/crypto/userspace-if.rst
12669bc51715SRobert Elliott
1267a67afb18SEric Biggersconfig CRYPTO_USER_API_SKCIPHER
1268a67afb18SEric Biggers	tristate "Symmetric key cipher algorithms (deprecated)"
1269a67afb18SEric Biggers	depends on NET
1270a67afb18SEric Biggers	select CRYPTO_SKCIPHER
1271a67afb18SEric Biggers	select CRYPTO_USER_API
1272a67afb18SEric Biggers	help
1273a67afb18SEric Biggers	  Enable the AF_ALG userspace interface for symmetric key algorithms.
1274a67afb18SEric Biggers	  This provides unprivileged userspace programs access to arbitrary
1275a67afb18SEric Biggers	  symmetric key algorithms implemented in the kernel's privileged
12768ff59090SHerbert Xu	  execution context.
12772f375538SStephan Mueller
1278a67afb18SEric Biggers	  This interface is deprecated and is supported only for backwards
12792f375538SStephan Mueller	  compatibility.  It regularly has vulnerabilities, and the capabilities
12802f375538SStephan Mueller	  it provides are redundant with userspace crypto libraries.
12812f375538SStephan Mueller
12822f375538SStephan Mueller	  Enable this only if needed for support for a program that hasn't yet
1283a67afb18SEric Biggers	  been converted to userspace crypto, for example iwd, or cryptsetup
1284a67afb18SEric Biggers	  with certain algorithms.
1285a67afb18SEric Biggers
1286a67afb18SEric Biggers	  See also Documentation/crypto/userspace-if.rst
12879bc51715SRobert Elliott
1288a67afb18SEric Biggersconfig CRYPTO_USER_API_RNG
1289a67afb18SEric Biggers	tristate "Random number generation algorithms (deprecated)"
1290a67afb18SEric Biggers	depends on NET
1291a67afb18SEric Biggers	select CRYPTO_RNG
1292a67afb18SEric Biggers	select CRYPTO_USER_API
1293a67afb18SEric Biggers	help
12942f375538SStephan Mueller	  Enable the AF_ALG userspace interface for random number generation
129577ebdabeSElena Petrova	  (RNG) algorithms.  This provides unprivileged userspace programs
129677ebdabeSElena Petrova	  access to arbitrary RNG algorithms implemented in the kernel's
129777ebdabeSElena Petrova	  privileged execution context.
129877ebdabeSElena Petrova
12999bc51715SRobert Elliott	  This interface is deprecated and is supported only for backwards
13009bc51715SRobert Elliott	  compatibility.  It regularly has vulnerabilities, and the capabilities
13019bc51715SRobert Elliott	  it provides are redundant with userspace crypto libraries as well as
13029bc51715SRobert Elliott	  the normal kernel RNG (e.g., /dev/urandom and getrandom(2)).
13039bc51715SRobert Elliott
130477ebdabeSElena Petrova	  See also Documentation/crypto/userspace-if.rst
130577ebdabeSElena Petrova
130677ebdabeSElena Petrovaconfig CRYPTO_USER_API_RNG_CAVP
1307b64a2d95SHerbert Xu	bool "Enable CAVP testing of DRBG"
1308a67afb18SEric Biggers	depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
1309b64a2d95SHerbert Xu	help
1310b64a2d95SHerbert Xu	  Enable extra APIs in the userspace interface for NIST CAVP
1311b95bba5dSEric Biggers	  (Cryptographic Algorithm Validation Program) testing:
1312b64a2d95SHerbert Xu	  - resetting DRBG entropy
1313b64a2d95SHerbert Xu	  - providing Additional Data
1314a67afb18SEric Biggers
1315a67afb18SEric Biggers	  This should only be enabled for CAVP testing. You should say
1316a67afb18SEric Biggers	  no unless you know what this is.
1317a67afb18SEric Biggers
13189bc51715SRobert Elliottconfig CRYPTO_USER_API_AEAD
1319a67afb18SEric Biggers	tristate "AEAD cipher algorithms (deprecated)"
1320a67afb18SEric Biggers	depends on NET
1321a67afb18SEric Biggers	select CRYPTO_AEAD
1322a67afb18SEric Biggers	select CRYPTO_SKCIPHER
1323a67afb18SEric Biggers	select CRYPTO_USER_API
1324a67afb18SEric Biggers	help
1325a67afb18SEric Biggers	  Enable the AF_ALG userspace interface for authenticated encryption
1326a67afb18SEric Biggers	  with associated data (AEAD) algorithms.  This provides unprivileged
1327b64a2d95SHerbert Xu	  userspace programs access to arbitrary AEAD algorithms implemented in
13289ace6771SArd Biesheuvel	  the kernel's privileged execution context.
13299bc51715SRobert Elliott
13309ace6771SArd Biesheuvel	  This interface is deprecated and is supported only for backwards
13319ace6771SArd Biesheuvel	  compatibility.  It regularly has vulnerabilities, and the capabilities
13329ace6771SArd Biesheuvel	  it provides are redundant with userspace crypto libraries.
13339ace6771SArd Biesheuvel
13349ace6771SArd Biesheuvel	  Enable this only if needed for support for a program that hasn't yet
13359ace6771SArd Biesheuvel	  been converted to userspace crypto, for example iwd.
13369ace6771SArd Biesheuvel
1337f1f142adSRobert Elliott	  See also Documentation/crypto/userspace-if.rst
1338f1f142adSRobert Elliott
133927bc50fcSLinus Torvaldsconfig CRYPTO_USER_API_ENABLE_OBSOLETE
13404a329fecSRobert Elliott	bool "Obsolete cryptographic algorithms"
13414a329fecSRobert Elliott	depends on CRYPTO_USER_API
13424a329fecSRobert Elliott	default y
13434a329fecSRobert Elliott	help
13444a329fecSRobert Elliott	  Allow obsolete cryptographic algorithms to be selected that have
13454a329fecSRobert Elliott	  already been phased out from internal use by the kernel, and are
13466a490a4eSRobert Elliott	  only useful for userspace clients that still rely on them.
13476a490a4eSRobert Elliott
13486a490a4eSRobert Elliottendmenu
1349178f3856SHeiko Stuebner
1350178f3856SHeiko Stuebnerif !KMSAN # avoid false positives from assembly
1351178f3856SHeiko Stuebnerif ARM
1352c9d24c97SRobert Elliottsource "arch/arm/crypto/Kconfig"
1353c9d24c97SRobert Elliottendif
1354c9d24c97SRobert Elliottif ARM64
13550e9f9ea6SRobert Elliottsource "arch/arm64/crypto/Kconfig"
13560e9f9ea6SRobert Elliottendif
13570e9f9ea6SRobert Elliottif PPC
135828a936efSRobert Elliottsource "arch/powerpc/crypto/Kconfig"
135928a936efSRobert Elliottendif
136028a936efSRobert Elliottif RISCV
136127bc50fcSLinus Torvaldssource "arch/riscv/crypto/Kconfig"
1362e45f710bSRobert Elliottendif
13631da177e4SLinus Torvaldsif S390
13648636a1f9SMasahiro Yamadasource "arch/s390/crypto/Kconfig"
13658636a1f9SMasahiro Yamadaendif
13663936f02bSDavid Howellsif SPARC
13671da177e4SLinus Torvaldssource "arch/sparc/crypto/Kconfig"
1368cce9e06dSHerbert Xuendif
1369if X86
1370source "arch/x86/crypto/Kconfig"
1371endif
1372endif
1373
1374source "drivers/crypto/Kconfig"
1375source "crypto/asymmetric_keys/Kconfig"
1376source "certs/Kconfig"
1377source "crypto/krb5/Kconfig"
1378
1379endif	# if CRYPTO
1380