xref: /linux/crypto/Kconfig (revision 9e4e86a604dfd06402933467578c4b79f5412b2c)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
3685784aaSDan Williams# Generic algorithms support
4685784aaSDan Williams#
5685784aaSDan Williams
6685784aaSDan Williams#
7685784aaSDan Williams# async_tx api: hardware offloaded memory transfer/transform support
8685784aaSDan Williams#
99bc89cd8SDan Williamssource "crypto/async_tx/Kconfig"
109bc89cd8SDan Williams
119bc89cd8SDan Williams#
129bc89cd8SDan Williams# Cryptographic API Configuration
139bc89cd8SDan Williams#
141da177e4SLinus Torvaldsmenuconfig CRYPTO
151da177e4SLinus Torvalds	tristate "Cryptographic API"
162e290f43SJan Engelhardt	select CRYPTO_LIB_UTILS
17c3715cb9SSebastian Siewior	help
187033b937SEric Biggers	  This option provides the core Cryptographic API.
191da177e4SLinus Torvalds
201da177e4SLinus Torvaldsif CRYPTO
211da177e4SLinus Torvalds
22cce9e06dSHerbert Xumenu "Crypto core or helper"
23cce9e06dSHerbert Xu
24f1f142adSRobert Elliottconfig CRYPTO_FIPS
25584fffc8SSebastian Siewior	bool "FIPS 200 compliance"
26ccb778e1SNeil Horman	depends on CRYPTO_DRBG=y && CRYPTO_SELFTESTS
27ccb778e1SNeil Horman	depends on (MODULE_SIG || !MODULES)
28c7dcb041SEric Biggers	help
291f696097SAlec Ari	  This option enables the fips boot option which is
30ccb778e1SNeil Horman	  required if you want the system to operate in a FIPS 200
31d99324c2SGeert Uytterhoeven	  certification.  You should say no unless you know what
32d99324c2SGeert Uytterhoeven	  this is.
33ccb778e1SNeil Horman
34e84c5480SChuck Ebbertconfig CRYPTO_FIPS_NAME
35ccb778e1SNeil Horman	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
555a44749fSVladis Dronovconfig CRYPTO_ALGAPI
565a44749fSVladis Dronov	tristate
57cce9e06dSHerbert Xu	select CRYPTO_ALGAPI2
58cce9e06dSHerbert Xu	help
596a0fcbb4SHerbert Xu	  This option provides the API for cryptographic algorithms.
60cce9e06dSHerbert Xu
61cce9e06dSHerbert Xuconfig CRYPTO_ALGAPI2
62cce9e06dSHerbert Xu	tristate
636a0fcbb4SHerbert Xu
646a0fcbb4SHerbert Xuconfig CRYPTO_AEAD
656a0fcbb4SHerbert Xu	tristate
661ae97820SHerbert Xu	select CRYPTO_AEAD2
671ae97820SHerbert Xu	select CRYPTO_ALGAPI
686a0fcbb4SHerbert Xu
691ae97820SHerbert Xuconfig CRYPTO_AEAD2
701ae97820SHerbert Xu	tristate
716a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
726a0fcbb4SHerbert Xu
736a0fcbb4SHerbert Xuconfig CRYPTO_SIG
746a0fcbb4SHerbert 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
826cb8815fSHerbert Xuconfig CRYPTO_SKCIPHER
836cb8815fSHerbert Xu	tristate
84b95bba5dSEric Biggers	select CRYPTO_SKCIPHER2
855cde0af2SHerbert Xu	select CRYPTO_ALGAPI
86b95bba5dSEric Biggers	select CRYPTO_ECB
875cde0af2SHerbert Xu
8884534684SHerbert Xuconfig CRYPTO_SKCIPHER2
896a0fcbb4SHerbert Xu	tristate
90b95bba5dSEric Biggers	select CRYPTO_ALGAPI2
916a0fcbb4SHerbert Xu
926a0fcbb4SHerbert Xuconfig CRYPTO_HASH
935cde0af2SHerbert Xu	tristate
94055bcee3SHerbert Xu	select CRYPTO_HASH2
95055bcee3SHerbert Xu	select CRYPTO_ALGAPI
966a0fcbb4SHerbert Xu
97055bcee3SHerbert Xuconfig CRYPTO_HASH2
98055bcee3SHerbert Xu	tristate
996a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
1006a0fcbb4SHerbert Xu
1016a0fcbb4SHerbert Xuconfig CRYPTO_RNG
1026a0fcbb4SHerbert Xu	tristate
10317f0f4a4SNeil Horman	select CRYPTO_RNG2
10417f0f4a4SNeil Horman	select CRYPTO_ALGAPI
1056a0fcbb4SHerbert Xu
10617f0f4a4SNeil Hormanconfig CRYPTO_RNG2
10717f0f4a4SNeil Horman	tristate
1086a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
1096a0fcbb4SHerbert Xu
1106a0fcbb4SHerbert Xuconfig CRYPTO_AKCIPHER2
1116a0fcbb4SHerbert Xu	tristate
112401e4238SHerbert Xu	select CRYPTO_ALGAPI2
113401e4238SHerbert Xu
114401e4238SHerbert Xuconfig CRYPTO_AKCIPHER
115401e4238SHerbert Xu	tristate
1163c339ab8STadeusz Struk	select CRYPTO_AKCIPHER2
1173c339ab8STadeusz Struk	select CRYPTO_ALGAPI
1183c339ab8STadeusz Struk
1193c339ab8STadeusz Strukconfig CRYPTO_KPP2
1203c339ab8STadeusz Struk	tristate
1213c339ab8STadeusz Struk	select CRYPTO_ALGAPI2
1223c339ab8STadeusz Struk
1233c339ab8STadeusz Strukconfig CRYPTO_KPP
1243c339ab8STadeusz Struk	tristate
1254e5f2c40SSalvatore Benedetto	select CRYPTO_ALGAPI
1264e5f2c40SSalvatore Benedetto	select CRYPTO_KPP2
1274e5f2c40SSalvatore Benedetto
1284e5f2c40SSalvatore Benedettoconfig CRYPTO_ACOMP2
1294e5f2c40SSalvatore Benedetto	tristate
1304e5f2c40SSalvatore Benedetto	select CRYPTO_ALGAPI2
1314e5f2c40SSalvatore Benedetto	select SGL_ALLOC
1324e5f2c40SSalvatore Benedetto
1334e5f2c40SSalvatore Benedettoconfig CRYPTO_ACOMP
1342ebda74fSGiovanni Cabiddu	tristate
1352ebda74fSGiovanni Cabiddu	select CRYPTO_ALGAPI
1362ebda74fSGiovanni Cabiddu	select CRYPTO_ACOMP2
1378cd579d2SBart Van Assche
1382ebda74fSGiovanni Cabidduconfig CRYPTO_MANAGER
1392ebda74fSGiovanni Cabiddu	tristate
1402ebda74fSGiovanni Cabiddu	default CRYPTO_ALGAPI if CRYPTO_SELFTESTS
1412ebda74fSGiovanni Cabiddu	select CRYPTO_MANAGER2
1422ebda74fSGiovanni Cabiddu	help
1432ebda74fSGiovanni Cabiddu	  This provides the support for instantiating templates such as
1443241cd0cSHannes Reinecke	  cbc(aes), and the support for the crypto self-tests.
1453241cd0cSHannes Reinecke
14640b99697SEric Biggersconfig CRYPTO_MANAGER2
14740b99697SEric Biggers	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
1483241cd0cSHannes Reinecke	select CRYPTO_ACOMP2 if CRYPTO_SELFTESTS
1493241cd0cSHannes Reinecke	select CRYPTO_AEAD2 if CRYPTO_SELFTESTS
1502b8c19dbSHerbert Xu	select CRYPTO_AKCIPHER2 if CRYPTO_SELFTESTS
1516f9d0f53SEric Biggers	select CRYPTO_SIG2 if CRYPTO_SELFTESTS
15257999ed1SEric Biggers	select CRYPTO_HASH2 if CRYPTO_SELFTESTS
1536a0fcbb4SHerbert Xu	select CRYPTO_KPP2 if CRYPTO_SELFTESTS
1542b8c19dbSHerbert Xu	select CRYPTO_RNG2 if CRYPTO_SELFTESTS
15557999ed1SEric Biggers	select CRYPTO_SKCIPHER2 if CRYPTO_SELFTESTS
15657999ed1SEric Biggers
1572b8c19dbSHerbert Xuconfig CRYPTO_USER
1586a0fcbb4SHerbert Xu	tristate "Userspace cryptographic algorithm configuration"
1596a0fcbb4SHerbert Xu	depends on NET
1602ebda74fSGiovanni Cabiddu	select CRYPTO_MANAGER
161fb28fabfSHerbert Xu	select CRYPTO_RNG
162fb28fabfSHerbert Xu	help
1636cb8815fSHerbert Xu	  Userspace configuration for cryptographic instantiations such as
164fb28fabfSHerbert Xu	  cbc(aes).
165fb28fabfSHerbert Xu
166fb28fabfSHerbert Xuconfig CRYPTO_SELFTESTS
167fb28fabfSHerbert Xu	bool "Enable cryptographic self-tests"
1686a0fcbb4SHerbert Xu	depends on EXPERT
169a38f7907SSteffen Klassert	help
170a38f7907SSteffen Klassert	  Enable the cryptographic self-tests.
1715db017aaSHerbert Xu
172a38f7907SSteffen Klassert	  The cryptographic self-tests run at boot time, or at algorithm
173a38f7907SSteffen Klassert	  registration time if algorithms are dynamically loaded later.
174d19978f5SValdis.Kletnieks@vt.edu
175a38f7907SSteffen Klassert	  There are two main use cases for these tests:
176a38f7907SSteffen Klassert
17740b99697SEric Biggers	  - Development and pre-release testing.  In this case, also enable
17840b99697SEric 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.
1800b767f96SAlexander Shishkin
18140b99697SEric Biggers	  - Production kernels, to help prevent buggy drivers from being used
18240b99697SEric Biggers	    and/or meet FIPS 140-3 pre-operational testing requirements.  In
18340b99697SEric Biggers	    this case, enable CRYPTO_SELFTESTS but not CRYPTO_SELFTESTS_FULL.
18440b99697SEric Biggers
18540b99697SEric 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.
195ac90aad0SEric Biggers
196ac90aad0SEric Biggersconfig CRYPTO_NULL
197ac90aad0SEric Biggers	tristate "Null algorithms"
198ac90aad0SEric Biggers	select CRYPTO_ALGAPI
199ac90aad0SEric Biggers	select CRYPTO_SKCIPHER
200ac90aad0SEric Biggers	select CRYPTO_HASH
201ac90aad0SEric Biggers	help
202ac90aad0SEric Biggers	  These are 'Null' algorithms, used by IPsec, which do nothing.
203ac90aad0SEric Biggers
204ac90aad0SEric Biggersconfig CRYPTO_PCRYPT
205ac90aad0SEric Biggers	tristate "Parallel crypto engine"
2060b767f96SAlexander Shishkin	depends on SMP
207584fffc8SSebastian Siewior	select PADATA
208584fffc8SSebastian Siewior	select CRYPTO_MANAGER
209bde39305SEric Biggers	select CRYPTO_AEAD
210bde39305SEric Biggers	help
211bde39305SEric Biggers	  This converts an arbitrary crypto algorithm into a parallel
212584fffc8SSebastian Siewior	  algorithm that executes in kernel threads.
213584fffc8SSebastian Siewior
214584fffc8SSebastian Siewiorconfig CRYPTO_CRYPTD
2155068c7a8SSteffen Klassert	tristate "Software async crypto daemon"
2163b4afaf2SKees Cook	select CRYPTO_AEAD
2173b4afaf2SKees Cook	select CRYPTO_SKCIPHER
2185068c7a8SSteffen Klassert	select CRYPTO_HASH
2195068c7a8SSteffen Klassert	select CRYPTO_MANAGER
2205068c7a8SSteffen Klassert	help
2215068c7a8SSteffen Klassert	  This is a generic software asynchronous crypto daemon that
2225068c7a8SSteffen Klassert	  converts an arbitrary synchronous software crypto algorithm
2235068c7a8SSteffen Klassert	  into an asynchronous algorithm that executes in a kernel thread.
2245068c7a8SSteffen Klassert
225584fffc8SSebastian Siewiorconfig CRYPTO_AUTHENC
226584fffc8SSebastian Siewior	tristate "Authenc support"
227b95bba5dSEric Biggers	select CRYPTO_AEAD
228b8a28251SLoc Ho	select CRYPTO_SKCIPHER
229584fffc8SSebastian Siewior	select CRYPTO_MANAGER
230584fffc8SSebastian Siewior	select CRYPTO_HASH
231584fffc8SSebastian Siewior	help
232584fffc8SSebastian Siewior	  Authenc: Combined mode wrapper for IPsec.
233584fffc8SSebastian Siewior
234584fffc8SSebastian Siewior	  This is required for IPSec ESP (XFRM_ESP).
235584fffc8SSebastian Siewior
236584fffc8SSebastian Siewiorconfig CRYPTO_KRB5ENC
237584fffc8SSebastian Siewior	tristate "Kerberos 5 combined hash+cipher support"
238b95bba5dSEric Biggers	select CRYPTO_AEAD
239584fffc8SSebastian Siewior	select CRYPTO_SKCIPHER
240584fffc8SSebastian Siewior	select CRYPTO_MANAGER
241584fffc8SSebastian Siewior	select CRYPTO_HASH
242584fffc8SSebastian Siewior	help
243cf514b2aSRobert Elliott	  Combined hash and cipher support for Kerberos 5 RFC3961 simplified
244cf514b2aSRobert Elliott	  profile.  This is required for Kerberos 5-style encryption, used by
245584fffc8SSebastian Siewior	  sunrpc/NFS and rxrpc/AFS.
246d1775a17SDavid Howells
247d1775a17SDavid Howellsconfig CRYPTO_BENCHMARK
248d1775a17SDavid Howells	tristate "Crypto benchmarking module"
249d1775a17SDavid Howells	depends on m || EXPERT
250d1775a17SDavid Howells	select CRYPTO_AEAD
251d1775a17SDavid Howells	select CRYPTO_HASH
252d1775a17SDavid Howells	select CRYPTO_MANAGER
253d1775a17SDavid Howells	select CRYPTO_SKCIPHER
254d1775a17SDavid Howells	help
255d1775a17SDavid Howells	  Quick & dirty crypto benchmarking module.
256d1775a17SDavid Howells
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
25900ea27f1SArd Biesheuvel	  kernels.
260da7f033dSHerbert Xu
261584fffc8SSebastian Siewiorconfig CRYPTO_SIMD
2623357b6c9SEric Biggers	tristate
2633357b6c9SEric Biggers	select CRYPTO_AEAD
2643357b6c9SEric Biggers	select CRYPTO_CRYPTD
2653357b6c9SEric Biggers
2663357b6c9SEric Biggersconfig CRYPTO_ENGINE
267584fffc8SSebastian Siewior	tristate
268266d0516SHerbert Xu	select CRYPTO_AEAD
269266d0516SHerbert Xu	select CRYPTO_AKCIPHER
270266d0516SHerbert Xu	select CRYPTO_HASH
271266d0516SHerbert Xu	select CRYPTO_KPP
272735d37b5SBaolin Wang	select CRYPTO_SKCIPHER
273735d37b5SBaolin Wang
274735d37b5SBaolin Wangendmenu
275f1f142adSRobert Elliott
276f1f142adSRobert Elliottmenu "Public-key cryptography"
277f1f142adSRobert Elliott
2783d6228a5SVitaly Chikunovconfig CRYPTO_RSA
2793d6228a5SVitaly Chikunov	tristate "RSA (Rivest-Shamir-Adleman)"
28005b37465SRobert Elliott	select CRYPTO_AKCIPHER
2813d6228a5SVitaly Chikunov	select CRYPTO_MANAGER
2823d6228a5SVitaly Chikunov	select CRYPTO_SIG
2831e562deaSLukas Wunner	select MPILIB
2843d6228a5SVitaly Chikunov	select ASN1
2853d6228a5SVitaly Chikunov	help
2863d6228a5SVitaly Chikunov	  RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
28705b37465SRobert Elliott
2883d6228a5SVitaly Chikunovconfig CRYPTO_DH
2893d6228a5SVitaly Chikunov	tristate "DH (Diffie-Hellman)"
29005b37465SRobert Elliott	select CRYPTO_KPP
2913d6228a5SVitaly Chikunov	select MPILIB
2923d6228a5SVitaly Chikunov	help
2933d6228a5SVitaly Chikunov	  DH (Diffie-Hellman) key exchange algorithm
29405b37465SRobert Elliott
2953d6228a5SVitaly Chikunovconfig CRYPTO_DH_RFC7919_GROUPS
2967dce5981SNicolai Stange	bool "RFC 7919 FFDHE groups"
29705b37465SRobert Elliott	depends on CRYPTO_DH
2987dce5981SNicolai Stange	help
2991e207964SNicolai Stange	  FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
3007dce5981SNicolai Stange	  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.
30605b37465SRobert Elliott
30705b37465SRobert Elliottconfig CRYPTO_ECC
3087dce5981SNicolai Stange	tristate
3094a2289daSVitaly Chikunov
3104a2289daSVitaly Chikunovconfig CRYPTO_ECDH
31138aa192aSArnd Bergmann	tristate "ECDH (Elliptic Curve Diffie-Hellman)"
3124a2289daSVitaly Chikunov	select CRYPTO_ECC
3133d6228a5SVitaly Chikunov	select CRYPTO_KPP
31405b37465SRobert Elliott	help
3154a2289daSVitaly Chikunov	  ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
3163d6228a5SVitaly Chikunov	  using curves P-192, P-256, and P-384 (FIPS 186)
3173d6228a5SVitaly Chikunov
31805b37465SRobert Elliottconfig CRYPTO_ECDSA
31905b37465SRobert Elliott	tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
3203d6228a5SVitaly Chikunov	select CRYPTO_ECC
3214e660291SStefan Berger	select CRYPTO_SIG
32205b37465SRobert Elliott	select ASN1
3234e660291SStefan Berger	help
324ef132350SLukas Wunner	  ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
3254e660291SStefan Berger	  ISO/IEC 14888-3)
3264e660291SStefan Berger	  using curves P-192, P-256, P-384 and P-521
32705b37465SRobert Elliott
32805b37465SRobert Elliott	  Only signature verification is implemented.
32991790c7aSLukas Wunner
33005b37465SRobert Elliottconfig CRYPTO_ECRDSA
33105b37465SRobert Elliott	tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
3324e660291SStefan Berger	select CRYPTO_ECC
3330d7a7864SVitaly Chikunov	select CRYPTO_SIG
33405b37465SRobert Elliott	select CRYPTO_STREEBOG
3350d7a7864SVitaly Chikunov	select OID_REGISTRY
336ae117924SLukas Wunner	select ASN1
3370d7a7864SVitaly Chikunov	help
3381036633eSVitaly Chikunov	  Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
3391036633eSVitaly Chikunov	  RFC 7091, ISO/IEC 14888-3)
3400d7a7864SVitaly Chikunov
3410d7a7864SVitaly Chikunov	  One of the Russian cryptographic standard algorithms (called GOST
34205b37465SRobert Elliott	  algorithms). Only signature verification is implemented.
34305b37465SRobert Elliott
34405b37465SRobert Elliottconfig CRYPTO_MLDSA
34505b37465SRobert Elliott	tristate "ML-DSA (Module-Lattice-Based Digital Signature Algorithm)"
3460d7a7864SVitaly Chikunov	select CRYPTO_SIG
347*d3b6dd90SDavid Howells	select CRYPTO_LIB_MLDSA
348*d3b6dd90SDavid Howells	help
349*d3b6dd90SDavid Howells	  ML-DSA (Module-Lattice-Based Digital Signature Algorithm) (FIPS-204).
350*d3b6dd90SDavid Howells
351*d3b6dd90SDavid Howells	  Only signature verification is implemented.
352*d3b6dd90SDavid Howells
353*d3b6dd90SDavid Howellsendmenu
354*d3b6dd90SDavid Howells
355*d3b6dd90SDavid Howellsmenu "Block ciphers"
356f1f142adSRobert Elliott
357584fffc8SSebastian Siewiorconfig CRYPTO_AES
358f1f142adSRobert Elliott	tristate "AES (Advanced Encryption Standard)"
3591da177e4SLinus Torvalds	select CRYPTO_ALGAPI
3601da177e4SLinus Torvalds	select CRYPTO_LIB_AES
361cf514b2aSRobert Elliott	select CRYPTO_LIB_AES_CBC_MACS if CRYPTO_CMAC || CRYPTO_XCBC || CRYPTO_CCM
362cce9e06dSHerbert Xu	select CRYPTO_HASH if CRYPTO_CMAC || CRYPTO_XCBC || CRYPTO_CCM
3635bb12d78SArd Biesheuvel	help
3641da177e4SLinus Torvalds	  AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
365cf514b2aSRobert Elliott
3661da177e4SLinus Torvalds	  Rijndael appears to be consistently a very good performer in
3671da177e4SLinus Torvalds	  both hardware and software across a wide range of computing
3681da177e4SLinus Torvalds	  environments regardless of its use in feedback or non-feedback
3691da177e4SLinus Torvalds	  modes. Its key setup time is excellent, and its key agility is
3701da177e4SLinus Torvalds	  good. Rijndael's very low memory requirements make it very well
3711da177e4SLinus Torvalds	  suited for restricted-space environments, in which it also
3721da177e4SLinus Torvalds	  demonstrates excellent performance. Rijndael's operations are
3731da177e4SLinus Torvalds	  among the easiest to defend against power and timing attacks.
3741da177e4SLinus Torvalds
3751da177e4SLinus Torvalds	  The AES specifies three key sizes: 128, 192 and 256 bits
3761da177e4SLinus Torvalds
3771da177e4SLinus Torvaldsconfig CRYPTO_ANUBIS
3781da177e4SLinus Torvalds	tristate "Anubis"
379cf514b2aSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
3801674aea5SArd Biesheuvel	select CRYPTO_ALGAPI
381cce9e06dSHerbert Xu	help
3821da177e4SLinus Torvalds	  Anubis cipher algorithm
383cf514b2aSRobert Elliott
3841da177e4SLinus Torvalds	  Anubis is a variable key length cipher which can use keys from
3851da177e4SLinus Torvalds	  128 bits to 320 bits in length.  It was evaluated as a entrant
3861da177e4SLinus Torvalds	  in the NESSIE competition.
3871da177e4SLinus Torvalds
3881da177e4SLinus Torvalds	  See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html
389cf514b2aSRobert Elliott	  for further information.
390cf514b2aSRobert Elliott
3911da177e4SLinus Torvaldsconfig CRYPTO_ARIA
392f1f142adSRobert Elliott	tristate "ARIA"
393cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
394f1f142adSRobert Elliott	help
395e2ee95b8SHye-Shik Chang	  ARIA cipher algorithm (RFC5794)
396cf514b2aSRobert Elliott
397e2ee95b8SHye-Shik Chang	  ARIA is a standard encryption algorithm of the Republic of Korea.
398f1f142adSRobert Elliott	  The ARIA specifies three key sizes and rounds.
399f1f142adSRobert Elliott	  128-bit: 12 rounds.
400f1f142adSRobert Elliott	  192-bit: 14 rounds.
401f1f142adSRobert Elliott	  256-bit: 16 rounds.
402f1f142adSRobert Elliott
403f1f142adSRobert Elliott	  See:
404cf514b2aSRobert Elliott	  https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do
405cf514b2aSRobert Elliott
406584fffc8SSebastian Siewiorconfig CRYPTO_BLOWFISH
407584fffc8SSebastian Siewior	tristate "Blowfish"
408cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
409584fffc8SSebastian Siewior	select CRYPTO_BLOWFISH_COMMON
41052ba867cSJussi Kivilinna	help
411584fffc8SSebastian Siewior	  Blowfish cipher algorithm, by Bruce Schneier
412cf514b2aSRobert Elliott
413584fffc8SSebastian Siewior	  This is a variable key length cipher which can use keys from 32
414584fffc8SSebastian Siewior	  bits to 448 bits in length.  It's fast, simple and specifically
415584fffc8SSebastian Siewior	  designed for use on "large microprocessors".
416584fffc8SSebastian Siewior
417e2ee95b8SHye-Shik Chang	  See https://www.schneier.com/blowfish.html for further information.
418cf514b2aSRobert Elliott
419584fffc8SSebastian Siewiorconfig CRYPTO_BLOWFISH_COMMON
42052ba867cSJussi Kivilinna	tristate
42152ba867cSJussi Kivilinna	help
42252ba867cSJussi Kivilinna	  Common parts of the Blowfish cipher algorithm shared by the
42352ba867cSJussi Kivilinna	  generic c and the assembler implementations.
42452ba867cSJussi Kivilinna
42552ba867cSJussi Kivilinnaconfig CRYPTO_CAMELLIA
426584fffc8SSebastian Siewior	tristate "Camellia"
427cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
428584fffc8SSebastian Siewior	help
429584fffc8SSebastian Siewior	  Camellia cipher algorithms (ISO/IEC 18033-3)
430cf514b2aSRobert Elliott
431584fffc8SSebastian Siewior	  Camellia is a symmetric key block cipher developed jointly
432584fffc8SSebastian Siewior	  at NTT and Mitsubishi Electric Corporation.
433584fffc8SSebastian Siewior
434584fffc8SSebastian Siewior	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
435584fffc8SSebastian Siewior
436584fffc8SSebastian Siewior	  See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information.
437cf514b2aSRobert Elliott
438584fffc8SSebastian Siewiorconfig CRYPTO_CAST_COMMON
439044ab525SJussi Kivilinna	tristate
440044ab525SJussi Kivilinna	help
441044ab525SJussi Kivilinna	  Common parts of the CAST cipher algorithms shared by the
442044ab525SJussi Kivilinna	  generic c and the assembler implementations.
443044ab525SJussi Kivilinna
444044ab525SJussi Kivilinnaconfig CRYPTO_CAST5
445584fffc8SSebastian Siewior	tristate "CAST5 (CAST-128)"
446cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
447584fffc8SSebastian Siewior	select CRYPTO_CAST_COMMON
448044ab525SJussi Kivilinna	help
449584fffc8SSebastian Siewior	  CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3)
450cf514b2aSRobert Elliott
451584fffc8SSebastian Siewiorconfig CRYPTO_CAST6
452584fffc8SSebastian Siewior	tristate "CAST6 (CAST-256)"
453cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
454584fffc8SSebastian Siewior	select CRYPTO_CAST_COMMON
455044ab525SJussi Kivilinna	help
456584fffc8SSebastian Siewior	  CAST6 (CAST-256) encryption algorithm (RFC2612)
457cf514b2aSRobert Elliott
458584fffc8SSebastian Siewiorconfig CRYPTO_DES
459584fffc8SSebastian Siewior	tristate "DES and Triple DES EDE"
460cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
461584fffc8SSebastian Siewior	select CRYPTO_LIB_DES
46204007b0eSArd Biesheuvel	help
463584fffc8SSebastian Siewior	  DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and
464cf514b2aSRobert Elliott	  Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3)
465cf514b2aSRobert Elliott	  cipher algorithms
466cf514b2aSRobert Elliott
467584fffc8SSebastian Siewiorconfig CRYPTO_FCRYPT
468584fffc8SSebastian Siewior	tristate "FCrypt"
469cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
470584fffc8SSebastian Siewior	select CRYPTO_SKCIPHER
471b95bba5dSEric Biggers	help
472584fffc8SSebastian Siewior	  FCrypt algorithm used by RxRPC
473cf514b2aSRobert Elliott
474cf514b2aSRobert Elliott	  See https://ota.polyonymo.us/fcrypt-paper.txt
475cf514b2aSRobert Elliott
476584fffc8SSebastian Siewiorconfig CRYPTO_KHAZAD
477584fffc8SSebastian Siewior	tristate "Khazad"
478cf514b2aSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
4791674aea5SArd Biesheuvel	select CRYPTO_ALGAPI
480584fffc8SSebastian Siewior	help
481584fffc8SSebastian Siewior	  Khazad cipher algorithm
482cf514b2aSRobert Elliott
483584fffc8SSebastian Siewior	  Khazad was a finalist in the initial NESSIE competition.  It is
484584fffc8SSebastian Siewior	  an algorithm optimized for 64-bit processors with good performance
485584fffc8SSebastian Siewior	  on 32-bit processors.  Khazad uses an 128 bit key size.
486584fffc8SSebastian Siewior
487584fffc8SSebastian Siewior	  See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
488cf514b2aSRobert Elliott	  for further information.
489cf514b2aSRobert Elliott
490e2ee95b8SHye-Shik Changconfig CRYPTO_SEED
491584fffc8SSebastian Siewior	tristate "SEED"
492cf514b2aSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
4931674aea5SArd Biesheuvel	select CRYPTO_ALGAPI
494584fffc8SSebastian Siewior	help
495584fffc8SSebastian Siewior	  SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
496cf514b2aSRobert Elliott
497584fffc8SSebastian Siewior	  SEED is a 128-bit symmetric key block cipher that has been
498584fffc8SSebastian Siewior	  developed by KISA (Korea Information Security Agency) as a
499584fffc8SSebastian Siewior	  national standard encryption algorithm of the Republic of Korea.
500584fffc8SSebastian Siewior	  It is a 16 round block cipher with the key size of 128 bit.
501584fffc8SSebastian Siewior
502584fffc8SSebastian Siewior	  See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
503cf514b2aSRobert Elliott	  for further information.
504cf514b2aSRobert Elliott
505584fffc8SSebastian Siewiorconfig CRYPTO_SERPENT
506584fffc8SSebastian Siewior	tristate "Serpent"
507cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
508584fffc8SSebastian Siewior	help
509584fffc8SSebastian Siewior	  Serpent cipher algorithm, by Anderson, Biham & Knudsen
510cf514b2aSRobert Elliott
511584fffc8SSebastian Siewior	  Keys are allowed to be from 0 to 256 bits in length, in steps
512584fffc8SSebastian Siewior	  of 8 bits.
513784506a1SArd Biesheuvel
514584fffc8SSebastian Siewior	  See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
515cf514b2aSRobert Elliott
516584fffc8SSebastian Siewiorconfig CRYPTO_SM4
517747c8ce4SGilad Ben-Yossef	tristate
518d2825fa9SJason A. Donenfeld
519d2825fa9SJason A. Donenfeldconfig CRYPTO_SM4_GENERIC
520d2825fa9SJason A. Donenfeld	tristate "SM4 (ShangMi 4)"
521cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
522747c8ce4SGilad Ben-Yossef	select CRYPTO_SM4
523d2825fa9SJason A. Donenfeld	help
524747c8ce4SGilad Ben-Yossef	  SM4 cipher algorithms (OSCCA GB/T 32907-2016,
525cf514b2aSRobert Elliott	  ISO/IEC 18033-3:2010/Amd 1:2021)
526cf514b2aSRobert Elliott
527747c8ce4SGilad Ben-Yossef	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
528747c8ce4SGilad Ben-Yossef	  Organization of State Commercial Administration of China (OSCCA)
529747c8ce4SGilad Ben-Yossef	  as an authorized cryptographic algorithms for the use within China.
530747c8ce4SGilad Ben-Yossef
531747c8ce4SGilad Ben-Yossef	  SMS4 was originally created for use in protecting wireless
532747c8ce4SGilad Ben-Yossef	  networks, and is mandated in the Chinese National Standard for
533747c8ce4SGilad Ben-Yossef	  Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
534747c8ce4SGilad Ben-Yossef	  (GB.15629.11-2003).
535747c8ce4SGilad Ben-Yossef
536747c8ce4SGilad Ben-Yossef	  The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
537747c8ce4SGilad Ben-Yossef	  standardized through TC 260 of the Standardization Administration
538747c8ce4SGilad Ben-Yossef	  of the People's Republic of China (SAC).
539747c8ce4SGilad Ben-Yossef
540747c8ce4SGilad Ben-Yossef	  The input, output, and key of SMS4 are each 128 bits.
541747c8ce4SGilad Ben-Yossef
542747c8ce4SGilad Ben-Yossef	  See https://eprint.iacr.org/2008/329.pdf for further information.
543cf514b2aSRobert Elliott
544747c8ce4SGilad Ben-Yossef	  If unsure, say N.
545747c8ce4SGilad Ben-Yossef
546747c8ce4SGilad Ben-Yossefconfig CRYPTO_TEA
547584fffc8SSebastian Siewior	tristate "TEA, XTEA and XETA"
548cf514b2aSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
5491674aea5SArd Biesheuvel	select CRYPTO_ALGAPI
550584fffc8SSebastian Siewior	help
551584fffc8SSebastian Siewior	  TEA (Tiny Encryption Algorithm) cipher algorithms
552cf514b2aSRobert Elliott
553584fffc8SSebastian Siewior	  Tiny Encryption Algorithm is a simple cipher that uses
554584fffc8SSebastian Siewior	  many rounds for security.  It is very fast and uses
555584fffc8SSebastian Siewior	  little memory.
556584fffc8SSebastian Siewior
557584fffc8SSebastian Siewior	  Xtendend Tiny Encryption Algorithm is a modification to
558584fffc8SSebastian Siewior	  the TEA algorithm to address a potential key weakness
559584fffc8SSebastian Siewior	  in the TEA algorithm.
560584fffc8SSebastian Siewior
561584fffc8SSebastian Siewior	  Xtendend Encryption Tiny Algorithm is a mis-implementation
562584fffc8SSebastian Siewior	  of the XTEA algorithm for compatibility purposes.
563584fffc8SSebastian Siewior
564584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH
565584fffc8SSebastian Siewior	tristate "Twofish"
566cf514b2aSRobert Elliott	select CRYPTO_ALGAPI
567584fffc8SSebastian Siewior	select CRYPTO_TWOFISH_COMMON
568584fffc8SSebastian Siewior	help
569584fffc8SSebastian Siewior	  Twofish cipher algorithm
570cf514b2aSRobert Elliott
571584fffc8SSebastian Siewior	  Twofish was submitted as an AES (Advanced Encryption Standard)
572584fffc8SSebastian Siewior	  candidate cipher by researchers at CounterPane Systems.  It is a
573584fffc8SSebastian Siewior	  16 round block cipher supporting key sizes of 128, 192, and 256
574584fffc8SSebastian Siewior	  bits.
575584fffc8SSebastian Siewior
576584fffc8SSebastian Siewior	  See https://www.schneier.com/twofish.html for further information.
577cf514b2aSRobert Elliott
578584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH_COMMON
579584fffc8SSebastian Siewior	tristate
580584fffc8SSebastian Siewior	help
581584fffc8SSebastian Siewior	  Common parts of the Twofish cipher algorithm shared by the
582584fffc8SSebastian Siewior	  generic c and the assembler implementations.
583584fffc8SSebastian Siewior
584584fffc8SSebastian Siewiorendmenu
585f1f142adSRobert Elliott
586f1f142adSRobert Elliottmenu "Length-preserving ciphers and modes"
587f1f142adSRobert Elliott
588f1f142adSRobert Elliottconfig CRYPTO_ADIANTUM
589f1f142adSRobert Elliott	tristate "Adiantum"
590cf514b2aSRobert Elliott	select CRYPTO_CHACHA20
591f1f142adSRobert Elliott	select CRYPTO_LIB_NH
59276987479SEric Biggers	select CRYPTO_LIB_POLY1305
593b646b782SEric Biggers	select CRYPTO_LIB_POLY1305_GENERIC
594f1f142adSRobert Elliott	select CRYPTO_MANAGER
595f1f142adSRobert Elliott	help
596f1f142adSRobert Elliott	  Adiantum tweakable, length-preserving encryption mode
597cf514b2aSRobert Elliott
598cf514b2aSRobert Elliott	  Designed for fast and secure disk encryption, especially on
599cf514b2aSRobert Elliott	  CPUs without dedicated crypto instructions.  It encrypts
600f1f142adSRobert Elliott	  each sector using the XChaCha12 stream cipher, two passes of
601f1f142adSRobert Elliott	  an ε-almost-∆-universal hash function, and an invocation of
602f1f142adSRobert Elliott	  the AES-256 block cipher on a single 16-byte block.  On CPUs
603f1f142adSRobert Elliott	  without AES instructions, Adiantum is much faster than
604f1f142adSRobert Elliott	  AES-XTS.
605f1f142adSRobert Elliott
606f1f142adSRobert Elliott	  Adiantum's security is provably reducible to that of its
607f1f142adSRobert Elliott	  underlying stream and block ciphers, subject to a security
608f1f142adSRobert Elliott	  bound.  Unlike XTS, Adiantum is a true wide-block encryption
609f1f142adSRobert Elliott	  mode, so it actually provides an even stronger notion of
610f1f142adSRobert Elliott	  security than XTS, subject to the security bound.
611f1f142adSRobert Elliott
612f1f142adSRobert Elliott	  If unsure, say N.
613f1f142adSRobert Elliott
614f1f142adSRobert Elliottconfig CRYPTO_ARC4
615f1f142adSRobert Elliott	tristate "ARC4 (Alleged Rivest Cipher 4)"
616cf514b2aSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
617f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
618f1f142adSRobert Elliott	select CRYPTO_LIB_ARC4
619f1f142adSRobert Elliott	help
620f1f142adSRobert Elliott	  ARC4 cipher algorithm
621cf514b2aSRobert Elliott
622f1f142adSRobert Elliott	  ARC4 is a stream cipher using keys ranging from 8 bits to 2048
623f1f142adSRobert Elliott	  bits in length.  This algorithm is required for driver-based
624f1f142adSRobert Elliott	  WEP, but it should not be for other purposes because of the
625f1f142adSRobert Elliott	  weakness of the algorithm.
626f1f142adSRobert Elliott
627f1f142adSRobert Elliottconfig CRYPTO_CHACHA20
628f1f142adSRobert Elliott	tristate "ChaCha"
629cf514b2aSRobert Elliott	select CRYPTO_LIB_CHACHA
630879f4754SEric Biggers	select CRYPTO_SKCIPHER
631f1f142adSRobert Elliott	help
632f1f142adSRobert Elliott	  The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
633cf514b2aSRobert Elliott
634f1f142adSRobert Elliott	  ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
635f1f142adSRobert Elliott	  Bernstein and further specified in RFC7539 for use in IETF protocols.
636f1f142adSRobert Elliott	  This is the portable C implementation of ChaCha20.  See
637cf514b2aSRobert Elliott	  https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
638cf514b2aSRobert Elliott
639f1f142adSRobert Elliott	  XChaCha20 is the application of the XSalsa20 construction to ChaCha20
640f1f142adSRobert Elliott	  rather than to Salsa20.  XChaCha20 extends ChaCha20's nonce length
641f1f142adSRobert Elliott	  from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
642f1f142adSRobert Elliott	  while provably retaining ChaCha20's security.  See
643cf514b2aSRobert Elliott	  https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
644cf514b2aSRobert Elliott
645f1f142adSRobert Elliott	  XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
646f1f142adSRobert Elliott	  reduced security margin but increased performance.  It can be needed
647f1f142adSRobert Elliott	  in some performance-sensitive scenarios.
648f1f142adSRobert Elliott
649f1f142adSRobert Elliottconfig CRYPTO_CBC
650f1f142adSRobert Elliott	tristate "CBC (Cipher Block Chaining)"
651cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
652f1f142adSRobert Elliott	select CRYPTO_MANAGER
653f1f142adSRobert Elliott	help
654f1f142adSRobert Elliott	  CBC (Cipher Block Chaining) mode (NIST SP800-38A)
655cf514b2aSRobert Elliott
656cf514b2aSRobert Elliott	  This block cipher mode is required for IPSec ESP (XFRM_ESP).
657cf514b2aSRobert Elliott
658f1f142adSRobert Elliottconfig CRYPTO_CTR
659f1f142adSRobert Elliott	tristate "CTR (Counter)"
660cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
661f1f142adSRobert Elliott	select CRYPTO_MANAGER
662f1f142adSRobert Elliott	help
663f1f142adSRobert Elliott	  CTR (Counter) mode (NIST SP800-38A)
664cf514b2aSRobert Elliott
665f1f142adSRobert Elliottconfig CRYPTO_CTS
666f1f142adSRobert Elliott	tristate "CTS (Cipher Text Stealing)"
667cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
668f1f142adSRobert Elliott	select CRYPTO_MANAGER
669f1f142adSRobert Elliott	help
670f1f142adSRobert Elliott	  CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
671cf514b2aSRobert Elliott	  Addendum to SP800-38A (October 2010))
672cf514b2aSRobert Elliott
673cf514b2aSRobert Elliott	  This mode is required for Kerberos gss mechanism support
674f1f142adSRobert Elliott	  for AES encryption.
675f1f142adSRobert Elliott
676f1f142adSRobert Elliottconfig CRYPTO_ECB
677f1f142adSRobert Elliott	tristate "ECB (Electronic Codebook)"
678cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER2
67984534684SHerbert Xu	select CRYPTO_MANAGER
680f1f142adSRobert Elliott	help
681f1f142adSRobert Elliott	  ECB (Electronic Codebook) mode (NIST SP800-38A)
682cf514b2aSRobert Elliott
683f1f142adSRobert Elliottconfig CRYPTO_HCTR2
684f1f142adSRobert Elliott	tristate "HCTR2"
685cf514b2aSRobert Elliott	select CRYPTO_XCTR
686f1f142adSRobert Elliott	select CRYPTO_LIB_GF128HASH
687d35abc0bSEric Biggers	select CRYPTO_MANAGER
688f1f142adSRobert Elliott	help
689f1f142adSRobert Elliott	  HCTR2 length-preserving encryption mode
690cf514b2aSRobert Elliott
691cf514b2aSRobert Elliott	  A mode for storage encryption that is efficient on processors with
692cf514b2aSRobert Elliott	  instructions to accelerate AES and carryless multiplication, e.g.
693cf514b2aSRobert Elliott	  x86 processors with AES-NI and CLMUL, and ARM processors with the
694cf514b2aSRobert Elliott	  ARMv8 crypto extensions.
695cf514b2aSRobert Elliott
696cf514b2aSRobert Elliott	  See https://eprint.iacr.org/2021/1441
697cf514b2aSRobert Elliott
698f1f142adSRobert Elliottconfig CRYPTO_LRW
699f1f142adSRobert Elliott	tristate "LRW (Liskov Rivest Wagner)"
700cf514b2aSRobert Elliott	select CRYPTO_LIB_GF128MUL
70161c581a4SArd Biesheuvel	select CRYPTO_SKCIPHER
702f1f142adSRobert Elliott	select CRYPTO_MANAGER
703f1f142adSRobert Elliott	select CRYPTO_ECB
704f1f142adSRobert Elliott	help
705f1f142adSRobert Elliott	  LRW (Liskov Rivest Wagner) mode
706cf514b2aSRobert Elliott
707cf514b2aSRobert Elliott	  A tweakable, non malleable, non movable
708cf514b2aSRobert Elliott	  narrow block cipher mode for dm-crypt.  Use it with cipher
709f1f142adSRobert Elliott	  specification string aes-lrw-benbi, the key must be 256, 320 or 384.
710f1f142adSRobert Elliott	  The first 128, 192 or 256 bits in the key are used for AES and the
711f1f142adSRobert Elliott	  rest is used to tie each cipher block to its logical position.
712f1f142adSRobert Elliott
713f1f142adSRobert Elliott	  See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
714cf514b2aSRobert Elliott
715cf514b2aSRobert Elliottconfig CRYPTO_PCBC
716f1f142adSRobert Elliott	tristate "PCBC (Propagating Cipher Block Chaining)"
717cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
718f1f142adSRobert Elliott	select CRYPTO_MANAGER
719f1f142adSRobert Elliott	help
720f1f142adSRobert Elliott	  PCBC (Propagating Cipher Block Chaining) mode
721cf514b2aSRobert Elliott
722cf514b2aSRobert Elliott	  This block cipher mode is required for RxRPC.
723cf514b2aSRobert Elliott
724f1f142adSRobert Elliottconfig CRYPTO_XCTR
725f1f142adSRobert Elliott	tristate
726f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
727f1f142adSRobert Elliott	select CRYPTO_MANAGER
728f1f142adSRobert Elliott	help
729f1f142adSRobert Elliott	  XCTR (XOR Counter) mode for HCTR2
730cf514b2aSRobert Elliott
731cf514b2aSRobert Elliott	  This blockcipher mode is a variant of CTR mode using XORs and little-endian
732cf514b2aSRobert Elliott	  addition rather than big-endian arithmetic.
733cf514b2aSRobert Elliott
734cf514b2aSRobert Elliott	  XCTR mode is used to implement HCTR2.
735f1f142adSRobert Elliott
736f1f142adSRobert Elliottconfig CRYPTO_XTS
737f1f142adSRobert Elliott	tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
738cf514b2aSRobert Elliott	select CRYPTO_SKCIPHER
739f1f142adSRobert Elliott	select CRYPTO_MANAGER
740f1f142adSRobert Elliott	select CRYPTO_ECB
741f1f142adSRobert Elliott	help
742f1f142adSRobert Elliott	  XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
743cf514b2aSRobert Elliott	  and IEEE 1619)
744cf514b2aSRobert Elliott
745cf514b2aSRobert Elliott	  Use with aes-xts-plain, key size 256, 384 or 512 bits. This
746cf514b2aSRobert Elliott	  implementation currently can't handle a sectorsize which is not a
747cf514b2aSRobert Elliott	  multiple of 16 bytes.
748cf514b2aSRobert Elliott
749f1f142adSRobert Elliottendmenu
750f1f142adSRobert Elliott
751f1f142adSRobert Elliottmenu "AEAD (authenticated encryption with associated data) ciphers"
752f1f142adSRobert Elliott
753f1f142adSRobert Elliottconfig CRYPTO_AEGIS128
754f1f142adSRobert Elliott	tristate "AEGIS-128"
755e3d2eaddSRobert Elliott	select CRYPTO_AEAD
756f1f142adSRobert Elliott	select CRYPTO_LIB_AES  # for AES S-box tables
757637e73efSEric Biggers	help
758f1f142adSRobert Elliott	  AEGIS-128 AEAD algorithm
759e3d2eaddSRobert Elliott
760f1f142adSRobert Elliottconfig CRYPTO_AEGIS128_SIMD
761f1f142adSRobert Elliott	bool "AEGIS-128 (arm NEON, arm64 NEON)"
762e3d2eaddSRobert Elliott	depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
763f1f142adSRobert Elliott	default y
764f1f142adSRobert Elliott	help
765e3d2eaddSRobert Elliott	  AEGIS-128 AEAD algorithm
766e3d2eaddSRobert Elliott
767e3d2eaddSRobert Elliott	  Architecture: arm or arm64 using:
768e3d2eaddSRobert Elliott	  - NEON (Advanced SIMD) extension
769e3d2eaddSRobert Elliott
770f1f142adSRobert Elliottconfig CRYPTO_CHACHA20POLY1305
771f1f142adSRobert Elliott	tristate "ChaCha20-Poly1305"
772e3d2eaddSRobert Elliott	select CRYPTO_CHACHA20
773f1f142adSRobert Elliott	select CRYPTO_AEAD
774f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305
775a298765eSHerbert Xu	select CRYPTO_MANAGER
776f1f142adSRobert Elliott	help
777f1f142adSRobert Elliott	  ChaCha20 stream cipher and Poly1305 authenticator combined
778e3d2eaddSRobert Elliott	  mode (RFC8439)
779e3d2eaddSRobert Elliott
780f1f142adSRobert Elliottconfig CRYPTO_CCM
781f1f142adSRobert Elliott	tristate "CCM (Counter with Cipher Block Chaining-MAC)"
782cf514b2aSRobert Elliott	select CRYPTO_CTR
783f1f142adSRobert Elliott	select CRYPTO_HASH
784f1f142adSRobert Elliott	select CRYPTO_AEAD
785f1f142adSRobert Elliott	select CRYPTO_MANAGER
786f1f142adSRobert Elliott	help
787f1f142adSRobert Elliott	  CCM (Counter with Cipher Block Chaining-Message Authentication Code)
788e3d2eaddSRobert Elliott	  authenticated encryption mode (NIST SP800-38C)
789e3d2eaddSRobert Elliott
790f1f142adSRobert Elliottconfig CRYPTO_GCM
791f1f142adSRobert Elliott	tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
792cf514b2aSRobert Elliott	select CRYPTO_CTR
793f1f142adSRobert Elliott	select CRYPTO_AEAD
794f1f142adSRobert Elliott	select CRYPTO_LIB_GF128HASH
795f1f142adSRobert Elliott	select CRYPTO_MANAGER
796f1f142adSRobert Elliott	help
797f1f142adSRobert Elliott	  GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
798e3d2eaddSRobert Elliott	  (GCM Message Authentication Code) (NIST SP800-38D)
799e3d2eaddSRobert Elliott
800e3d2eaddSRobert Elliott	  This is required for IPSec ESP (XFRM_ESP).
801e3d2eaddSRobert Elliott
802f1f142adSRobert Elliottconfig CRYPTO_GENIV
803ba51738fSHerbert Xu	tristate
804ba51738fSHerbert Xu	select CRYPTO_AEAD
805ba51738fSHerbert Xu	select CRYPTO_MANAGER
806ba51738fSHerbert Xu
807ba51738fSHerbert Xuconfig CRYPTO_SEQIV
808ba51738fSHerbert Xu	tristate "Sequence Number IV Generator"
809f1f142adSRobert Elliott	select CRYPTO_GENIV
810f1f142adSRobert Elliott	help
811ba51738fSHerbert Xu	  Sequence Number IV generator
812f1f142adSRobert Elliott
813e3d2eaddSRobert Elliott	  This IV generator generates an IV based on a sequence number by
814e3d2eaddSRobert Elliott	  xoring it with a salt.  This algorithm is mainly useful for CTR.
815f1f142adSRobert Elliott
816e3d2eaddSRobert Elliott	  This is required for IPsec ESP (XFRM_ESP).
817e3d2eaddSRobert Elliott
818e3d2eaddSRobert Elliottconfig CRYPTO_ECHAINIV
819f1f142adSRobert Elliott	tristate "Encrypted Chain IV Generator"
820f1f142adSRobert Elliott	select CRYPTO_GENIV
821f1f142adSRobert Elliott	help
822ba51738fSHerbert Xu	  Encrypted Chain IV generator
823f1f142adSRobert Elliott
824e3d2eaddSRobert Elliott	  This IV generator generates an IV based on the encryption of
825e3d2eaddSRobert Elliott	  a sequence number xored with a salt.  This is the default
826f1f142adSRobert Elliott	  algorithm for CBC.
827f1f142adSRobert Elliott
828f1f142adSRobert Elliottconfig CRYPTO_ESSIV
829f1f142adSRobert Elliott	tristate "Encrypted Salt-Sector IV Generator"
830f1f142adSRobert Elliott	select CRYPTO_AUTHENC
831e3d2eaddSRobert Elliott	help
832f1f142adSRobert Elliott	  Encrypted Salt-Sector IV generator
833f1f142adSRobert Elliott
834e3d2eaddSRobert Elliott	  This IV generator is used in some cases by fscrypt and/or
835e3d2eaddSRobert Elliott	  dm-crypt. It uses the hash of the block encryption key as the
836e3d2eaddSRobert Elliott	  symmetric key for a block encryption pass applied to the input
837f1f142adSRobert Elliott	  IV, making low entropy IV sources more suitable for block
838f1f142adSRobert Elliott	  encryption.
839f1f142adSRobert Elliott
840f1f142adSRobert Elliott	  This driver implements a crypto API template that can be
841f1f142adSRobert Elliott	  instantiated either as an skcipher or as an AEAD (depending on the
842f1f142adSRobert Elliott	  type of the first template argument), and which defers encryption
843f1f142adSRobert Elliott	  and decryption requests to the encapsulated cipher after applying
844f1f142adSRobert Elliott	  ESSIV to the input IV. Note that in the AEAD case, it is assumed
845f1f142adSRobert Elliott	  that the keys are presented in the same format used by the authenc
846f1f142adSRobert Elliott	  template, and that the IV appears at the end of the authenticated
847f1f142adSRobert Elliott	  associated data (AAD) region (which is how dm-crypt uses it.)
848f1f142adSRobert Elliott
849f1f142adSRobert Elliott	  Note that the use of ESSIV is not recommended for new deployments,
850f1f142adSRobert Elliott	  and so this only needs to be enabled when interoperability with
851f1f142adSRobert Elliott	  existing encrypted volumes of filesystems is required, or when
852f1f142adSRobert Elliott	  building for a particular system that requires it (e.g., when
853f1f142adSRobert Elliott	  the SoC in question has accelerated CBC but not XTS, making CBC
854f1f142adSRobert Elliott	  combined with ESSIV the only feasible mode for h/w accelerated
855f1f142adSRobert Elliott	  block encryption)
856f1f142adSRobert Elliott
857f1f142adSRobert Elliottendmenu
858f1f142adSRobert Elliott
859f1f142adSRobert Elliottmenu "Hashes, digests, and MACs"
860f1f142adSRobert Elliott
861f1f142adSRobert Elliottconfig CRYPTO_BLAKE2B
862f1f142adSRobert Elliott	tristate "BLAKE2b"
863f1f142adSRobert Elliott	select CRYPTO_HASH
8643f342a23SRobert Elliott	select CRYPTO_LIB_BLAKE2B
865f1f142adSRobert Elliott	help
866fa3ca9bfSEric Biggers	  BLAKE2b cryptographic hash function (RFC 7693)
867f1f142adSRobert Elliott
8683f342a23SRobert Elliott	  BLAKE2b is optimized for 64-bit platforms and can produce digests
8693f342a23SRobert Elliott	  of any size between 1 and 64 bytes. The keyed hash is also implemented.
8703f342a23SRobert Elliott
8713f342a23SRobert Elliott	  This module provides the following algorithms:
872f1f142adSRobert Elliott	  - blake2b-160
873f1f142adSRobert Elliott	  - blake2b-256
874f1f142adSRobert Elliott	  - blake2b-384
875f1f142adSRobert Elliott	  - blake2b-512
876f1f142adSRobert Elliott
877f1f142adSRobert Elliott	  See https://blake2.net for further information.
878f1f142adSRobert Elliott
8793f342a23SRobert Elliottconfig CRYPTO_CMAC
8803f342a23SRobert Elliott	tristate "CMAC (Cipher-based MAC)"
881f1f142adSRobert Elliott	select CRYPTO_HASH
8823f342a23SRobert Elliott	select CRYPTO_MANAGER
883f1f142adSRobert Elliott	help
884f1f142adSRobert Elliott	  CMAC (Cipher-based Message Authentication Code) authentication
885f1f142adSRobert Elliott	  mode (NIST SP800-38B and IETF RFC4493)
8863f342a23SRobert Elliott
8873f342a23SRobert Elliottconfig CRYPTO_HMAC
888f1f142adSRobert Elliott	tristate "HMAC (Keyed-Hash MAC)"
889f1f142adSRobert Elliott	select CRYPTO_HASH
8903f342a23SRobert Elliott	select CRYPTO_MANAGER
891f1f142adSRobert Elliott	help
89261c581a4SArd Biesheuvel	  HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
893f1f142adSRobert Elliott	  RFC2104)
8943f342a23SRobert Elliott
895f1f142adSRobert Elliott	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
896f1f142adSRobert Elliott
8973f342a23SRobert Elliottconfig CRYPTO_MD4
898f1f142adSRobert Elliott	tristate "MD4"
899f1f142adSRobert Elliott	select CRYPTO_HASH
900f1f142adSRobert Elliott	help
9013f342a23SRobert Elliott	  MD4 message digest algorithm (RFC1320)
9023f342a23SRobert Elliott
9033f342a23SRobert Elliottconfig CRYPTO_MD5
9043f342a23SRobert Elliott	tristate "MD5"
905f1f142adSRobert Elliott	select CRYPTO_HASH
906f1f142adSRobert Elliott	select CRYPTO_LIB_MD5
9073f342a23SRobert Elliott	help
908f1f142adSRobert Elliott	  MD5 message digest algorithm (RFC1321), including HMAC support.
909f1f142adSRobert Elliott
9103f342a23SRobert Elliottconfig CRYPTO_RMD160
911f1f142adSRobert Elliott	tristate "RIPEMD-160"
912f1f142adSRobert Elliott	select CRYPTO_HASH
9133f342a23SRobert Elliott	help
914f1f142adSRobert Elliott	  RIPEMD-160 hash function (ISO/IEC 10118-3)
915ba8ee22aSEric Biggers
916f1f142adSRobert Elliott	  RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
917ba8ee22aSEric Biggers	  to be used as a secure replacement for the 128-bit hash functions
918f1f142adSRobert Elliott	  MD4, MD5 and its predecessor RIPEMD
919f1f142adSRobert Elliott	  (not to be confused with RIPEMD-128).
9203f342a23SRobert Elliott
921f1f142adSRobert Elliott	  Its speed is comparable to SHA-1 and there are no known attacks
922f1f142adSRobert Elliott	  against RIPEMD-160.
9233f342a23SRobert Elliott
9243f342a23SRobert Elliott	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
9253f342a23SRobert Elliott	  See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
9263f342a23SRobert Elliott	  for further information.
9273f342a23SRobert Elliott
9283f342a23SRobert Elliottconfig CRYPTO_SHA1
9293f342a23SRobert Elliott	tristate "SHA-1"
930f1f142adSRobert Elliott	select CRYPTO_HASH
931f1f142adSRobert Elliott	select CRYPTO_LIB_SHA1
9323f342a23SRobert Elliott	help
933f1f142adSRobert Elliott	  SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3), including
934f1f142adSRobert Elliott	  HMAC support.
9353f342a23SRobert Elliott
936f1f142adSRobert Elliottconfig CRYPTO_SHA256
937f1f142adSRobert Elliott	tristate "SHA-224 and SHA-256"
938f1f142adSRobert Elliott	select CRYPTO_HASH
939f1f142adSRobert Elliott	select CRYPTO_LIB_SHA256
940f1f142adSRobert Elliott	help
941f1f142adSRobert Elliott	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC
9423f342a23SRobert Elliott	  10118-3), including HMAC support.
943f1f142adSRobert Elliott
944f1f142adSRobert Elliott	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
945f1f142adSRobert Elliott
9463f342a23SRobert Elliottconfig CRYPTO_SHA512
9473f342a23SRobert Elliott	tristate "SHA-384 and SHA-512"
948f1f142adSRobert Elliott	select CRYPTO_HASH
949f1f142adSRobert Elliott	select CRYPTO_LIB_SHA512
9503f342a23SRobert Elliott	help
951f1f142adSRobert Elliott	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC
952f1f142adSRobert Elliott	  10118-3), including HMAC support.
953f1f142adSRobert Elliott
9548bc79ab6SEric Biggersconfig CRYPTO_SHA3
9558bc79ab6SEric Biggers	tristate "SHA-3"
956f1f142adSRobert Elliott	select CRYPTO_HASH
957f1f142adSRobert Elliott	select CRYPTO_LIB_SHA3
9583f342a23SRobert Elliott	help
959f1f142adSRobert Elliott	  SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
960f1f142adSRobert Elliott
961f1f142adSRobert Elliottconfig CRYPTO_SM3
962e0cd3716SEric Biggers	tristate "SM3 (ShangMi 3)"
963e0cd3716SEric Biggers	select CRYPTO_HASH
964f1f142adSRobert Elliott	select CRYPTO_LIB_SM3
9653f342a23SRobert Elliott	help
966f1f142adSRobert Elliott	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
967f1f142adSRobert Elliott
9683f342a23SRobert Elliott	  This is part of the Chinese Commercial Cryptography suite.
969f1f142adSRobert Elliott
970469acaa1SEric Biggers	  References:
971f1f142adSRobert Elliott	  http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
972469acaa1SEric Biggers	  https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
973469acaa1SEric Biggers
974f1f142adSRobert Elliottconfig CRYPTO_STREEBOG
975f1f142adSRobert Elliott	tristate "Streebog"
9763f342a23SRobert Elliott	select CRYPTO_HASH
977f1f142adSRobert Elliott	help
978f1799d17SEric Biggers	  Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
979f1f142adSRobert Elliott
9803f342a23SRobert Elliott	  This is one of the Russian cryptographic standard algorithms (called
981f1f142adSRobert Elliott	  GOST algorithms). This setting enables two hash algorithms with
982f1f142adSRobert Elliott	  256 and 512 bits output.
9833f342a23SRobert Elliott
984f1f142adSRobert Elliott	  References:
985f4065b2fSHerbert Xu	  https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
986f1f142adSRobert Elliott	  https://tools.ietf.org/html/rfc6986
9873f342a23SRobert Elliott
9883f342a23SRobert Elliottconfig CRYPTO_WP512
9893f342a23SRobert Elliott	tristate "Whirlpool"
990f1f142adSRobert Elliott	select CRYPTO_HASH
991f1f142adSRobert Elliott	help
992f1f142adSRobert Elliott	  Whirlpool hash function (ISO/IEC 10118-3)
993f1f142adSRobert Elliott
994f1f142adSRobert Elliott	  512, 384 and 256-bit hashes.
995f1f142adSRobert Elliott
9963f342a23SRobert Elliott	  Whirlpool-512 is part of the NESSIE cryptographic primitives.
997f1f142adSRobert Elliott
998f1f142adSRobert Elliott	  See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
9993f342a23SRobert Elliott	  for further information.
10003f342a23SRobert Elliott
10013f342a23SRobert Elliottconfig CRYPTO_XCBC
10023f342a23SRobert Elliott	tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
10033f342a23SRobert Elliott	select CRYPTO_HASH
1004f1f142adSRobert Elliott	select CRYPTO_MANAGER
1005f1f142adSRobert Elliott	help
1006f1f142adSRobert Elliott	  XCBC-MAC (Extended Cipher Block Chaining Message Authentication
1007f1f142adSRobert Elliott	  Code) (RFC3566)
1008f1f142adSRobert Elliott
1009f1f142adSRobert Elliottconfig CRYPTO_XXHASH
10103f342a23SRobert Elliott	tristate "xxHash"
1011f1f142adSRobert Elliott	select CRYPTO_HASH
1012f1f142adSRobert Elliott	select XXHASH
10133f342a23SRobert Elliott	help
10143f342a23SRobert Elliott	  xxHash non-cryptographic hash algorithm
10153f342a23SRobert Elliott
1016f1f142adSRobert Elliott	  Extremely fast, working at speeds close to RAM limits.
1017f1f142adSRobert Elliott
1018f1f142adSRobert Elliottendmenu
10193f342a23SRobert Elliott
10203f342a23SRobert Elliottmenu "CRCs (cyclic redundancy checks)"
1021f1f142adSRobert Elliott
1022f1f142adSRobert Elliottconfig CRYPTO_CRC32C
10233f342a23SRobert Elliott	tristate "CRC32c"
1024f1f142adSRobert Elliott	select CRYPTO_HASH
1025f1f142adSRobert Elliott	select CRC32
1026f1f142adSRobert Elliott	help
10273f342a23SRobert Elliott	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
10283f342a23SRobert Elliott
1029f1f142adSRobert Elliott	  A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1030f1f142adSRobert Elliott	  by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
10313f342a23SRobert Elliott	  Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1032f1f142adSRobert Elliott	  on Communications, Vol. 41, No. 6, June 1993, selected for use with
1033f1f142adSRobert Elliott	  iSCSI.
1034f1f142adSRobert Elliott
10353f342a23SRobert Elliottconfig CRYPTO_CRC32
10363f342a23SRobert Elliott	tristate "CRC32"
10373f342a23SRobert Elliott	select CRYPTO_HASH
10383f342a23SRobert Elliott	select CRC32
1039f1f142adSRobert Elliott	help
1040f1f142adSRobert Elliott	  CRC32 CRC algorithm (IEEE 802.3)
1041f1f142adSRobert Elliott
1042f1f142adSRobert Elliottendmenu
1043f1f142adSRobert Elliott
1044ec84348dSRobert Elliottmenu "Compression"
1045f1f142adSRobert Elliott
1046f1f142adSRobert Elliottconfig CRYPTO_DEFLATE
1047f1f142adSRobert Elliott	tristate "Deflate"
1048ec84348dSRobert Elliott	select CRYPTO_ALGAPI
1049ec84348dSRobert Elliott	select CRYPTO_ACOMP2
1050ec84348dSRobert Elliott	select ZLIB_INFLATE
1051ec84348dSRobert Elliott	select ZLIB_DEFLATE
1052ec84348dSRobert Elliott	help
1053ec84348dSRobert Elliott	  Deflate compression algorithm (RFC1951)
1054ec84348dSRobert Elliott
1055ec84348dSRobert Elliott	  Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
1056f1f142adSRobert Elliott
1057ec84348dSRobert Elliottconfig CRYPTO_LZO
1058f1f142adSRobert Elliott	tristate "LZO"
1059f1f142adSRobert Elliott	select CRYPTO_ALGAPI
1060f1f142adSRobert Elliott	select CRYPTO_ACOMP2
1061ec84348dSRobert Elliott	select LZO_COMPRESS
1062ec84348dSRobert Elliott	select LZO_DECOMPRESS
1063f1f142adSRobert Elliott	help
1064f1f142adSRobert Elliott	  LZO compression algorithm
1065f1f142adSRobert Elliott
1066584fffc8SSebastian Siewior	  See https://www.oberhumer.com/opensource/lzo/ for further information.
10671da177e4SLinus Torvalds
1068a9a98d49SRobert Elliottconfig CRYPTO_842
1069cce9e06dSHerbert Xu	tristate "842"
1070f6ded09dSGiovanni Cabiddu	select CRYPTO_ALGAPI
10711da177e4SLinus Torvalds	select CRYPTO_ACOMP2
10721da177e4SLinus Torvalds	select 842_COMPRESS
10731da177e4SLinus Torvalds	select 842_DECOMPRESS
1074a9a98d49SRobert Elliott	help
10751da177e4SLinus Torvalds	  842 compression algorithm by IBM
1076a9a98d49SRobert Elliott
10771da177e4SLinus Torvalds	  See https://github.com/plauth/lib842 for further information.
10780b77abb3SZoltan Sogor
1079a9a98d49SRobert Elliottconfig CRYPTO_LZ4
10800b77abb3SZoltan Sogor	tristate "LZ4"
1081ac9d2c4bSGiovanni Cabiddu	select CRYPTO_ALGAPI
10820b77abb3SZoltan Sogor	select CRYPTO_ACOMP2
10830b77abb3SZoltan Sogor	select LZ4_COMPRESS
10840b77abb3SZoltan Sogor	select LZ4_DECOMPRESS
1085a9a98d49SRobert Elliott	help
1086a9a98d49SRobert Elliott	  LZ4 compression algorithm
1087a9a98d49SRobert Elliott
10880b77abb3SZoltan Sogor	  See https://github.com/lz4/lz4 for further information.
108935a1fc18SSeth Jennings
1090a9a98d49SRobert Elliottconfig CRYPTO_LZ4HC
10912062c5b6SDan Streetman	tristate "LZ4HC"
10926a8de3aeSGiovanni Cabiddu	select CRYPTO_ALGAPI
10932062c5b6SDan Streetman	select CRYPTO_ACOMP2
10942062c5b6SDan Streetman	select LZ4HC_COMPRESS
109535a1fc18SSeth Jennings	select LZ4_DECOMPRESS
1096a9a98d49SRobert Elliott	help
1097a9a98d49SRobert Elliott	  LZ4 high compression mode algorithm
1098a9a98d49SRobert Elliott
109935a1fc18SSeth Jennings	  See https://github.com/lz4/lz4 for further information.
11000ea8530dSChanho Min
1101a9a98d49SRobert Elliottconfig CRYPTO_ZSTD
11020ea8530dSChanho Min	tristate "Zstd"
11038cd9330eSGiovanni Cabiddu	select CRYPTO_ALGAPI
11040ea8530dSChanho Min	select CRYPTO_ACOMP2
11050ea8530dSChanho Min	select ZSTD_COMPRESS
11060ea8530dSChanho Min	select ZSTD_DECOMPRESS
1107a9a98d49SRobert Elliott	help
1108a9a98d49SRobert Elliott	  zstd compression algorithm
1109a9a98d49SRobert Elliott
11100ea8530dSChanho Min	  See https://github.com/facebook/zstd for further information.
11110ea8530dSChanho Min
1112a9a98d49SRobert Elliottendmenu
11130ea8530dSChanho Min
111491d53d96SGiovanni Cabiddumenu "Random number generation"
11150ea8530dSChanho Min
11160ea8530dSChanho Minmenuconfig CRYPTO_DRBG_MENU
11170ea8530dSChanho Min	tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
1118a9a98d49SRobert Elliott	help
1119a9a98d49SRobert Elliott	  DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
1120a9a98d49SRobert Elliott
11210ea8530dSChanho Min	  In the following submenu, one or more of the DRBG types must be selected.
1122d28fc3dbSNick Terrell
1123a9a98d49SRobert Elliottif CRYPTO_DRBG_MENU
1124d28fc3dbSNick Terrell
1125d28fc3dbSNick Terrellconfig CRYPTO_DRBG_HMAC
1126d28fc3dbSNick Terrell	bool
1127d28fc3dbSNick Terrell	default y
1128d28fc3dbSNick Terrell	select CRYPTO_HMAC
1129a9a98d49SRobert Elliott	select CRYPTO_SHA512
1130a9a98d49SRobert Elliott
1131a9a98d49SRobert Elliottconfig CRYPTO_DRBG_HASH
1132d28fc3dbSNick Terrell	bool "Hash_DRBG"
1133f1f142adSRobert Elliott	select CRYPTO_SHA256
1134f1f142adSRobert Elliott	help
1135f1f142adSRobert Elliott	  Hash_DRBG variant as defined in NIST SP800-90A.
113617f0f4a4SNeil Horman
1137f2c89a10SHerbert Xu	  This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms.
1138a9a98d49SRobert Elliott
1139419090c6SStephan Muellerconfig CRYPTO_DRBG_CTR
1140a9a98d49SRobert Elliott	bool "CTR_DRBG"
1141a9a98d49SRobert Elliott	select CRYPTO_DF80090A
1142a9a98d49SRobert Elliott	help
1143419090c6SStephan Mueller	  CTR_DRBG variant as defined in NIST SP800-90A.
1144f2c89a10SHerbert Xu
1145419090c6SStephan Mueller	  This uses the AES cipher algorithm with the counter block mode.
1146419090c6SStephan Mueller
1147401e4238SHerbert Xuconfig CRYPTO_DRBG
1148419090c6SStephan Mueller	tristate
1149419090c6SStephan Mueller	default CRYPTO_DRBG_MENU
11505261cdf4SStephan Mueller	select CRYPTO_RNG
1151419090c6SStephan Mueller	select CRYPTO_JITTERENTROPY
1152419090c6SStephan Mueller
1153a9a98d49SRobert Elliottendif	# if CRYPTO_DRBG_MENU
1154826775bbSHerbert Xu
1155419090c6SStephan Muellerconfig CRYPTO_JITTERENTROPY
1156a9a98d49SRobert Elliott	tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
1157a9a98d49SRobert Elliott	select CRYPTO_LIB_SHA3
1158a9a98d49SRobert Elliott	select CRYPTO_RNG
1159419090c6SStephan Mueller	help
1160419090c6SStephan Mueller	  CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
1161a9a98d49SRobert Elliott
11626c4fed5fSHarsh Jain	  A non-physical non-deterministic ("true") RNG (e.g., an entropy source
1163419090c6SStephan Mueller	  compliant with NIST SP800-90B) intended to provide a seed to a
1164a9a98d49SRobert Elliott	  deterministic RNG (e.g., per NIST SP800-90C).
1165a9a98d49SRobert Elliott	  This RNG does not perform any cryptographic whitening of the generated
1166a9a98d49SRobert Elliott	  random numbers.
1167419090c6SStephan Mueller
1168f2c89a10SHerbert Xu	  See https://www.chronox.de/jent/
1169f2c89a10SHerbert Xu
1170401e4238SHerbert Xuif CRYPTO_JITTERENTROPY
1171f2c89a10SHerbert Xuif CRYPTO_FIPS && EXPERT
1172bb5530e4SStephan Mueller
1173f2c89a10SHerbert Xuchoice
1174f2c89a10SHerbert Xu	prompt "CPU Jitter RNG Memory Size"
1175419090c6SStephan Mueller	default CRYPTO_JITTERENTROPY_MEMSIZE_2
1176bb5530e4SStephan Mueller	help
1177a9a98d49SRobert Elliott	  The Jitter RNG measures the execution time of memory accesses.
11782f313e02SArnd Bergmann	  Multiple consecutive memory accesses are performed. If the memory
1179bb897c55SStephan Müller	  size fits into a cache (e.g. L1), only the memory access timing
1180bb5530e4SStephan Mueller	  to that cache is measured. The closer the cache is to the CPU
1181a9a98d49SRobert Elliott	  the less variations are measured and thus the less entropy is
1182a9a98d49SRobert Elliott	  obtained. Thus, if the memory size fits into the L1 cache, the
1183a9a98d49SRobert Elliott	  obtained entropy is less than if the memory size fits within
1184a9a98d49SRobert Elliott	  L1 + L2, which in turn is less if the memory fits into
1185e63df1ecSRandy Dunlap	  L1 + L2 + L3. Thus, by selecting a different memory size,
1186a9a98d49SRobert Elliott	  the entropy rate produced by the Jitter RNG can be modified.
1187e63df1ecSRandy Dunlap
1188a9a98d49SRobert Elliott	config CRYPTO_JITTERENTROPY_MEMSIZE_2
1189e63df1ecSRandy Dunlap		bool "2048 Bytes (default)"
1190bb5530e4SStephan Mueller
1191e7ed6473SHerbert Xu	config CRYPTO_JITTERENTROPY_MEMSIZE_128
1192e7ed6473SHerbert Xu		bool "128 kBytes"
1193e7ed6473SHerbert Xu
119459bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_1024
119559bcfd78SStephan Müller		bool "1024 kBytes"
119659bcfd78SStephan Müller
119759bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_8192
119859bcfd78SStephan Müller		bool "8192 kBytes"
119959bcfd78SStephan Müllerendchoice
120059bcfd78SStephan Müller
120159bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
120259bcfd78SStephan Müller	int
120359bcfd78SStephan Müller	default 64 if CRYPTO_JITTERENTROPY_MEMSIZE_2
120459bcfd78SStephan Müller	default 512 if CRYPTO_JITTERENTROPY_MEMSIZE_128
120559bcfd78SStephan Müller	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
120659bcfd78SStephan Müller	default 4096 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
120759bcfd78SStephan Müller
120859bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
120959bcfd78SStephan Müller	int
121059bcfd78SStephan Müller	default 32 if CRYPTO_JITTERENTROPY_MEMSIZE_2
121159bcfd78SStephan Müller	default 256 if CRYPTO_JITTERENTROPY_MEMSIZE_128
121259bcfd78SStephan Müller	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
121359bcfd78SStephan Müller	default 2048 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
121459bcfd78SStephan Müller
121559bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_OSR
121659bcfd78SStephan Müller	int "CPU Jitter RNG Oversampling Rate"
121759bcfd78SStephan Müller	range 1 15
121859bcfd78SStephan Müller	default 3
121959bcfd78SStephan Müller	help
122059bcfd78SStephan Müller	  The Jitter RNG allows the specification of an oversampling rate (OSR).
122159bcfd78SStephan Müller	  The Jitter RNG operation requires a fixed amount of timing
122259bcfd78SStephan Müller	  measurements to produce one output block of random numbers. The
122359bcfd78SStephan Müller	  OSR value is multiplied with the amount of timing measurements to
122459bcfd78SStephan Müller	  generate one output block. Thus, the timing measurement is oversampled
122559bcfd78SStephan Müller	  by the OSR factor. The oversampling allows the Jitter RNG to operate
122659bcfd78SStephan Müller	  on hardware whose timers deliver limited amount of entropy (e.g.
122759bcfd78SStephan Müller	  the timer is coarse) by setting the OSR to a higher value. The
122859bcfd78SStephan Müller	  trade-off, however, is that the Jitter RNG now requires more time
122959bcfd78SStephan Müller	  to generate random numbers.
123059bcfd78SStephan Müller
123159bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_TESTINTERFACE
123259bcfd78SStephan Müller	bool "CPU Jitter RNG Test Interface"
123359bcfd78SStephan Müller	help
123459bcfd78SStephan Müller	  The test interface allows a privileged process to capture
123559bcfd78SStephan Müller	  the raw unconditioned high resolution time stamp noise that
12360baa8fabSStephan Müller	  is collected by the Jitter RNG for statistical analysis. As
12370baa8fabSStephan Müller	  this data is used at the same time to generate random bits,
12380baa8fabSStephan Müller	  the Jitter RNG operates in an insecure mode as long as the
123995a798d2SStephan Mueller	  recording is enabled. This interface therefore is only
12400baa8fabSStephan Müller	  intended for testing purposes and is not suitable for
12410baa8fabSStephan Müller	  production systems.
12420baa8fabSStephan Müller
12430baa8fabSStephan Müller	  The raw noise data can be obtained using the jent_raw_hires
12440baa8fabSStephan Müller	  debugfs file. Using the option
12450baa8fabSStephan Müller	  jitterentropy_testing.boot_raw_hires_test=1 the raw noise of
12460baa8fabSStephan Müller	  the first 1000 entropy events since boot can be sampled.
12470baa8fabSStephan Müller
12480baa8fabSStephan Müller	  If unsure, select N.
12490baa8fabSStephan Müller
12500baa8fabSStephan Müllerendif	# if CRYPTO_FIPS && EXPERT
12510baa8fabSStephan Müller
125269f1c387SStephan Müllerif !(CRYPTO_FIPS && EXPERT)
125369f1c387SStephan Müller
125469f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
125569f1c387SStephan Müller	int
125669f1c387SStephan Müller	default 64
125769f1c387SStephan Müller
125869f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
125969f1c387SStephan Müller	int
126069f1c387SStephan Müller	default 32
126169f1c387SStephan Müller
126269f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_OSR
126369f1c387SStephan Müller	int
126469f1c387SStephan Müller	default 1
126569f1c387SStephan Müller
126669f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_TESTINTERFACE
126769f1c387SStephan Müller	bool
126869f1c387SStephan Müller
126969f1c387SStephan Müllerendif	# if !(CRYPTO_FIPS && EXPERT)
127069f1c387SStephan Müllerendif	# if CRYPTO_JITTERENTROPY
1271e7ed6473SHerbert Xu
1272e7ed6473SHerbert Xuconfig CRYPTO_KDF800108_CTR
1273e7ed6473SHerbert Xu	tristate
1274e7ed6473SHerbert Xu	select CRYPTO_HMAC
1275e7ed6473SHerbert Xu	select CRYPTO_SHA256
1276e7ed6473SHerbert Xu
1277e7ed6473SHerbert Xuconfig CRYPTO_DF80090A
1278e7ed6473SHerbert Xu	tristate
1279e7ed6473SHerbert Xu	select CRYPTO_AES
1280e7ed6473SHerbert Xu	select CRYPTO_CTR
1281e7ed6473SHerbert Xu
1282e7ed6473SHerbert Xuendmenu
1283e7ed6473SHerbert Xumenu "Userspace interface"
1284e7ed6473SHerbert Xu
1285e7ed6473SHerbert Xuconfig CRYPTO_USER_API
1286e7ed6473SHerbert Xu	tristate
1287e7ed6473SHerbert Xu
1288e7ed6473SHerbert Xuconfig CRYPTO_USER_API_HASH
1289e7ed6473SHerbert Xu	tristate "Hash algorithms"
1290e7ed6473SHerbert Xu	depends on NET
1291e7ed6473SHerbert Xu	select CRYPTO_HASH
1292e7ed6473SHerbert Xu	select CRYPTO_USER_API
1293026a733eSStephan Müller	help
1294026a733eSStephan Müller	  Enable the userspace interface for hash algorithms.
1295a88592ccSHerbert Xu
1296304b4aceSStephan Müller	  See Documentation/crypto/userspace-if.rst and
1297026a733eSStephan Müller	  https://www.chronox.de/libkcapi/html/index.html
12986c4fed5fSHarsh Jain
12996c4fed5fSHarsh Jainconfig CRYPTO_USER_API_SKCIPHER
13006c4fed5fSHarsh Jain	tristate "Symmetric key cipher algorithms"
13016c4fed5fSHarsh Jain	depends on NET
13026c4fed5fSHarsh Jain	select CRYPTO_SKCIPHER
1303f1f142adSRobert Elliott	select CRYPTO_USER_API
13049bc51715SRobert Elliott	help
1305f1f142adSRobert Elliott	  Enable the userspace interface for symmetric key cipher algorithms.
130603c8efc1SHerbert Xu
130703c8efc1SHerbert Xu	  See Documentation/crypto/userspace-if.rst and
130803c8efc1SHerbert Xu	  https://www.chronox.de/libkcapi/html/index.html
1309fe869cdbSHerbert Xu
13109bc51715SRobert Elliottconfig CRYPTO_USER_API_RNG
13117451708fSHerbert Xu	tristate "RNG (random number generator) algorithms"
1312fe869cdbSHerbert Xu	depends on NET
1313fe869cdbSHerbert Xu	select CRYPTO_RNG
1314fe869cdbSHerbert Xu	select CRYPTO_USER_API
13159bc51715SRobert Elliott	help
13169bc51715SRobert Elliott	  Enable the userspace interface for RNG (random number generator)
13179bc51715SRobert Elliott	  algorithms.
13189bc51715SRobert Elliott
1319fe869cdbSHerbert Xu	  See Documentation/crypto/userspace-if.rst and
13208ff59090SHerbert Xu	  https://www.chronox.de/libkcapi/html/index.html
13219bc51715SRobert Elliott
13227451708fSHerbert Xuconfig CRYPTO_USER_API_RNG_CAVP
1323b95bba5dSEric Biggers	bool "Enable CAVP testing of DRBG"
13248ff59090SHerbert Xu	depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
13258ff59090SHerbert Xu	help
13269bc51715SRobert Elliott	  Enable extra APIs in the userspace interface for NIST CAVP
13279bc51715SRobert Elliott	  (Cryptographic Algorithm Validation Program) testing:
13289bc51715SRobert Elliott	  - resetting DRBG entropy
13299bc51715SRobert Elliott	  - providing Additional Data
13308ff59090SHerbert Xu
13312f375538SStephan Mueller	  This should only be enabled for CAVP testing. You should say
13329bc51715SRobert Elliott	  no unless you know what this is.
13332f375538SStephan Mueller
13342f375538SStephan Muellerconfig CRYPTO_USER_API_AEAD
13352f375538SStephan Mueller	tristate "AEAD cipher algorithms"
13362f375538SStephan Mueller	depends on NET
13379bc51715SRobert Elliott	select CRYPTO_AEAD
13389bc51715SRobert Elliott	select CRYPTO_SKCIPHER
13399bc51715SRobert Elliott	select CRYPTO_USER_API
13409bc51715SRobert Elliott	help
13419bc51715SRobert Elliott	  Enable the userspace interface for AEAD cipher algorithms.
13422f375538SStephan Mueller
134377ebdabeSElena Petrova	  See Documentation/crypto/userspace-if.rst and
134477ebdabeSElena Petrova	  https://www.chronox.de/libkcapi/html/index.html
134577ebdabeSElena Petrova
134677ebdabeSElena Petrovaconfig CRYPTO_USER_API_ENABLE_OBSOLETE
13479bc51715SRobert Elliott	bool "Obsolete cryptographic algorithms"
13489bc51715SRobert Elliott	depends on CRYPTO_USER_API
13499bc51715SRobert Elliott	default y
13509bc51715SRobert Elliott	help
13519bc51715SRobert Elliott	  Allow obsolete cryptographic algorithms to be selected that have
135277ebdabeSElena Petrova	  already been phased out from internal use by the kernel, and are
135377ebdabeSElena Petrova	  only useful for userspace clients that still rely on them.
135477ebdabeSElena Petrova
1355b64a2d95SHerbert Xuendmenu
13569bc51715SRobert Elliott
1357b64a2d95SHerbert Xuif !KMSAN # avoid false positives from assembly
1358b64a2d95SHerbert Xuif ARM
1359b95bba5dSEric Biggerssource "arch/arm/crypto/Kconfig"
1360b64a2d95SHerbert Xuendif
1361b64a2d95SHerbert Xuif ARM64
13629bc51715SRobert Elliottsource "arch/arm64/crypto/Kconfig"
13639bc51715SRobert Elliottendif
13649bc51715SRobert Elliottif LOONGARCH
13659bc51715SRobert Elliottsource "arch/loongarch/crypto/Kconfig"
1366b64a2d95SHerbert Xuendif
13679ace6771SArd Biesheuvelif MIPS
13689bc51715SRobert Elliottsource "arch/mips/crypto/Kconfig"
13699ace6771SArd Biesheuvelendif
13709ace6771SArd Biesheuvelif PPC
13719ace6771SArd Biesheuvelsource "arch/powerpc/crypto/Kconfig"
13729ace6771SArd Biesheuvelendif
13739ace6771SArd Biesheuvelif RISCV
13749ace6771SArd Biesheuvelsource "arch/riscv/crypto/Kconfig"
13759ace6771SArd Biesheuvelendif
1376f1f142adSRobert Elliottif S390
1377f1f142adSRobert Elliottsource "arch/s390/crypto/Kconfig"
137827bc50fcSLinus Torvaldsendif
13794a329fecSRobert Elliottif SPARC
13804a329fecSRobert Elliottsource "arch/sparc/crypto/Kconfig"
13814a329fecSRobert Elliottendif
13824a329fecSRobert Elliottif X86
13834a329fecSRobert Elliottsource "arch/x86/crypto/Kconfig"
13844a329fecSRobert Elliottendif
13852f164822SMin Zhouendif
13862f164822SMin Zhou
13872f164822SMin Zhousource "drivers/crypto/Kconfig"
1388e45f710bSRobert Elliottsource "crypto/asymmetric_keys/Kconfig"
1389e45f710bSRobert Elliottsource "certs/Kconfig"
1390e45f710bSRobert Elliottsource "crypto/krb5/Kconfig"
13916a490a4eSRobert Elliott
13926a490a4eSRobert Elliottendif	# if CRYPTO
13936a490a4eSRobert Elliott