xref: /linux/crypto/Kconfig (revision e7ed6473c2c8c4e45dd861bfa06e96189b11d8db)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
3685784aaSDan Williams# Generic algorithms support
4685784aaSDan Williams#
5685784aaSDan Williamsconfig XOR_BLOCKS
6685784aaSDan Williams	tristate
7685784aaSDan Williams
8685784aaSDan Williams#
99bc89cd8SDan Williams# async_tx api: hardware offloaded memory transfer/transform support
109bc89cd8SDan Williams#
119bc89cd8SDan Williamssource "crypto/async_tx/Kconfig"
129bc89cd8SDan Williams
139bc89cd8SDan Williams#
141da177e4SLinus Torvalds# Cryptographic API Configuration
151da177e4SLinus Torvalds#
162e290f43SJan Engelhardtmenuconfig CRYPTO
17c3715cb9SSebastian Siewior	tristate "Cryptographic API"
187033b937SEric Biggers	select CRYPTO_LIB_UTILS
191da177e4SLinus Torvalds	help
201da177e4SLinus Torvalds	  This option provides the core Cryptographic API.
211da177e4SLinus Torvalds
22cce9e06dSHerbert Xuif CRYPTO
23cce9e06dSHerbert Xu
24f1f142adSRobert Elliottmenu "Crypto core or helper"
25584fffc8SSebastian Siewior
26ccb778e1SNeil Hormanconfig CRYPTO_FIPS
27ccb778e1SNeil Horman	bool "FIPS 200 compliance"
28f2c89a10SHerbert Xu	depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS
291f696097SAlec Ari	depends on (MODULE_SIG || !MODULES)
30ccb778e1SNeil Horman	help
31d99324c2SGeert Uytterhoeven	  This option enables the fips boot option which is
32d99324c2SGeert Uytterhoeven	  required if you want the system to operate in a FIPS 200
33ccb778e1SNeil Horman	  certification.  You should say no unless you know what
34e84c5480SChuck Ebbert	  this is.
35ccb778e1SNeil Horman
365a44749fSVladis Dronovconfig CRYPTO_FIPS_NAME
375a44749fSVladis Dronov	string "FIPS Module Name"
385a44749fSVladis Dronov	default "Linux Kernel Cryptographic API"
395a44749fSVladis Dronov	depends on CRYPTO_FIPS
405a44749fSVladis Dronov	help
415a44749fSVladis Dronov	  This option sets the FIPS Module name reported by the Crypto API via
425a44749fSVladis Dronov	  the /proc/sys/crypto/fips_name file.
435a44749fSVladis Dronov
445a44749fSVladis Dronovconfig CRYPTO_FIPS_CUSTOM_VERSION
455a44749fSVladis Dronov	bool "Use Custom FIPS Module Version"
465a44749fSVladis Dronov	depends on CRYPTO_FIPS
475a44749fSVladis Dronov	default n
485a44749fSVladis Dronov
495a44749fSVladis Dronovconfig CRYPTO_FIPS_VERSION
505a44749fSVladis Dronov	string "FIPS Module Version"
515a44749fSVladis Dronov	default "(none)"
525a44749fSVladis Dronov	depends on CRYPTO_FIPS_CUSTOM_VERSION
535a44749fSVladis Dronov	help
545a44749fSVladis Dronov	  This option provides the ability to override the FIPS Module Version.
555a44749fSVladis Dronov	  By default the KERNELRELEASE value is used.
565a44749fSVladis Dronov
57cce9e06dSHerbert Xuconfig CRYPTO_ALGAPI
58cce9e06dSHerbert Xu	tristate
596a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
60cce9e06dSHerbert Xu	help
61cce9e06dSHerbert Xu	  This option provides the API for cryptographic algorithms.
62cce9e06dSHerbert Xu
636a0fcbb4SHerbert Xuconfig CRYPTO_ALGAPI2
646a0fcbb4SHerbert Xu	tristate
656a0fcbb4SHerbert Xu
661ae97820SHerbert Xuconfig CRYPTO_AEAD
671ae97820SHerbert Xu	tristate
686a0fcbb4SHerbert Xu	select CRYPTO_AEAD2
691ae97820SHerbert Xu	select CRYPTO_ALGAPI
701ae97820SHerbert Xu
716a0fcbb4SHerbert Xuconfig CRYPTO_AEAD2
726a0fcbb4SHerbert Xu	tristate
736a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
746a0fcbb4SHerbert Xu
756cb8815fSHerbert Xuconfig CRYPTO_SIG
766cb8815fSHerbert Xu	tristate
776cb8815fSHerbert Xu	select CRYPTO_SIG2
786cb8815fSHerbert Xu	select CRYPTO_ALGAPI
796cb8815fSHerbert Xu
806cb8815fSHerbert Xuconfig CRYPTO_SIG2
816cb8815fSHerbert Xu	tristate
826cb8815fSHerbert Xu	select CRYPTO_ALGAPI2
836cb8815fSHerbert Xu
84b95bba5dSEric Biggersconfig CRYPTO_SKCIPHER
855cde0af2SHerbert Xu	tristate
86b95bba5dSEric Biggers	select CRYPTO_SKCIPHER2
875cde0af2SHerbert Xu	select CRYPTO_ALGAPI
8884534684SHerbert Xu	select CRYPTO_ECB
896a0fcbb4SHerbert Xu
90b95bba5dSEric Biggersconfig CRYPTO_SKCIPHER2
916a0fcbb4SHerbert Xu	tristate
926a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
935cde0af2SHerbert Xu
94055bcee3SHerbert Xuconfig CRYPTO_HASH
95055bcee3SHerbert Xu	tristate
966a0fcbb4SHerbert Xu	select CRYPTO_HASH2
97055bcee3SHerbert Xu	select CRYPTO_ALGAPI
98055bcee3SHerbert Xu
996a0fcbb4SHerbert Xuconfig CRYPTO_HASH2
1006a0fcbb4SHerbert Xu	tristate
1016a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
1026a0fcbb4SHerbert Xu
10317f0f4a4SNeil Hormanconfig CRYPTO_RNG
10417f0f4a4SNeil Horman	tristate
1056a0fcbb4SHerbert Xu	select CRYPTO_RNG2
10617f0f4a4SNeil Horman	select CRYPTO_ALGAPI
10717f0f4a4SNeil Horman
1086a0fcbb4SHerbert Xuconfig CRYPTO_RNG2
1096a0fcbb4SHerbert Xu	tristate
1106a0fcbb4SHerbert Xu	select CRYPTO_ALGAPI2
1116a0fcbb4SHerbert Xu
112401e4238SHerbert Xuconfig CRYPTO_RNG_DEFAULT
113401e4238SHerbert Xu	tristate
114401e4238SHerbert Xu	select CRYPTO_DRBG_MENU
115401e4238SHerbert Xu
1163c339ab8STadeusz Strukconfig CRYPTO_AKCIPHER2
1173c339ab8STadeusz Struk	tristate
1183c339ab8STadeusz Struk	select CRYPTO_ALGAPI2
1193c339ab8STadeusz Struk
1203c339ab8STadeusz Strukconfig CRYPTO_AKCIPHER
1213c339ab8STadeusz Struk	tristate
1223c339ab8STadeusz Struk	select CRYPTO_AKCIPHER2
1233c339ab8STadeusz Struk	select CRYPTO_ALGAPI
1243c339ab8STadeusz Struk
1254e5f2c40SSalvatore Benedettoconfig CRYPTO_KPP2
1264e5f2c40SSalvatore Benedetto	tristate
1274e5f2c40SSalvatore Benedetto	select CRYPTO_ALGAPI2
1284e5f2c40SSalvatore Benedetto
1294e5f2c40SSalvatore Benedettoconfig CRYPTO_KPP
1304e5f2c40SSalvatore Benedetto	tristate
1314e5f2c40SSalvatore Benedetto	select CRYPTO_ALGAPI
1324e5f2c40SSalvatore Benedetto	select CRYPTO_KPP2
1334e5f2c40SSalvatore Benedetto
1342ebda74fSGiovanni Cabidduconfig CRYPTO_ACOMP2
1352ebda74fSGiovanni Cabiddu	tristate
1362ebda74fSGiovanni Cabiddu	select CRYPTO_ALGAPI2
1378cd579d2SBart Van Assche	select SGL_ALLOC
1382ebda74fSGiovanni Cabiddu
1392ebda74fSGiovanni Cabidduconfig CRYPTO_ACOMP
1402ebda74fSGiovanni Cabiddu	tristate
1412ebda74fSGiovanni Cabiddu	select CRYPTO_ALGAPI
1422ebda74fSGiovanni Cabiddu	select CRYPTO_ACOMP2
1432ebda74fSGiovanni Cabiddu
1442b8c19dbSHerbert Xuconfig CRYPTO_MANAGER
1452b8c19dbSHerbert Xu	tristate "Cryptographic algorithm manager"
1466a0fcbb4SHerbert Xu	select CRYPTO_MANAGER2
1472b8c19dbSHerbert Xu	help
1482b8c19dbSHerbert Xu	  Create default cryptographic template instantiations such as
1492b8c19dbSHerbert Xu	  cbc(aes).
1502b8c19dbSHerbert Xu
1516a0fcbb4SHerbert Xuconfig CRYPTO_MANAGER2
1526a0fcbb4SHerbert Xu	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
1532ebda74fSGiovanni Cabiddu	select CRYPTO_ACOMP2
154fb28fabfSHerbert Xu	select CRYPTO_AEAD2
155fb28fabfSHerbert Xu	select CRYPTO_AKCIPHER2
1566cb8815fSHerbert Xu	select CRYPTO_SIG2
157fb28fabfSHerbert Xu	select CRYPTO_HASH2
158fb28fabfSHerbert Xu	select CRYPTO_KPP2
159fb28fabfSHerbert Xu	select CRYPTO_RNG2
160fb28fabfSHerbert Xu	select CRYPTO_SKCIPHER2
1616a0fcbb4SHerbert Xu
162a38f7907SSteffen Klassertconfig CRYPTO_USER
163a38f7907SSteffen Klassert	tristate "Userspace cryptographic algorithm configuration"
1645db017aaSHerbert Xu	depends on NET
165a38f7907SSteffen Klassert	select CRYPTO_MANAGER
166a38f7907SSteffen Klassert	help
167d19978f5SValdis.Kletnieks@vt.edu	  Userspace configuration for cryptographic instantiations such as
168a38f7907SSteffen Klassert	  cbc(aes).
169a38f7907SSteffen Klassert
170326a6346SHerbert Xuconfig CRYPTO_MANAGER_DISABLE_TESTS
171326a6346SHerbert Xu	bool "Disable run-time self tests"
17200ca28a5SHerbert Xu	default y
1730b767f96SAlexander Shishkin	help
174326a6346SHerbert Xu	  Disable run-time self tests that normally take place at
175326a6346SHerbert Xu	  algorithm registration.
1760b767f96SAlexander Shishkin
1775b2706a4SEric Biggersconfig CRYPTO_MANAGER_EXTRA_TESTS
1785b2706a4SEric Biggers	bool "Enable extra run-time crypto self tests"
1796569e309SJason A. Donenfeld	depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_MANAGER
1805b2706a4SEric Biggers	help
1815b2706a4SEric Biggers	  Enable extra run-time self tests of registered crypto algorithms,
1825b2706a4SEric Biggers	  including randomized fuzz tests.
1835b2706a4SEric Biggers
1845b2706a4SEric Biggers	  This is intended for developer use only, as these tests take much
1855b2706a4SEric Biggers	  longer to run than the normal self tests.
1865b2706a4SEric Biggers
187584fffc8SSebastian Siewiorconfig CRYPTO_NULL
188584fffc8SSebastian Siewior	tristate "Null algorithms"
189149a3971SHerbert Xu	select CRYPTO_NULL2
190584fffc8SSebastian Siewior	help
191584fffc8SSebastian Siewior	  These are 'Null' algorithms, used by IPsec, which do nothing.
192584fffc8SSebastian Siewior
193149a3971SHerbert Xuconfig CRYPTO_NULL2
194dd43c4e9SHerbert Xu	tristate
195149a3971SHerbert Xu	select CRYPTO_ALGAPI2
196b95bba5dSEric Biggers	select CRYPTO_SKCIPHER2
197149a3971SHerbert Xu	select CRYPTO_HASH2
198149a3971SHerbert Xu
1995068c7a8SSteffen Klassertconfig CRYPTO_PCRYPT
2003b4afaf2SKees Cook	tristate "Parallel crypto engine"
2013b4afaf2SKees Cook	depends on SMP
2025068c7a8SSteffen Klassert	select PADATA
2035068c7a8SSteffen Klassert	select CRYPTO_MANAGER
2045068c7a8SSteffen Klassert	select CRYPTO_AEAD
2055068c7a8SSteffen Klassert	help
2065068c7a8SSteffen Klassert	  This converts an arbitrary crypto algorithm into a parallel
2075068c7a8SSteffen Klassert	  algorithm that executes in kernel threads.
2085068c7a8SSteffen Klassert
209584fffc8SSebastian Siewiorconfig CRYPTO_CRYPTD
210584fffc8SSebastian Siewior	tristate "Software async crypto daemon"
211b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
212b8a28251SLoc Ho	select CRYPTO_HASH
213584fffc8SSebastian Siewior	select CRYPTO_MANAGER
214584fffc8SSebastian Siewior	help
215584fffc8SSebastian Siewior	  This is a generic software asynchronous crypto daemon that
216584fffc8SSebastian Siewior	  converts an arbitrary synchronous software crypto algorithm
217584fffc8SSebastian Siewior	  into an asynchronous algorithm that executes in a kernel thread.
218584fffc8SSebastian Siewior
219584fffc8SSebastian Siewiorconfig CRYPTO_AUTHENC
220584fffc8SSebastian Siewior	tristate "Authenc support"
221584fffc8SSebastian Siewior	select CRYPTO_AEAD
222b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
223584fffc8SSebastian Siewior	select CRYPTO_MANAGER
224584fffc8SSebastian Siewior	select CRYPTO_HASH
225e94c6a7aSHerbert Xu	select CRYPTO_NULL
226584fffc8SSebastian Siewior	help
227584fffc8SSebastian Siewior	  Authenc: Combined mode wrapper for IPsec.
228cf514b2aSRobert Elliott
229cf514b2aSRobert Elliott	  This is required for IPSec ESP (XFRM_ESP).
230584fffc8SSebastian Siewior
231584fffc8SSebastian Siewiorconfig CRYPTO_TEST
232584fffc8SSebastian Siewior	tristate "Testing module"
23300ea27f1SArd Biesheuvel	depends on m || EXPERT
234da7f033dSHerbert Xu	select CRYPTO_MANAGER
235584fffc8SSebastian Siewior	help
236584fffc8SSebastian Siewior	  Quick & dirty crypto test module.
237584fffc8SSebastian Siewior
238266d0516SHerbert Xuconfig CRYPTO_SIMD
239266d0516SHerbert Xu	tristate
240266d0516SHerbert Xu	select CRYPTO_CRYPTD
241266d0516SHerbert Xu
242735d37b5SBaolin Wangconfig CRYPTO_ENGINE
243735d37b5SBaolin Wang	tristate
244735d37b5SBaolin Wang
245f1f142adSRobert Elliottendmenu
246f1f142adSRobert Elliott
247f1f142adSRobert Elliottmenu "Public-key cryptography"
2483d6228a5SVitaly Chikunov
2493d6228a5SVitaly Chikunovconfig CRYPTO_RSA
25005b37465SRobert Elliott	tristate "RSA (Rivest-Shamir-Adleman)"
2513d6228a5SVitaly Chikunov	select CRYPTO_AKCIPHER
2523d6228a5SVitaly Chikunov	select CRYPTO_MANAGER
2533d6228a5SVitaly Chikunov	select MPILIB
2543d6228a5SVitaly Chikunov	select ASN1
2553d6228a5SVitaly Chikunov	help
25605b37465SRobert Elliott	  RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
2573d6228a5SVitaly Chikunov
2583d6228a5SVitaly Chikunovconfig CRYPTO_DH
25905b37465SRobert Elliott	tristate "DH (Diffie-Hellman)"
2603d6228a5SVitaly Chikunov	select CRYPTO_KPP
2613d6228a5SVitaly Chikunov	select MPILIB
2623d6228a5SVitaly Chikunov	help
26305b37465SRobert Elliott	  DH (Diffie-Hellman) key exchange algorithm
2643d6228a5SVitaly Chikunov
2657dce5981SNicolai Stangeconfig CRYPTO_DH_RFC7919_GROUPS
26605b37465SRobert Elliott	bool "RFC 7919 FFDHE groups"
2677dce5981SNicolai Stange	depends on CRYPTO_DH
2681e207964SNicolai Stange	select CRYPTO_RNG_DEFAULT
2697dce5981SNicolai Stange	help
27005b37465SRobert Elliott	  FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
27105b37465SRobert Elliott	  defined in RFC7919.
27205b37465SRobert Elliott
27305b37465SRobert Elliott	  Support these finite-field groups in DH key exchanges:
27405b37465SRobert Elliott	  - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
27505b37465SRobert Elliott
27605b37465SRobert Elliott	  If unsure, say N.
2777dce5981SNicolai Stange
2784a2289daSVitaly Chikunovconfig CRYPTO_ECC
2794a2289daSVitaly Chikunov	tristate
28038aa192aSArnd Bergmann	select CRYPTO_RNG_DEFAULT
2814a2289daSVitaly Chikunov
2823d6228a5SVitaly Chikunovconfig CRYPTO_ECDH
28305b37465SRobert Elliott	tristate "ECDH (Elliptic Curve Diffie-Hellman)"
2844a2289daSVitaly Chikunov	select CRYPTO_ECC
2853d6228a5SVitaly Chikunov	select CRYPTO_KPP
2863d6228a5SVitaly Chikunov	help
28705b37465SRobert Elliott	  ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
28805b37465SRobert Elliott	  using curves P-192, P-256, and P-384 (FIPS 186)
2893d6228a5SVitaly Chikunov
2904e660291SStefan Bergerconfig CRYPTO_ECDSA
29105b37465SRobert Elliott	tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
2924e660291SStefan Berger	select CRYPTO_ECC
2934e660291SStefan Berger	select CRYPTO_AKCIPHER
2944e660291SStefan Berger	select ASN1
2954e660291SStefan Berger	help
29605b37465SRobert Elliott	  ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
29705b37465SRobert Elliott	  ISO/IEC 14888-3)
29805b37465SRobert Elliott	  using curves P-192, P-256, and P-384
29905b37465SRobert Elliott
30005b37465SRobert Elliott	  Only signature verification is implemented.
3014e660291SStefan Berger
3020d7a7864SVitaly Chikunovconfig CRYPTO_ECRDSA
30305b37465SRobert Elliott	tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
3040d7a7864SVitaly Chikunov	select CRYPTO_ECC
3050d7a7864SVitaly Chikunov	select CRYPTO_AKCIPHER
3060d7a7864SVitaly Chikunov	select CRYPTO_STREEBOG
3071036633eSVitaly Chikunov	select OID_REGISTRY
3081036633eSVitaly Chikunov	select ASN1
3090d7a7864SVitaly Chikunov	help
3100d7a7864SVitaly Chikunov	  Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
31105b37465SRobert Elliott	  RFC 7091, ISO/IEC 14888-3)
31205b37465SRobert Elliott
31305b37465SRobert Elliott	  One of the Russian cryptographic standard algorithms (called GOST
31405b37465SRobert Elliott	  algorithms). Only signature verification is implemented.
3150d7a7864SVitaly Chikunov
316ea7ecb66STianjia Zhangconfig CRYPTO_SM2
31705b37465SRobert Elliott	tristate "SM2 (ShangMi 2)"
318d2825fa9SJason A. Donenfeld	select CRYPTO_SM3
319ea7ecb66STianjia Zhang	select CRYPTO_AKCIPHER
320ea7ecb66STianjia Zhang	select CRYPTO_MANAGER
321ea7ecb66STianjia Zhang	select MPILIB
322ea7ecb66STianjia Zhang	select ASN1
323ea7ecb66STianjia Zhang	help
32405b37465SRobert Elliott	  SM2 (ShangMi 2) public key algorithm
32505b37465SRobert Elliott
32605b37465SRobert Elliott	  Published by State Encryption Management Bureau, China,
327ea7ecb66STianjia Zhang	  as specified by OSCCA GM/T 0003.1-2012 -- 0003.5-2012.
328ea7ecb66STianjia Zhang
329ea7ecb66STianjia Zhang	  References:
33005b37465SRobert Elliott	  https://datatracker.ietf.org/doc/draft-shen-sm2-ecdsa/
331ea7ecb66STianjia Zhang	  http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
332ea7ecb66STianjia Zhang	  http://www.gmbz.org.cn/main/bzlb.html
333ea7ecb66STianjia Zhang
334ee772cb6SArd Biesheuvelconfig CRYPTO_CURVE25519
33505b37465SRobert Elliott	tristate "Curve25519"
336ee772cb6SArd Biesheuvel	select CRYPTO_KPP
337ee772cb6SArd Biesheuvel	select CRYPTO_LIB_CURVE25519_GENERIC
33805b37465SRobert Elliott	help
33905b37465SRobert Elliott	  Curve25519 elliptic curve (RFC7748)
340ee772cb6SArd Biesheuvel
341f1f142adSRobert Elliottendmenu
342584fffc8SSebastian Siewior
343f1f142adSRobert Elliottmenu "Block ciphers"
3441da177e4SLinus Torvalds
3451da177e4SLinus Torvaldsconfig CRYPTO_AES
346cf514b2aSRobert Elliott	tristate "AES (Advanced Encryption Standard)"
347cce9e06dSHerbert Xu	select CRYPTO_ALGAPI
3485bb12d78SArd Biesheuvel	select CRYPTO_LIB_AES
3491da177e4SLinus Torvalds	help
350cf514b2aSRobert Elliott	  AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
3511da177e4SLinus Torvalds
3521da177e4SLinus Torvalds	  Rijndael appears to be consistently a very good performer in
3531da177e4SLinus Torvalds	  both hardware and software across a wide range of computing
3541da177e4SLinus Torvalds	  environments regardless of its use in feedback or non-feedback
3551da177e4SLinus Torvalds	  modes. Its key setup time is excellent, and its key agility is
3561da177e4SLinus Torvalds	  good. Rijndael's very low memory requirements make it very well
3571da177e4SLinus Torvalds	  suited for restricted-space environments, in which it also
3581da177e4SLinus Torvalds	  demonstrates excellent performance. Rijndael's operations are
3591da177e4SLinus Torvalds	  among the easiest to defend against power and timing attacks.
3601da177e4SLinus Torvalds
3611da177e4SLinus Torvalds	  The AES specifies three key sizes: 128, 192 and 256 bits
3621da177e4SLinus Torvalds
363b5e0b032SArd Biesheuvelconfig CRYPTO_AES_TI
364cf514b2aSRobert Elliott	tristate "AES (Advanced Encryption Standard) (fixed time)"
365b5e0b032SArd Biesheuvel	select CRYPTO_ALGAPI
366e59c1c98SArd Biesheuvel	select CRYPTO_LIB_AES
367b5e0b032SArd Biesheuvel	help
368cf514b2aSRobert Elliott	  AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
369cf514b2aSRobert Elliott
370b5e0b032SArd Biesheuvel	  This is a generic implementation of AES that attempts to eliminate
371b5e0b032SArd Biesheuvel	  data dependent latencies as much as possible without affecting
372b5e0b032SArd Biesheuvel	  performance too much. It is intended for use by the generic CCM
373b5e0b032SArd Biesheuvel	  and GCM drivers, and other CTR or CMAC/XCBC based modes that rely
374b5e0b032SArd Biesheuvel	  solely on encryption (although decryption is supported as well, but
375b5e0b032SArd Biesheuvel	  with a more dramatic performance hit)
376b5e0b032SArd Biesheuvel
377b5e0b032SArd Biesheuvel	  Instead of using 16 lookup tables of 1 KB each, (8 for encryption and
378b5e0b032SArd Biesheuvel	  8 for decryption), this implementation only uses just two S-boxes of
379b5e0b032SArd Biesheuvel	  256 bytes each, and attempts to eliminate data dependent latencies by
380b5e0b032SArd Biesheuvel	  prefetching the entire table into the cache at the start of each
3810a6a40c2SEric Biggers	  block. Interrupts are also disabled to avoid races where cachelines
3820a6a40c2SEric Biggers	  are evicted when the CPU is interrupted to do something else.
383b5e0b032SArd Biesheuvel
3841da177e4SLinus Torvaldsconfig CRYPTO_ANUBIS
385cf514b2aSRobert Elliott	tristate "Anubis"
3861674aea5SArd Biesheuvel	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
387cce9e06dSHerbert Xu	select CRYPTO_ALGAPI
3881da177e4SLinus Torvalds	help
389cf514b2aSRobert Elliott	  Anubis cipher algorithm
3901da177e4SLinus Torvalds
3911da177e4SLinus Torvalds	  Anubis is a variable key length cipher which can use keys from
3921da177e4SLinus Torvalds	  128 bits to 320 bits in length.  It was evaluated as a entrant
3931da177e4SLinus Torvalds	  in the NESSIE competition.
3941da177e4SLinus Torvalds
395cf514b2aSRobert Elliott	  See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html
396cf514b2aSRobert Elliott	  for further information.
3971da177e4SLinus Torvalds
398f1f142adSRobert Elliottconfig CRYPTO_ARIA
399cf514b2aSRobert Elliott	tristate "ARIA"
400f1f142adSRobert Elliott	select CRYPTO_ALGAPI
401e2ee95b8SHye-Shik Chang	help
402cf514b2aSRobert Elliott	  ARIA cipher algorithm (RFC5794)
403e2ee95b8SHye-Shik Chang
404f1f142adSRobert Elliott	  ARIA is a standard encryption algorithm of the Republic of Korea.
405f1f142adSRobert Elliott	  The ARIA specifies three key sizes and rounds.
406f1f142adSRobert Elliott	  128-bit: 12 rounds.
407f1f142adSRobert Elliott	  192-bit: 14 rounds.
408f1f142adSRobert Elliott	  256-bit: 16 rounds.
409f1f142adSRobert Elliott
410cf514b2aSRobert Elliott	  See:
411cf514b2aSRobert Elliott	  https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do
412584fffc8SSebastian Siewior
413584fffc8SSebastian Siewiorconfig CRYPTO_BLOWFISH
414cf514b2aSRobert Elliott	tristate "Blowfish"
415584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
41652ba867cSJussi Kivilinna	select CRYPTO_BLOWFISH_COMMON
417584fffc8SSebastian Siewior	help
418cf514b2aSRobert Elliott	  Blowfish cipher algorithm, by Bruce Schneier
419584fffc8SSebastian Siewior
420584fffc8SSebastian Siewior	  This is a variable key length cipher which can use keys from 32
421584fffc8SSebastian Siewior	  bits to 448 bits in length.  It's fast, simple and specifically
422584fffc8SSebastian Siewior	  designed for use on "large microprocessors".
423e2ee95b8SHye-Shik Chang
424cf514b2aSRobert Elliott	  See https://www.schneier.com/blowfish.html for further information.
425584fffc8SSebastian Siewior
42652ba867cSJussi Kivilinnaconfig CRYPTO_BLOWFISH_COMMON
42752ba867cSJussi Kivilinna	tristate
42852ba867cSJussi Kivilinna	help
42952ba867cSJussi Kivilinna	  Common parts of the Blowfish cipher algorithm shared by the
43052ba867cSJussi Kivilinna	  generic c and the assembler implementations.
43152ba867cSJussi Kivilinna
432584fffc8SSebastian Siewiorconfig CRYPTO_CAMELLIA
433cf514b2aSRobert Elliott	tristate "Camellia"
434584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
435584fffc8SSebastian Siewior	help
436cf514b2aSRobert Elliott	  Camellia cipher algorithms (ISO/IEC 18033-3)
437584fffc8SSebastian Siewior
438584fffc8SSebastian Siewior	  Camellia is a symmetric key block cipher developed jointly
439584fffc8SSebastian Siewior	  at NTT and Mitsubishi Electric Corporation.
440584fffc8SSebastian Siewior
441584fffc8SSebastian Siewior	  The Camellia specifies three key sizes: 128, 192 and 256 bits.
442584fffc8SSebastian Siewior
443cf514b2aSRobert Elliott	  See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information.
444584fffc8SSebastian Siewior
445044ab525SJussi Kivilinnaconfig CRYPTO_CAST_COMMON
446044ab525SJussi Kivilinna	tristate
447044ab525SJussi Kivilinna	help
448044ab525SJussi Kivilinna	  Common parts of the CAST cipher algorithms shared by the
449044ab525SJussi Kivilinna	  generic c and the assembler implementations.
450044ab525SJussi Kivilinna
451584fffc8SSebastian Siewiorconfig CRYPTO_CAST5
452cf514b2aSRobert Elliott	tristate "CAST5 (CAST-128)"
453584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
454044ab525SJussi Kivilinna	select CRYPTO_CAST_COMMON
455584fffc8SSebastian Siewior	help
456cf514b2aSRobert Elliott	  CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3)
457584fffc8SSebastian Siewior
458584fffc8SSebastian Siewiorconfig CRYPTO_CAST6
459cf514b2aSRobert Elliott	tristate "CAST6 (CAST-256)"
460584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
461044ab525SJussi Kivilinna	select CRYPTO_CAST_COMMON
462584fffc8SSebastian Siewior	help
463cf514b2aSRobert Elliott	  CAST6 (CAST-256) encryption algorithm (RFC2612)
464584fffc8SSebastian Siewior
465584fffc8SSebastian Siewiorconfig CRYPTO_DES
466cf514b2aSRobert Elliott	tristate "DES and Triple DES EDE"
467584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
46804007b0eSArd Biesheuvel	select CRYPTO_LIB_DES
469584fffc8SSebastian Siewior	help
470cf514b2aSRobert Elliott	  DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and
471cf514b2aSRobert Elliott	  Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3)
472cf514b2aSRobert Elliott	  cipher algorithms
473584fffc8SSebastian Siewior
474584fffc8SSebastian Siewiorconfig CRYPTO_FCRYPT
475cf514b2aSRobert Elliott	tristate "FCrypt"
476584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
477b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
478584fffc8SSebastian Siewior	help
479cf514b2aSRobert Elliott	  FCrypt algorithm used by RxRPC
480cf514b2aSRobert Elliott
481cf514b2aSRobert Elliott	  See https://ota.polyonymo.us/fcrypt-paper.txt
482584fffc8SSebastian Siewior
483584fffc8SSebastian Siewiorconfig CRYPTO_KHAZAD
484cf514b2aSRobert Elliott	tristate "Khazad"
4851674aea5SArd Biesheuvel	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
486584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
487584fffc8SSebastian Siewior	help
488cf514b2aSRobert Elliott	  Khazad cipher algorithm
489584fffc8SSebastian Siewior
490584fffc8SSebastian Siewior	  Khazad was a finalist in the initial NESSIE competition.  It is
491584fffc8SSebastian Siewior	  an algorithm optimized for 64-bit processors with good performance
492584fffc8SSebastian Siewior	  on 32-bit processors.  Khazad uses an 128 bit key size.
493584fffc8SSebastian Siewior
494cf514b2aSRobert Elliott	  See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
495cf514b2aSRobert Elliott	  for further information.
496e2ee95b8SHye-Shik Chang
497584fffc8SSebastian Siewiorconfig CRYPTO_SEED
498cf514b2aSRobert Elliott	tristate "SEED"
4991674aea5SArd Biesheuvel	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
500584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
501584fffc8SSebastian Siewior	help
502cf514b2aSRobert Elliott	  SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
503584fffc8SSebastian Siewior
504584fffc8SSebastian Siewior	  SEED is a 128-bit symmetric key block cipher that has been
505584fffc8SSebastian Siewior	  developed by KISA (Korea Information Security Agency) as a
506584fffc8SSebastian Siewior	  national standard encryption algorithm of the Republic of Korea.
507584fffc8SSebastian Siewior	  It is a 16 round block cipher with the key size of 128 bit.
508584fffc8SSebastian Siewior
509cf514b2aSRobert Elliott	  See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
510cf514b2aSRobert Elliott	  for further information.
511584fffc8SSebastian Siewior
512584fffc8SSebastian Siewiorconfig CRYPTO_SERPENT
513cf514b2aSRobert Elliott	tristate "Serpent"
514584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
515584fffc8SSebastian Siewior	help
516cf514b2aSRobert Elliott	  Serpent cipher algorithm, by Anderson, Biham & Knudsen
517584fffc8SSebastian Siewior
518584fffc8SSebastian Siewior	  Keys are allowed to be from 0 to 256 bits in length, in steps
519784506a1SArd Biesheuvel	  of 8 bits.
520584fffc8SSebastian Siewior
521cf514b2aSRobert Elliott	  See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
522584fffc8SSebastian Siewior
523747c8ce4SGilad Ben-Yossefconfig CRYPTO_SM4
524d2825fa9SJason A. Donenfeld	tristate
525d2825fa9SJason A. Donenfeld
526d2825fa9SJason A. Donenfeldconfig CRYPTO_SM4_GENERIC
527cf514b2aSRobert Elliott	tristate "SM4 (ShangMi 4)"
528747c8ce4SGilad Ben-Yossef	select CRYPTO_ALGAPI
529d2825fa9SJason A. Donenfeld	select CRYPTO_SM4
530747c8ce4SGilad Ben-Yossef	help
531cf514b2aSRobert Elliott	  SM4 cipher algorithms (OSCCA GB/T 32907-2016,
532cf514b2aSRobert Elliott	  ISO/IEC 18033-3:2010/Amd 1:2021)
533747c8ce4SGilad Ben-Yossef
534747c8ce4SGilad Ben-Yossef	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
535747c8ce4SGilad Ben-Yossef	  Organization of State Commercial Administration of China (OSCCA)
536747c8ce4SGilad Ben-Yossef	  as an authorized cryptographic algorithms for the use within China.
537747c8ce4SGilad Ben-Yossef
538747c8ce4SGilad Ben-Yossef	  SMS4 was originally created for use in protecting wireless
539747c8ce4SGilad Ben-Yossef	  networks, and is mandated in the Chinese National Standard for
540747c8ce4SGilad Ben-Yossef	  Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
541747c8ce4SGilad Ben-Yossef	  (GB.15629.11-2003).
542747c8ce4SGilad Ben-Yossef
543747c8ce4SGilad Ben-Yossef	  The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
544747c8ce4SGilad Ben-Yossef	  standardized through TC 260 of the Standardization Administration
545747c8ce4SGilad Ben-Yossef	  of the People's Republic of China (SAC).
546747c8ce4SGilad Ben-Yossef
547747c8ce4SGilad Ben-Yossef	  The input, output, and key of SMS4 are each 128 bits.
548747c8ce4SGilad Ben-Yossef
549cf514b2aSRobert Elliott	  See https://eprint.iacr.org/2008/329.pdf for further information.
550747c8ce4SGilad Ben-Yossef
551747c8ce4SGilad Ben-Yossef	  If unsure, say N.
552747c8ce4SGilad Ben-Yossef
553584fffc8SSebastian Siewiorconfig CRYPTO_TEA
554cf514b2aSRobert Elliott	tristate "TEA, XTEA and XETA"
5551674aea5SArd Biesheuvel	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
556584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
557584fffc8SSebastian Siewior	help
558cf514b2aSRobert Elliott	  TEA (Tiny Encryption Algorithm) cipher algorithms
559584fffc8SSebastian Siewior
560584fffc8SSebastian Siewior	  Tiny Encryption Algorithm is a simple cipher that uses
561584fffc8SSebastian Siewior	  many rounds for security.  It is very fast and uses
562584fffc8SSebastian Siewior	  little memory.
563584fffc8SSebastian Siewior
564584fffc8SSebastian Siewior	  Xtendend Tiny Encryption Algorithm is a modification to
565584fffc8SSebastian Siewior	  the TEA algorithm to address a potential key weakness
566584fffc8SSebastian Siewior	  in the TEA algorithm.
567584fffc8SSebastian Siewior
568584fffc8SSebastian Siewior	  Xtendend Encryption Tiny Algorithm is a mis-implementation
569584fffc8SSebastian Siewior	  of the XTEA algorithm for compatibility purposes.
570584fffc8SSebastian Siewior
571584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH
572cf514b2aSRobert Elliott	tristate "Twofish"
573584fffc8SSebastian Siewior	select CRYPTO_ALGAPI
574584fffc8SSebastian Siewior	select CRYPTO_TWOFISH_COMMON
575584fffc8SSebastian Siewior	help
576cf514b2aSRobert Elliott	  Twofish cipher algorithm
577584fffc8SSebastian Siewior
578584fffc8SSebastian Siewior	  Twofish was submitted as an AES (Advanced Encryption Standard)
579584fffc8SSebastian Siewior	  candidate cipher by researchers at CounterPane Systems.  It is a
580584fffc8SSebastian Siewior	  16 round block cipher supporting key sizes of 128, 192, and 256
581584fffc8SSebastian Siewior	  bits.
582584fffc8SSebastian Siewior
583cf514b2aSRobert Elliott	  See https://www.schneier.com/twofish.html for further information.
584584fffc8SSebastian Siewior
585584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH_COMMON
586584fffc8SSebastian Siewior	tristate
587584fffc8SSebastian Siewior	help
588584fffc8SSebastian Siewior	  Common parts of the Twofish cipher algorithm shared by the
589584fffc8SSebastian Siewior	  generic c and the assembler implementations.
590584fffc8SSebastian Siewior
591f1f142adSRobert Elliottendmenu
592f1f142adSRobert Elliott
593f1f142adSRobert Elliottmenu "Length-preserving ciphers and modes"
594f1f142adSRobert Elliott
595f1f142adSRobert Elliottconfig CRYPTO_ADIANTUM
596cf514b2aSRobert Elliott	tristate "Adiantum"
597f1f142adSRobert Elliott	select CRYPTO_CHACHA20
598f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305_GENERIC
599f1f142adSRobert Elliott	select CRYPTO_NHPOLY1305
600f1f142adSRobert Elliott	select CRYPTO_MANAGER
601f1f142adSRobert Elliott	help
602cf514b2aSRobert Elliott	  Adiantum tweakable, length-preserving encryption mode
603cf514b2aSRobert Elliott
604cf514b2aSRobert Elliott	  Designed for fast and secure disk encryption, especially on
605f1f142adSRobert Elliott	  CPUs without dedicated crypto instructions.  It encrypts
606f1f142adSRobert Elliott	  each sector using the XChaCha12 stream cipher, two passes of
607f1f142adSRobert Elliott	  an ε-almost-∆-universal hash function, and an invocation of
608f1f142adSRobert Elliott	  the AES-256 block cipher on a single 16-byte block.  On CPUs
609f1f142adSRobert Elliott	  without AES instructions, Adiantum is much faster than
610f1f142adSRobert Elliott	  AES-XTS.
611f1f142adSRobert Elliott
612f1f142adSRobert Elliott	  Adiantum's security is provably reducible to that of its
613f1f142adSRobert Elliott	  underlying stream and block ciphers, subject to a security
614f1f142adSRobert Elliott	  bound.  Unlike XTS, Adiantum is a true wide-block encryption
615f1f142adSRobert Elliott	  mode, so it actually provides an even stronger notion of
616f1f142adSRobert Elliott	  security than XTS, subject to the security bound.
617f1f142adSRobert Elliott
618f1f142adSRobert Elliott	  If unsure, say N.
619f1f142adSRobert Elliott
620f1f142adSRobert Elliottconfig CRYPTO_ARC4
621cf514b2aSRobert Elliott	tristate "ARC4 (Alleged Rivest Cipher 4)"
622f1f142adSRobert Elliott	depends on CRYPTO_USER_API_ENABLE_OBSOLETE
623f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
624f1f142adSRobert Elliott	select CRYPTO_LIB_ARC4
625f1f142adSRobert Elliott	help
626cf514b2aSRobert Elliott	  ARC4 cipher algorithm
627f1f142adSRobert Elliott
628f1f142adSRobert Elliott	  ARC4 is a stream cipher using keys ranging from 8 bits to 2048
629f1f142adSRobert Elliott	  bits in length.  This algorithm is required for driver-based
630f1f142adSRobert Elliott	  WEP, but it should not be for other purposes because of the
631f1f142adSRobert Elliott	  weakness of the algorithm.
632f1f142adSRobert Elliott
633f1f142adSRobert Elliottconfig CRYPTO_CHACHA20
634cf514b2aSRobert Elliott	tristate "ChaCha"
635f1f142adSRobert Elliott	select CRYPTO_LIB_CHACHA_GENERIC
636f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
637f1f142adSRobert Elliott	help
638cf514b2aSRobert Elliott	  The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
639f1f142adSRobert Elliott
640f1f142adSRobert Elliott	  ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
641f1f142adSRobert Elliott	  Bernstein and further specified in RFC7539 for use in IETF protocols.
642cf514b2aSRobert Elliott	  This is the portable C implementation of ChaCha20.  See
643cf514b2aSRobert Elliott	  https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
644f1f142adSRobert Elliott
645f1f142adSRobert Elliott	  XChaCha20 is the application of the XSalsa20 construction to ChaCha20
646f1f142adSRobert Elliott	  rather than to Salsa20.  XChaCha20 extends ChaCha20's nonce length
647f1f142adSRobert Elliott	  from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
648cf514b2aSRobert Elliott	  while provably retaining ChaCha20's security.  See
649cf514b2aSRobert Elliott	  https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
650f1f142adSRobert Elliott
651f1f142adSRobert Elliott	  XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
652f1f142adSRobert Elliott	  reduced security margin but increased performance.  It can be needed
653f1f142adSRobert Elliott	  in some performance-sensitive scenarios.
654f1f142adSRobert Elliott
655f1f142adSRobert Elliottconfig CRYPTO_CBC
656cf514b2aSRobert Elliott	tristate "CBC (Cipher Block Chaining)"
657f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
658f1f142adSRobert Elliott	select CRYPTO_MANAGER
659f1f142adSRobert Elliott	help
660cf514b2aSRobert Elliott	  CBC (Cipher Block Chaining) mode (NIST SP800-38A)
661cf514b2aSRobert Elliott
662cf514b2aSRobert Elliott	  This block cipher mode is required for IPSec ESP (XFRM_ESP).
663f1f142adSRobert Elliott
664f1f142adSRobert Elliottconfig CRYPTO_CFB
665cf514b2aSRobert Elliott	tristate "CFB (Cipher Feedback)"
666f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
667f1f142adSRobert Elliott	select CRYPTO_MANAGER
668f1f142adSRobert Elliott	help
669cf514b2aSRobert Elliott	  CFB (Cipher Feedback) mode (NIST SP800-38A)
670cf514b2aSRobert Elliott
671cf514b2aSRobert Elliott	  This block cipher mode is required for TPM2 Cryptography.
672f1f142adSRobert Elliott
673f1f142adSRobert Elliottconfig CRYPTO_CTR
674cf514b2aSRobert Elliott	tristate "CTR (Counter)"
675f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
676f1f142adSRobert Elliott	select CRYPTO_MANAGER
677f1f142adSRobert Elliott	help
678cf514b2aSRobert Elliott	  CTR (Counter) mode (NIST SP800-38A)
679f1f142adSRobert Elliott
680f1f142adSRobert Elliottconfig CRYPTO_CTS
681cf514b2aSRobert Elliott	tristate "CTS (Cipher Text Stealing)"
682f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
683f1f142adSRobert Elliott	select CRYPTO_MANAGER
684f1f142adSRobert Elliott	help
685cf514b2aSRobert Elliott	  CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
686cf514b2aSRobert Elliott	  Addendum to SP800-38A (October 2010))
687cf514b2aSRobert Elliott
688f1f142adSRobert Elliott	  This mode is required for Kerberos gss mechanism support
689f1f142adSRobert Elliott	  for AES encryption.
690f1f142adSRobert Elliott
691f1f142adSRobert Elliottconfig CRYPTO_ECB
692cf514b2aSRobert Elliott	tristate "ECB (Electronic Codebook)"
69384534684SHerbert Xu	select CRYPTO_SKCIPHER2
694f1f142adSRobert Elliott	select CRYPTO_MANAGER
695f1f142adSRobert Elliott	help
696cf514b2aSRobert Elliott	  ECB (Electronic Codebook) mode (NIST SP800-38A)
697f1f142adSRobert Elliott
698f1f142adSRobert Elliottconfig CRYPTO_HCTR2
699cf514b2aSRobert Elliott	tristate "HCTR2"
700f1f142adSRobert Elliott	select CRYPTO_XCTR
701f1f142adSRobert Elliott	select CRYPTO_POLYVAL
702f1f142adSRobert Elliott	select CRYPTO_MANAGER
703f1f142adSRobert Elliott	help
704cf514b2aSRobert Elliott	  HCTR2 length-preserving encryption mode
705cf514b2aSRobert Elliott
706cf514b2aSRobert Elliott	  A mode for storage encryption that is efficient on processors with
707cf514b2aSRobert Elliott	  instructions to accelerate AES and carryless multiplication, e.g.
708cf514b2aSRobert Elliott	  x86 processors with AES-NI and CLMUL, and ARM processors with the
709cf514b2aSRobert Elliott	  ARMv8 crypto extensions.
710cf514b2aSRobert Elliott
711cf514b2aSRobert Elliott	  See https://eprint.iacr.org/2021/1441
712f1f142adSRobert Elliott
713f1f142adSRobert Elliottconfig CRYPTO_KEYWRAP
714cf514b2aSRobert Elliott	tristate "KW (AES Key Wrap)"
715f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
716f1f142adSRobert Elliott	select CRYPTO_MANAGER
717f1f142adSRobert Elliott	help
718cf514b2aSRobert Elliott	  KW (AES Key Wrap) authenticated encryption mode (NIST SP800-38F
719cf514b2aSRobert Elliott	  and RFC3394) without padding.
720f1f142adSRobert Elliott
721f1f142adSRobert Elliottconfig CRYPTO_LRW
722cf514b2aSRobert Elliott	tristate "LRW (Liskov Rivest Wagner)"
72361c581a4SArd Biesheuvel	select CRYPTO_LIB_GF128MUL
724f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
725f1f142adSRobert Elliott	select CRYPTO_MANAGER
726f1f142adSRobert Elliott	select CRYPTO_ECB
727f1f142adSRobert Elliott	help
728cf514b2aSRobert Elliott	  LRW (Liskov Rivest Wagner) mode
729cf514b2aSRobert Elliott
730cf514b2aSRobert Elliott	  A tweakable, non malleable, non movable
731f1f142adSRobert Elliott	  narrow block cipher mode for dm-crypt.  Use it with cipher
732f1f142adSRobert Elliott	  specification string aes-lrw-benbi, the key must be 256, 320 or 384.
733f1f142adSRobert Elliott	  The first 128, 192 or 256 bits in the key are used for AES and the
734f1f142adSRobert Elliott	  rest is used to tie each cipher block to its logical position.
735f1f142adSRobert Elliott
736cf514b2aSRobert Elliott	  See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
737cf514b2aSRobert Elliott
738f1f142adSRobert Elliottconfig CRYPTO_OFB
739cf514b2aSRobert Elliott	tristate "OFB (Output Feedback)"
740f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
741f1f142adSRobert Elliott	select CRYPTO_MANAGER
742f1f142adSRobert Elliott	help
743cf514b2aSRobert Elliott	  OFB (Output Feedback) mode (NIST SP800-38A)
744cf514b2aSRobert Elliott
745cf514b2aSRobert Elliott	  This mode makes a block cipher into a synchronous
746f1f142adSRobert Elliott	  stream cipher. It generates keystream blocks, which are then XORed
747f1f142adSRobert Elliott	  with the plaintext blocks to get the ciphertext. Flipping a bit in the
748f1f142adSRobert Elliott	  ciphertext produces a flipped bit in the plaintext at the same
749f1f142adSRobert Elliott	  location. This property allows many error correcting codes to function
750f1f142adSRobert Elliott	  normally even when applied before encryption.
751f1f142adSRobert Elliott
752f1f142adSRobert Elliottconfig CRYPTO_PCBC
753cf514b2aSRobert Elliott	tristate "PCBC (Propagating Cipher Block Chaining)"
754f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
755f1f142adSRobert Elliott	select CRYPTO_MANAGER
756f1f142adSRobert Elliott	help
757cf514b2aSRobert Elliott	  PCBC (Propagating Cipher Block Chaining) mode
758cf514b2aSRobert Elliott
759cf514b2aSRobert Elliott	  This block cipher mode is required for RxRPC.
760f1f142adSRobert Elliott
761f1f142adSRobert Elliottconfig CRYPTO_XCTR
762f1f142adSRobert Elliott	tristate
763f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
764f1f142adSRobert Elliott	select CRYPTO_MANAGER
765f1f142adSRobert Elliott	help
766cf514b2aSRobert Elliott	  XCTR (XOR Counter) mode for HCTR2
767cf514b2aSRobert Elliott
768cf514b2aSRobert Elliott	  This blockcipher mode is a variant of CTR mode using XORs and little-endian
769cf514b2aSRobert Elliott	  addition rather than big-endian arithmetic.
770cf514b2aSRobert Elliott
771f1f142adSRobert Elliott	  XCTR mode is used to implement HCTR2.
772f1f142adSRobert Elliott
773f1f142adSRobert Elliottconfig CRYPTO_XTS
774cf514b2aSRobert Elliott	tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
775f1f142adSRobert Elliott	select CRYPTO_SKCIPHER
776f1f142adSRobert Elliott	select CRYPTO_MANAGER
777f1f142adSRobert Elliott	select CRYPTO_ECB
778f1f142adSRobert Elliott	help
779cf514b2aSRobert Elliott	  XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
780cf514b2aSRobert Elliott	  and IEEE 1619)
781cf514b2aSRobert Elliott
782cf514b2aSRobert Elliott	  Use with aes-xts-plain, key size 256, 384 or 512 bits. This
783cf514b2aSRobert Elliott	  implementation currently can't handle a sectorsize which is not a
784cf514b2aSRobert Elliott	  multiple of 16 bytes.
785f1f142adSRobert Elliott
786f1f142adSRobert Elliottconfig CRYPTO_NHPOLY1305
787f1f142adSRobert Elliott	tristate
788f1f142adSRobert Elliott	select CRYPTO_HASH
789f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305_GENERIC
790f1f142adSRobert Elliott
791f1f142adSRobert Elliottendmenu
792f1f142adSRobert Elliott
793f1f142adSRobert Elliottmenu "AEAD (authenticated encryption with associated data) ciphers"
794f1f142adSRobert Elliott
795f1f142adSRobert Elliottconfig CRYPTO_AEGIS128
796e3d2eaddSRobert Elliott	tristate "AEGIS-128"
797f1f142adSRobert Elliott	select CRYPTO_AEAD
798f1f142adSRobert Elliott	select CRYPTO_AES  # for AES S-box tables
799f1f142adSRobert Elliott	help
800e3d2eaddSRobert Elliott	  AEGIS-128 AEAD algorithm
801f1f142adSRobert Elliott
802f1f142adSRobert Elliottconfig CRYPTO_AEGIS128_SIMD
803e3d2eaddSRobert Elliott	bool "AEGIS-128 (arm NEON, arm64 NEON)"
804f1f142adSRobert Elliott	depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
805f1f142adSRobert Elliott	default y
806e3d2eaddSRobert Elliott	help
807e3d2eaddSRobert Elliott	  AEGIS-128 AEAD algorithm
808e3d2eaddSRobert Elliott
809e3d2eaddSRobert Elliott	  Architecture: arm or arm64 using:
810e3d2eaddSRobert Elliott	  - NEON (Advanced SIMD) extension
811f1f142adSRobert Elliott
812f1f142adSRobert Elliottconfig CRYPTO_CHACHA20POLY1305
813e3d2eaddSRobert Elliott	tristate "ChaCha20-Poly1305"
814f1f142adSRobert Elliott	select CRYPTO_CHACHA20
815f1f142adSRobert Elliott	select CRYPTO_POLY1305
816f1f142adSRobert Elliott	select CRYPTO_AEAD
817f1f142adSRobert Elliott	select CRYPTO_MANAGER
818f1f142adSRobert Elliott	help
819e3d2eaddSRobert Elliott	  ChaCha20 stream cipher and Poly1305 authenticator combined
820e3d2eaddSRobert Elliott	  mode (RFC8439)
821f1f142adSRobert Elliott
822f1f142adSRobert Elliottconfig CRYPTO_CCM
823cf514b2aSRobert Elliott	tristate "CCM (Counter with Cipher Block Chaining-MAC)"
824f1f142adSRobert Elliott	select CRYPTO_CTR
825f1f142adSRobert Elliott	select CRYPTO_HASH
826f1f142adSRobert Elliott	select CRYPTO_AEAD
827f1f142adSRobert Elliott	select CRYPTO_MANAGER
828f1f142adSRobert Elliott	help
829e3d2eaddSRobert Elliott	  CCM (Counter with Cipher Block Chaining-Message Authentication Code)
830e3d2eaddSRobert Elliott	  authenticated encryption mode (NIST SP800-38C)
831f1f142adSRobert Elliott
832f1f142adSRobert Elliottconfig CRYPTO_GCM
833cf514b2aSRobert Elliott	tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
834f1f142adSRobert Elliott	select CRYPTO_CTR
835f1f142adSRobert Elliott	select CRYPTO_AEAD
836f1f142adSRobert Elliott	select CRYPTO_GHASH
837f1f142adSRobert Elliott	select CRYPTO_NULL
838f1f142adSRobert Elliott	select CRYPTO_MANAGER
839f1f142adSRobert Elliott	help
840e3d2eaddSRobert Elliott	  GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
841e3d2eaddSRobert Elliott	  (GCM Message Authentication Code) (NIST SP800-38D)
842e3d2eaddSRobert Elliott
843e3d2eaddSRobert Elliott	  This is required for IPSec ESP (XFRM_ESP).
844f1f142adSRobert Elliott
845ba51738fSHerbert Xuconfig CRYPTO_GENIV
846ba51738fSHerbert Xu	tristate
847ba51738fSHerbert Xu	select CRYPTO_AEAD
848ba51738fSHerbert Xu	select CRYPTO_NULL
849ba51738fSHerbert Xu	select CRYPTO_MANAGER
850ba51738fSHerbert Xu	select CRYPTO_RNG_DEFAULT
851ba51738fSHerbert Xu
852f1f142adSRobert Elliottconfig CRYPTO_SEQIV
853f1f142adSRobert Elliott	tristate "Sequence Number IV Generator"
854ba51738fSHerbert Xu	select CRYPTO_GENIV
855f1f142adSRobert Elliott	help
856e3d2eaddSRobert Elliott	  Sequence Number IV generator
857e3d2eaddSRobert Elliott
858f1f142adSRobert Elliott	  This IV generator generates an IV based on a sequence number by
859e3d2eaddSRobert Elliott	  xoring it with a salt.  This algorithm is mainly useful for CTR.
860e3d2eaddSRobert Elliott
861e3d2eaddSRobert Elliott	  This is required for IPsec ESP (XFRM_ESP).
862f1f142adSRobert Elliott
863f1f142adSRobert Elliottconfig CRYPTO_ECHAINIV
864f1f142adSRobert Elliott	tristate "Encrypted Chain IV Generator"
865ba51738fSHerbert Xu	select CRYPTO_GENIV
866f1f142adSRobert Elliott	help
867e3d2eaddSRobert Elliott	  Encrypted Chain IV generator
868e3d2eaddSRobert Elliott
869f1f142adSRobert Elliott	  This IV generator generates an IV based on the encryption of
870f1f142adSRobert Elliott	  a sequence number xored with a salt.  This is the default
871f1f142adSRobert Elliott	  algorithm for CBC.
872f1f142adSRobert Elliott
873f1f142adSRobert Elliottconfig CRYPTO_ESSIV
874e3d2eaddSRobert Elliott	tristate "Encrypted Salt-Sector IV Generator"
875f1f142adSRobert Elliott	select CRYPTO_AUTHENC
876f1f142adSRobert Elliott	help
877e3d2eaddSRobert Elliott	  Encrypted Salt-Sector IV generator
878e3d2eaddSRobert Elliott
879e3d2eaddSRobert Elliott	  This IV generator is used in some cases by fscrypt and/or
880f1f142adSRobert Elliott	  dm-crypt. It uses the hash of the block encryption key as the
881f1f142adSRobert Elliott	  symmetric key for a block encryption pass applied to the input
882f1f142adSRobert Elliott	  IV, making low entropy IV sources more suitable for block
883f1f142adSRobert Elliott	  encryption.
884f1f142adSRobert Elliott
885f1f142adSRobert Elliott	  This driver implements a crypto API template that can be
886f1f142adSRobert Elliott	  instantiated either as an skcipher or as an AEAD (depending on the
887f1f142adSRobert Elliott	  type of the first template argument), and which defers encryption
888f1f142adSRobert Elliott	  and decryption requests to the encapsulated cipher after applying
889f1f142adSRobert Elliott	  ESSIV to the input IV. Note that in the AEAD case, it is assumed
890f1f142adSRobert Elliott	  that the keys are presented in the same format used by the authenc
891f1f142adSRobert Elliott	  template, and that the IV appears at the end of the authenticated
892f1f142adSRobert Elliott	  associated data (AAD) region (which is how dm-crypt uses it.)
893f1f142adSRobert Elliott
894f1f142adSRobert Elliott	  Note that the use of ESSIV is not recommended for new deployments,
895f1f142adSRobert Elliott	  and so this only needs to be enabled when interoperability with
896f1f142adSRobert Elliott	  existing encrypted volumes of filesystems is required, or when
897f1f142adSRobert Elliott	  building for a particular system that requires it (e.g., when
898f1f142adSRobert Elliott	  the SoC in question has accelerated CBC but not XTS, making CBC
899f1f142adSRobert Elliott	  combined with ESSIV the only feasible mode for h/w accelerated
900f1f142adSRobert Elliott	  block encryption)
901f1f142adSRobert Elliott
902f1f142adSRobert Elliottendmenu
903f1f142adSRobert Elliott
904f1f142adSRobert Elliottmenu "Hashes, digests, and MACs"
905f1f142adSRobert Elliott
906f1f142adSRobert Elliottconfig CRYPTO_BLAKE2B
9073f342a23SRobert Elliott	tristate "BLAKE2b"
908f1f142adSRobert Elliott	select CRYPTO_HASH
909f1f142adSRobert Elliott	help
9103f342a23SRobert Elliott	  BLAKE2b cryptographic hash function (RFC 7693)
9113f342a23SRobert Elliott
9123f342a23SRobert Elliott	  BLAKE2b is optimized for 64-bit platforms and can produce digests
9133f342a23SRobert Elliott	  of any size between 1 and 64 bytes. The keyed hash is also implemented.
914f1f142adSRobert Elliott
915f1f142adSRobert Elliott	  This module provides the following algorithms:
916f1f142adSRobert Elliott	  - blake2b-160
917f1f142adSRobert Elliott	  - blake2b-256
918f1f142adSRobert Elliott	  - blake2b-384
919f1f142adSRobert Elliott	  - blake2b-512
920f1f142adSRobert Elliott
9213f342a23SRobert Elliott	  Used by the btrfs filesystem.
9223f342a23SRobert Elliott
9233f342a23SRobert Elliott	  See https://blake2.net for further information.
9243f342a23SRobert Elliott
925f1f142adSRobert Elliottconfig CRYPTO_CMAC
9263f342a23SRobert Elliott	tristate "CMAC (Cipher-based MAC)"
927f1f142adSRobert Elliott	select CRYPTO_HASH
928f1f142adSRobert Elliott	select CRYPTO_MANAGER
929f1f142adSRobert Elliott	help
9303f342a23SRobert Elliott	  CMAC (Cipher-based Message Authentication Code) authentication
9313f342a23SRobert Elliott	  mode (NIST SP800-38B and IETF RFC4493)
932f1f142adSRobert Elliott
933f1f142adSRobert Elliottconfig CRYPTO_GHASH
9343f342a23SRobert Elliott	tristate "GHASH"
935f1f142adSRobert Elliott	select CRYPTO_HASH
93661c581a4SArd Biesheuvel	select CRYPTO_LIB_GF128MUL
937f1f142adSRobert Elliott	help
9383f342a23SRobert Elliott	  GCM GHASH function (NIST SP800-38D)
939f1f142adSRobert Elliott
940f1f142adSRobert Elliottconfig CRYPTO_HMAC
9413f342a23SRobert Elliott	tristate "HMAC (Keyed-Hash MAC)"
942f1f142adSRobert Elliott	select CRYPTO_HASH
943f1f142adSRobert Elliott	select CRYPTO_MANAGER
944f1f142adSRobert Elliott	help
9453f342a23SRobert Elliott	  HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
9463f342a23SRobert Elliott	  RFC2104)
9473f342a23SRobert Elliott
9483f342a23SRobert Elliott	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
949f1f142adSRobert Elliott
950f1f142adSRobert Elliottconfig CRYPTO_MD4
9513f342a23SRobert Elliott	tristate "MD4"
952f1f142adSRobert Elliott	select CRYPTO_HASH
953f1f142adSRobert Elliott	help
9543f342a23SRobert Elliott	  MD4 message digest algorithm (RFC1320)
955f1f142adSRobert Elliott
956f1f142adSRobert Elliottconfig CRYPTO_MD5
9573f342a23SRobert Elliott	tristate "MD5"
958f1f142adSRobert Elliott	select CRYPTO_HASH
959f1f142adSRobert Elliott	help
9603f342a23SRobert Elliott	  MD5 message digest algorithm (RFC1321)
961f1f142adSRobert Elliott
962f1f142adSRobert Elliottconfig CRYPTO_MICHAEL_MIC
9633f342a23SRobert Elliott	tristate "Michael MIC"
964f1f142adSRobert Elliott	select CRYPTO_HASH
965f1f142adSRobert Elliott	help
9663f342a23SRobert Elliott	  Michael MIC (Message Integrity Code) (IEEE 802.11i)
9673f342a23SRobert Elliott
9683f342a23SRobert Elliott	  Defined by the IEEE 802.11i TKIP (Temporal Key Integrity Protocol),
9693f342a23SRobert Elliott	  known as WPA (Wif-Fi Protected Access).
9703f342a23SRobert Elliott
9713f342a23SRobert Elliott	  This algorithm is required for TKIP, but it should not be used for
9723f342a23SRobert Elliott	  other purposes because of the weakness of the algorithm.
973f1f142adSRobert Elliott
974f1f142adSRobert Elliottconfig CRYPTO_POLYVAL
975f1f142adSRobert Elliott	tristate
976f1f142adSRobert Elliott	select CRYPTO_HASH
97761c581a4SArd Biesheuvel	select CRYPTO_LIB_GF128MUL
978f1f142adSRobert Elliott	help
9793f342a23SRobert Elliott	  POLYVAL hash function for HCTR2
9803f342a23SRobert Elliott
9813f342a23SRobert Elliott	  This is used in HCTR2.  It is not a general-purpose
982f1f142adSRobert Elliott	  cryptographic hash function.
983f1f142adSRobert Elliott
984f1f142adSRobert Elliottconfig CRYPTO_POLY1305
9853f342a23SRobert Elliott	tristate "Poly1305"
986f1f142adSRobert Elliott	select CRYPTO_HASH
987f1f142adSRobert Elliott	select CRYPTO_LIB_POLY1305_GENERIC
988f1f142adSRobert Elliott	help
9893f342a23SRobert Elliott	  Poly1305 authenticator algorithm (RFC7539)
990f1f142adSRobert Elliott
991f1f142adSRobert Elliott	  Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
992f1f142adSRobert Elliott	  It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
993f1f142adSRobert Elliott	  in IETF protocols. This is the portable C implementation of Poly1305.
994f1f142adSRobert Elliott
995f1f142adSRobert Elliottconfig CRYPTO_RMD160
9963f342a23SRobert Elliott	tristate "RIPEMD-160"
997f1f142adSRobert Elliott	select CRYPTO_HASH
998f1f142adSRobert Elliott	help
9993f342a23SRobert Elliott	  RIPEMD-160 hash function (ISO/IEC 10118-3)
1000f1f142adSRobert Elliott
1001f1f142adSRobert Elliott	  RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
1002f1f142adSRobert Elliott	  to be used as a secure replacement for the 128-bit hash functions
1003f1f142adSRobert Elliott	  MD4, MD5 and its predecessor RIPEMD
1004f1f142adSRobert Elliott	  (not to be confused with RIPEMD-128).
1005f1f142adSRobert Elliott
10063f342a23SRobert Elliott	  Its speed is comparable to SHA-1 and there are no known attacks
1007f1f142adSRobert Elliott	  against RIPEMD-160.
1008f1f142adSRobert Elliott
1009f1f142adSRobert Elliott	  Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
10103f342a23SRobert Elliott	  See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
10113f342a23SRobert Elliott	  for further information.
1012f1f142adSRobert Elliott
1013f1f142adSRobert Elliottconfig CRYPTO_SHA1
10143f342a23SRobert Elliott	tristate "SHA-1"
1015f1f142adSRobert Elliott	select CRYPTO_HASH
1016f1f142adSRobert Elliott	select CRYPTO_LIB_SHA1
1017f1f142adSRobert Elliott	help
10183f342a23SRobert Elliott	  SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3)
1019f1f142adSRobert Elliott
1020f1f142adSRobert Elliottconfig CRYPTO_SHA256
10213f342a23SRobert Elliott	tristate "SHA-224 and SHA-256"
1022f1f142adSRobert Elliott	select CRYPTO_HASH
1023f1f142adSRobert Elliott	select CRYPTO_LIB_SHA256
1024f1f142adSRobert Elliott	help
10253f342a23SRobert Elliott	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC 10118-3)
1026f1f142adSRobert Elliott
10273f342a23SRobert Elliott	  This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
10283f342a23SRobert Elliott	  Used by the btrfs filesystem, Ceph, NFS, and SMB.
1029f1f142adSRobert Elliott
1030f1f142adSRobert Elliottconfig CRYPTO_SHA512
10313f342a23SRobert Elliott	tristate "SHA-384 and SHA-512"
1032f1f142adSRobert Elliott	select CRYPTO_HASH
1033f1f142adSRobert Elliott	help
10343f342a23SRobert Elliott	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC 10118-3)
1035f1f142adSRobert Elliott
1036f1f142adSRobert Elliottconfig CRYPTO_SHA3
10373f342a23SRobert Elliott	tristate "SHA-3"
1038f1f142adSRobert Elliott	select CRYPTO_HASH
1039f1f142adSRobert Elliott	help
10403f342a23SRobert Elliott	  SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
1041f1f142adSRobert Elliott
1042f1f142adSRobert Elliottconfig CRYPTO_SM3
1043f1f142adSRobert Elliott	tristate
1044f1f142adSRobert Elliott
1045f1f142adSRobert Elliottconfig CRYPTO_SM3_GENERIC
10463f342a23SRobert Elliott	tristate "SM3 (ShangMi 3)"
1047f1f142adSRobert Elliott	select CRYPTO_HASH
1048f1f142adSRobert Elliott	select CRYPTO_SM3
1049f1f142adSRobert Elliott	help
10503f342a23SRobert Elliott	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
10513f342a23SRobert Elliott
10523f342a23SRobert Elliott	  This is part of the Chinese Commercial Cryptography suite.
1053f1f142adSRobert Elliott
1054f1f142adSRobert Elliott	  References:
1055f1f142adSRobert Elliott	  http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
1056f1f142adSRobert Elliott	  https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
1057f1f142adSRobert Elliott
1058f1f142adSRobert Elliottconfig CRYPTO_STREEBOG
10593f342a23SRobert Elliott	tristate "Streebog"
1060f1f142adSRobert Elliott	select CRYPTO_HASH
1061f1f142adSRobert Elliott	help
10623f342a23SRobert Elliott	  Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
10633f342a23SRobert Elliott
10643f342a23SRobert Elliott	  This is one of the Russian cryptographic standard algorithms (called
10653f342a23SRobert Elliott	  GOST algorithms). This setting enables two hash algorithms with
10663f342a23SRobert Elliott	  256 and 512 bits output.
1067f1f142adSRobert Elliott
1068f1f142adSRobert Elliott	  References:
1069f1f142adSRobert Elliott	  https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
1070f1f142adSRobert Elliott	  https://tools.ietf.org/html/rfc6986
1071f1f142adSRobert Elliott
1072f1f142adSRobert Elliottconfig CRYPTO_VMAC
10733f342a23SRobert Elliott	tristate "VMAC"
1074f1f142adSRobert Elliott	select CRYPTO_HASH
1075f1f142adSRobert Elliott	select CRYPTO_MANAGER
1076f1f142adSRobert Elliott	help
1077f1f142adSRobert Elliott	  VMAC is a message authentication algorithm designed for
1078f1f142adSRobert Elliott	  very high speed on 64-bit architectures.
1079f1f142adSRobert Elliott
10803f342a23SRobert Elliott	  See https://fastcrypto.org/vmac for further information.
1081f1f142adSRobert Elliott
1082f1f142adSRobert Elliottconfig CRYPTO_WP512
10833f342a23SRobert Elliott	tristate "Whirlpool"
1084f1f142adSRobert Elliott	select CRYPTO_HASH
1085f1f142adSRobert Elliott	help
10863f342a23SRobert Elliott	  Whirlpool hash function (ISO/IEC 10118-3)
10873f342a23SRobert Elliott
10883f342a23SRobert Elliott	  512, 384 and 256-bit hashes.
1089f1f142adSRobert Elliott
1090f1f142adSRobert Elliott	  Whirlpool-512 is part of the NESSIE cryptographic primitives.
1091f1f142adSRobert Elliott
10923f342a23SRobert Elliott	  See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
10933f342a23SRobert Elliott	  for further information.
1094f1f142adSRobert Elliott
1095f1f142adSRobert Elliottconfig CRYPTO_XCBC
10963f342a23SRobert Elliott	tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
1097f1f142adSRobert Elliott	select CRYPTO_HASH
1098f1f142adSRobert Elliott	select CRYPTO_MANAGER
1099f1f142adSRobert Elliott	help
11003f342a23SRobert Elliott	  XCBC-MAC (Extended Cipher Block Chaining Message Authentication
11013f342a23SRobert Elliott	  Code) (RFC3566)
1102f1f142adSRobert Elliott
1103f1f142adSRobert Elliottconfig CRYPTO_XXHASH
11043f342a23SRobert Elliott	tristate "xxHash"
1105f1f142adSRobert Elliott	select CRYPTO_HASH
1106f1f142adSRobert Elliott	select XXHASH
1107f1f142adSRobert Elliott	help
11083f342a23SRobert Elliott	  xxHash non-cryptographic hash algorithm
11093f342a23SRobert Elliott
11103f342a23SRobert Elliott	  Extremely fast, working at speeds close to RAM limits.
11113f342a23SRobert Elliott
11123f342a23SRobert Elliott	  Used by the btrfs filesystem.
1113f1f142adSRobert Elliott
1114f1f142adSRobert Elliottendmenu
1115f1f142adSRobert Elliott
1116f1f142adSRobert Elliottmenu "CRCs (cyclic redundancy checks)"
1117f1f142adSRobert Elliott
1118f1f142adSRobert Elliottconfig CRYPTO_CRC32C
1119ec84348dSRobert Elliott	tristate "CRC32c"
1120f1f142adSRobert Elliott	select CRYPTO_HASH
1121f1f142adSRobert Elliott	select CRC32
1122f1f142adSRobert Elliott	help
1123ec84348dSRobert Elliott	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1124ec84348dSRobert Elliott
1125ec84348dSRobert Elliott	  A 32-bit CRC (cyclic redundancy check) with a polynomial defined
1126ec84348dSRobert Elliott	  by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
1127ec84348dSRobert Elliott	  Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
1128ec84348dSRobert Elliott	  on Communications, Vol. 41, No. 6, June 1993, selected for use with
1129ec84348dSRobert Elliott	  iSCSI.
1130ec84348dSRobert Elliott
1131ec84348dSRobert Elliott	  Used by btrfs, ext4, jbd2, NVMeoF/TCP, and iSCSI.
1132f1f142adSRobert Elliott
1133f1f142adSRobert Elliottconfig CRYPTO_CRC32
1134ec84348dSRobert Elliott	tristate "CRC32"
1135f1f142adSRobert Elliott	select CRYPTO_HASH
1136f1f142adSRobert Elliott	select CRC32
1137f1f142adSRobert Elliott	help
1138ec84348dSRobert Elliott	  CRC32 CRC algorithm (IEEE 802.3)
1139ec84348dSRobert Elliott
1140ec84348dSRobert Elliott	  Used by RoCEv2 and f2fs.
1141f1f142adSRobert Elliott
1142f1f142adSRobert Elliottconfig CRYPTO_CRCT10DIF
1143ec84348dSRobert Elliott	tristate "CRCT10DIF"
1144f1f142adSRobert Elliott	select CRYPTO_HASH
1145f1f142adSRobert Elliott	help
1146ec84348dSRobert Elliott	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
1147ec84348dSRobert Elliott
1148ec84348dSRobert Elliott	  CRC algorithm used by the SCSI Block Commands standard.
1149f1f142adSRobert Elliott
1150f1f142adSRobert Elliottconfig CRYPTO_CRC64_ROCKSOFT
1151ec84348dSRobert Elliott	tristate "CRC64 based on Rocksoft Model algorithm"
1152f1f142adSRobert Elliott	depends on CRC64
1153f1f142adSRobert Elliott	select CRYPTO_HASH
1154ec84348dSRobert Elliott	help
1155ec84348dSRobert Elliott	  CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm
1156ec84348dSRobert Elliott
1157ec84348dSRobert Elliott	  Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY)
1158ec84348dSRobert Elliott
1159ec84348dSRobert Elliott	  See https://zlib.net/crc_v3.txt
1160f1f142adSRobert Elliott
1161f1f142adSRobert Elliottendmenu
1162f1f142adSRobert Elliott
1163f1f142adSRobert Elliottmenu "Compression"
1164584fffc8SSebastian Siewior
11651da177e4SLinus Torvaldsconfig CRYPTO_DEFLATE
1166a9a98d49SRobert Elliott	tristate "Deflate"
1167cce9e06dSHerbert Xu	select CRYPTO_ALGAPI
1168f6ded09dSGiovanni Cabiddu	select CRYPTO_ACOMP2
11691da177e4SLinus Torvalds	select ZLIB_INFLATE
11701da177e4SLinus Torvalds	select ZLIB_DEFLATE
11711da177e4SLinus Torvalds	help
1172a9a98d49SRobert Elliott	  Deflate compression algorithm (RFC1951)
11731da177e4SLinus Torvalds
1174a9a98d49SRobert Elliott	  Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
11751da177e4SLinus Torvalds
11760b77abb3SZoltan Sogorconfig CRYPTO_LZO
1177a9a98d49SRobert Elliott	tristate "LZO"
11780b77abb3SZoltan Sogor	select CRYPTO_ALGAPI
1179ac9d2c4bSGiovanni Cabiddu	select CRYPTO_ACOMP2
11800b77abb3SZoltan Sogor	select LZO_COMPRESS
11810b77abb3SZoltan Sogor	select LZO_DECOMPRESS
11820b77abb3SZoltan Sogor	help
1183a9a98d49SRobert Elliott	  LZO compression algorithm
1184a9a98d49SRobert Elliott
1185a9a98d49SRobert Elliott	  See https://www.oberhumer.com/opensource/lzo/ for further information.
11860b77abb3SZoltan Sogor
118735a1fc18SSeth Jenningsconfig CRYPTO_842
1188a9a98d49SRobert Elliott	tristate "842"
11892062c5b6SDan Streetman	select CRYPTO_ALGAPI
11906a8de3aeSGiovanni Cabiddu	select CRYPTO_ACOMP2
11912062c5b6SDan Streetman	select 842_COMPRESS
11922062c5b6SDan Streetman	select 842_DECOMPRESS
119335a1fc18SSeth Jennings	help
1194a9a98d49SRobert Elliott	  842 compression algorithm by IBM
1195a9a98d49SRobert Elliott
1196a9a98d49SRobert Elliott	  See https://github.com/plauth/lib842 for further information.
119735a1fc18SSeth Jennings
11980ea8530dSChanho Minconfig CRYPTO_LZ4
1199a9a98d49SRobert Elliott	tristate "LZ4"
12000ea8530dSChanho Min	select CRYPTO_ALGAPI
12018cd9330eSGiovanni Cabiddu	select CRYPTO_ACOMP2
12020ea8530dSChanho Min	select LZ4_COMPRESS
12030ea8530dSChanho Min	select LZ4_DECOMPRESS
12040ea8530dSChanho Min	help
1205a9a98d49SRobert Elliott	  LZ4 compression algorithm
1206a9a98d49SRobert Elliott
1207a9a98d49SRobert Elliott	  See https://github.com/lz4/lz4 for further information.
12080ea8530dSChanho Min
12090ea8530dSChanho Minconfig CRYPTO_LZ4HC
1210a9a98d49SRobert Elliott	tristate "LZ4HC"
12110ea8530dSChanho Min	select CRYPTO_ALGAPI
121291d53d96SGiovanni Cabiddu	select CRYPTO_ACOMP2
12130ea8530dSChanho Min	select LZ4HC_COMPRESS
12140ea8530dSChanho Min	select LZ4_DECOMPRESS
12150ea8530dSChanho Min	help
1216a9a98d49SRobert Elliott	  LZ4 high compression mode algorithm
1217a9a98d49SRobert Elliott
1218a9a98d49SRobert Elliott	  See https://github.com/lz4/lz4 for further information.
12190ea8530dSChanho Min
1220d28fc3dbSNick Terrellconfig CRYPTO_ZSTD
1221a9a98d49SRobert Elliott	tristate "Zstd"
1222d28fc3dbSNick Terrell	select CRYPTO_ALGAPI
1223d28fc3dbSNick Terrell	select CRYPTO_ACOMP2
1224d28fc3dbSNick Terrell	select ZSTD_COMPRESS
1225d28fc3dbSNick Terrell	select ZSTD_DECOMPRESS
1226d28fc3dbSNick Terrell	help
1227a9a98d49SRobert Elliott	  zstd compression algorithm
1228a9a98d49SRobert Elliott
1229a9a98d49SRobert Elliott	  See https://github.com/facebook/zstd for further information.
1230d28fc3dbSNick Terrell
1231f1f142adSRobert Elliottendmenu
1232f1f142adSRobert Elliott
1233f1f142adSRobert Elliottmenu "Random number generation"
123417f0f4a4SNeil Horman
123517f0f4a4SNeil Hormanconfig CRYPTO_ANSI_CPRNG
1236a9a98d49SRobert Elliott	tristate "ANSI PRNG (Pseudo Random Number Generator)"
123717f0f4a4SNeil Horman	select CRYPTO_AES
123817f0f4a4SNeil Horman	select CRYPTO_RNG
123917f0f4a4SNeil Horman	help
1240a9a98d49SRobert Elliott	  Pseudo RNG (random number generator) (ANSI X9.31 Appendix A.2.4)
1241a9a98d49SRobert Elliott
1242a9a98d49SRobert Elliott	  This uses the AES cipher algorithm.
1243a9a98d49SRobert Elliott
1244a9a98d49SRobert Elliott	  Note that this option must be enabled if CRYPTO_FIPS is selected
124517f0f4a4SNeil Horman
1246f2c89a10SHerbert Xumenuconfig CRYPTO_DRBG_MENU
1247a9a98d49SRobert Elliott	tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
1248419090c6SStephan Mueller	help
1249a9a98d49SRobert Elliott	  DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
1250a9a98d49SRobert Elliott
1251a9a98d49SRobert Elliott	  In the following submenu, one or more of the DRBG types must be selected.
1252419090c6SStephan Mueller
1253f2c89a10SHerbert Xuif CRYPTO_DRBG_MENU
1254419090c6SStephan Mueller
1255419090c6SStephan Muellerconfig CRYPTO_DRBG_HMAC
1256401e4238SHerbert Xu	bool
1257419090c6SStephan Mueller	default y
1258419090c6SStephan Mueller	select CRYPTO_HMAC
12595261cdf4SStephan Mueller	select CRYPTO_SHA512
1260419090c6SStephan Mueller
1261419090c6SStephan Muellerconfig CRYPTO_DRBG_HASH
1262a9a98d49SRobert Elliott	bool "Hash_DRBG"
1263826775bbSHerbert Xu	select CRYPTO_SHA256
1264419090c6SStephan Mueller	help
1265a9a98d49SRobert Elliott	  Hash_DRBG variant as defined in NIST SP800-90A.
1266a9a98d49SRobert Elliott
1267a9a98d49SRobert Elliott	  This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms.
1268419090c6SStephan Mueller
1269419090c6SStephan Muellerconfig CRYPTO_DRBG_CTR
1270a9a98d49SRobert Elliott	bool "CTR_DRBG"
1271419090c6SStephan Mueller	select CRYPTO_AES
1272d6fc1a45SCorentin Labbe	select CRYPTO_CTR
1273419090c6SStephan Mueller	help
1274a9a98d49SRobert Elliott	  CTR_DRBG variant as defined in NIST SP800-90A.
1275a9a98d49SRobert Elliott
1276a9a98d49SRobert Elliott	  This uses the AES cipher algorithm with the counter block mode.
1277419090c6SStephan Mueller
1278f2c89a10SHerbert Xuconfig CRYPTO_DRBG
1279f2c89a10SHerbert Xu	tristate
1280401e4238SHerbert Xu	default CRYPTO_DRBG_MENU
1281f2c89a10SHerbert Xu	select CRYPTO_RNG
1282bb5530e4SStephan Mueller	select CRYPTO_JITTERENTROPY
1283f2c89a10SHerbert Xu
1284f2c89a10SHerbert Xuendif	# if CRYPTO_DRBG_MENU
1285419090c6SStephan Mueller
1286bb5530e4SStephan Muellerconfig CRYPTO_JITTERENTROPY
1287a9a98d49SRobert Elliott	tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
12882f313e02SArnd Bergmann	select CRYPTO_RNG
1289bb897c55SStephan Müller	select CRYPTO_SHA3
1290bb5530e4SStephan Mueller	help
1291a9a98d49SRobert Elliott	  CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
1292a9a98d49SRobert Elliott
1293a9a98d49SRobert Elliott	  A non-physical non-deterministic ("true") RNG (e.g., an entropy source
1294a9a98d49SRobert Elliott	  compliant with NIST SP800-90B) intended to provide a seed to a
1295a9a98d49SRobert Elliott	  deterministic RNG (e.g.  per NIST SP800-90C).
1296a9a98d49SRobert Elliott	  This RNG does not perform any cryptographic whitening of the generated
1297a9a98d49SRobert Elliott
1298a9a98d49SRobert Elliott	  See https://www.chronox.de/jent.html
1299bb5530e4SStephan Mueller
1300*e7ed6473SHerbert Xuif CRYPTO_JITTERENTROPY
1301*e7ed6473SHerbert Xuif CRYPTO_FIPS && EXPERT
1302*e7ed6473SHerbert Xu
130359bcfd78SStephan Müllerchoice
130459bcfd78SStephan Müller	prompt "CPU Jitter RNG Memory Size"
130559bcfd78SStephan Müller	default CRYPTO_JITTERENTROPY_MEMSIZE_2
130659bcfd78SStephan Müller	help
130759bcfd78SStephan Müller	  The Jitter RNG measures the execution time of memory accesses.
130859bcfd78SStephan Müller	  Multiple consecutive memory accesses are performed. If the memory
130959bcfd78SStephan Müller	  size fits into a cache (e.g. L1), only the memory access timing
131059bcfd78SStephan Müller	  to that cache is measured. The closer the cache is to the CPU
131159bcfd78SStephan Müller	  the less variations are measured and thus the less entropy is
131259bcfd78SStephan Müller	  obtained. Thus, if the memory size fits into the L1 cache, the
131359bcfd78SStephan Müller	  obtained entropy is less than if the memory size fits within
131459bcfd78SStephan Müller	  L1 + L2, which in turn is less if the memory fits into
131559bcfd78SStephan Müller	  L1 + L2 + L3. Thus, by selecting a different memory size,
131659bcfd78SStephan Müller	  the entropy rate produced by the Jitter RNG can be modified.
131759bcfd78SStephan Müller
131859bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_2
131959bcfd78SStephan Müller		bool "2048 Bytes (default)"
132059bcfd78SStephan Müller
132159bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_128
132259bcfd78SStephan Müller		bool "128 kBytes"
132359bcfd78SStephan Müller
132459bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_1024
132559bcfd78SStephan Müller		bool "1024 kBytes"
132659bcfd78SStephan Müller
132759bcfd78SStephan Müller	config CRYPTO_JITTERENTROPY_MEMSIZE_8192
132859bcfd78SStephan Müller		bool "8192 kBytes"
132959bcfd78SStephan Müllerendchoice
133059bcfd78SStephan Müller
133159bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
133259bcfd78SStephan Müller	int
133359bcfd78SStephan Müller	default 64 if CRYPTO_JITTERENTROPY_MEMSIZE_2
133459bcfd78SStephan Müller	default 512 if CRYPTO_JITTERENTROPY_MEMSIZE_128
133559bcfd78SStephan Müller	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
133659bcfd78SStephan Müller	default 4096 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
133759bcfd78SStephan Müller
133859bcfd78SStephan Müllerconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
133959bcfd78SStephan Müller	int
134059bcfd78SStephan Müller	default 32 if CRYPTO_JITTERENTROPY_MEMSIZE_2
134159bcfd78SStephan Müller	default 256 if CRYPTO_JITTERENTROPY_MEMSIZE_128
134259bcfd78SStephan Müller	default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
134359bcfd78SStephan Müller	default 2048 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
134459bcfd78SStephan Müller
13450baa8fabSStephan Müllerconfig CRYPTO_JITTERENTROPY_OSR
13460baa8fabSStephan Müller	int "CPU Jitter RNG Oversampling Rate"
13470baa8fabSStephan Müller	range 1 15
13480baa8fabSStephan Müller	default 1
13490baa8fabSStephan Müller	help
13500baa8fabSStephan Müller	  The Jitter RNG allows the specification of an oversampling rate (OSR).
13510baa8fabSStephan Müller	  The Jitter RNG operation requires a fixed amount of timing
13520baa8fabSStephan Müller	  measurements to produce one output block of random numbers. The
13530baa8fabSStephan Müller	  OSR value is multiplied with the amount of timing measurements to
13540baa8fabSStephan Müller	  generate one output block. Thus, the timing measurement is oversampled
13550baa8fabSStephan Müller	  by the OSR factor. The oversampling allows the Jitter RNG to operate
13560baa8fabSStephan Müller	  on hardware whose timers deliver limited amount of entropy (e.g.
13570baa8fabSStephan Müller	  the timer is coarse) by setting the OSR to a higher value. The
13580baa8fabSStephan Müller	  trade-off, however, is that the Jitter RNG now requires more time
13590baa8fabSStephan Müller	  to generate random numbers.
13600baa8fabSStephan Müller
136169f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_TESTINTERFACE
136269f1c387SStephan Müller	bool "CPU Jitter RNG Test Interface"
136369f1c387SStephan Müller	help
136469f1c387SStephan Müller	  The test interface allows a privileged process to capture
136569f1c387SStephan Müller	  the raw unconditioned high resolution time stamp noise that
136669f1c387SStephan Müller	  is collected by the Jitter RNG for statistical analysis. As
136769f1c387SStephan Müller	  this data is used at the same time to generate random bits,
136869f1c387SStephan Müller	  the Jitter RNG operates in an insecure mode as long as the
136969f1c387SStephan Müller	  recording is enabled. This interface therefore is only
137069f1c387SStephan Müller	  intended for testing purposes and is not suitable for
137169f1c387SStephan Müller	  production systems.
137269f1c387SStephan Müller
137369f1c387SStephan Müller	  The raw noise data can be obtained using the jent_raw_hires
137469f1c387SStephan Müller	  debugfs file. Using the option
137569f1c387SStephan Müller	  jitterentropy_testing.boot_raw_hires_test=1 the raw noise of
137669f1c387SStephan Müller	  the first 1000 entropy events since boot can be sampled.
137769f1c387SStephan Müller
137869f1c387SStephan Müller	  If unsure, select N.
137969f1c387SStephan Müller
1380*e7ed6473SHerbert Xuendif	# if CRYPTO_FIPS && EXPERT
1381*e7ed6473SHerbert Xu
1382*e7ed6473SHerbert Xuif !(CRYPTO_FIPS && EXPERT)
1383*e7ed6473SHerbert Xu
1384*e7ed6473SHerbert Xuconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
1385*e7ed6473SHerbert Xu	int
1386*e7ed6473SHerbert Xu	default 64
1387*e7ed6473SHerbert Xu
1388*e7ed6473SHerbert Xuconfig CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
1389*e7ed6473SHerbert Xu	int
1390*e7ed6473SHerbert Xu	default 32
1391*e7ed6473SHerbert Xu
1392*e7ed6473SHerbert Xuconfig CRYPTO_JITTERENTROPY_OSR
1393*e7ed6473SHerbert Xu	int
1394*e7ed6473SHerbert Xu	default 1
1395*e7ed6473SHerbert Xu
1396*e7ed6473SHerbert Xuconfig CRYPTO_JITTERENTROPY_TESTINTERFACE
1397*e7ed6473SHerbert Xu	bool
1398*e7ed6473SHerbert Xu
1399*e7ed6473SHerbert Xuendif	# if !(CRYPTO_FIPS && EXPERT)
1400*e7ed6473SHerbert Xuendif	# if CRYPTO_JITTERENTROPY
1401*e7ed6473SHerbert Xu
1402026a733eSStephan Müllerconfig CRYPTO_KDF800108_CTR
1403026a733eSStephan Müller	tristate
1404a88592ccSHerbert Xu	select CRYPTO_HMAC
1405304b4aceSStephan Müller	select CRYPTO_SHA256
1406026a733eSStephan Müller
1407f1f142adSRobert Elliottendmenu
14089bc51715SRobert Elliottmenu "Userspace interface"
1409f1f142adSRobert Elliott
141003c8efc1SHerbert Xuconfig CRYPTO_USER_API
141103c8efc1SHerbert Xu	tristate
141203c8efc1SHerbert Xu
1413fe869cdbSHerbert Xuconfig CRYPTO_USER_API_HASH
14149bc51715SRobert Elliott	tristate "Hash algorithms"
14157451708fSHerbert Xu	depends on NET
1416fe869cdbSHerbert Xu	select CRYPTO_HASH
1417fe869cdbSHerbert Xu	select CRYPTO_USER_API
1418fe869cdbSHerbert Xu	help
14199bc51715SRobert Elliott	  Enable the userspace interface for hash algorithms.
14209bc51715SRobert Elliott
14219bc51715SRobert Elliott	  See Documentation/crypto/userspace-if.rst and
14229bc51715SRobert Elliott	  https://www.chronox.de/libkcapi/html/index.html
1423fe869cdbSHerbert Xu
14248ff59090SHerbert Xuconfig CRYPTO_USER_API_SKCIPHER
14259bc51715SRobert Elliott	tristate "Symmetric key cipher algorithms"
14267451708fSHerbert Xu	depends on NET
1427b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
14288ff59090SHerbert Xu	select CRYPTO_USER_API
14298ff59090SHerbert Xu	help
14309bc51715SRobert Elliott	  Enable the userspace interface for symmetric key cipher algorithms.
14319bc51715SRobert Elliott
14329bc51715SRobert Elliott	  See Documentation/crypto/userspace-if.rst and
14339bc51715SRobert Elliott	  https://www.chronox.de/libkcapi/html/index.html
14348ff59090SHerbert Xu
14352f375538SStephan Muellerconfig CRYPTO_USER_API_RNG
14369bc51715SRobert Elliott	tristate "RNG (random number generator) algorithms"
14372f375538SStephan Mueller	depends on NET
14382f375538SStephan Mueller	select CRYPTO_RNG
14392f375538SStephan Mueller	select CRYPTO_USER_API
14402f375538SStephan Mueller	help
14419bc51715SRobert Elliott	  Enable the userspace interface for RNG (random number generator)
14429bc51715SRobert Elliott	  algorithms.
14439bc51715SRobert Elliott
14449bc51715SRobert Elliott	  See Documentation/crypto/userspace-if.rst and
14459bc51715SRobert Elliott	  https://www.chronox.de/libkcapi/html/index.html
14462f375538SStephan Mueller
144777ebdabeSElena Petrovaconfig CRYPTO_USER_API_RNG_CAVP
144877ebdabeSElena Petrova	bool "Enable CAVP testing of DRBG"
144977ebdabeSElena Petrova	depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
145077ebdabeSElena Petrova	help
14519bc51715SRobert Elliott	  Enable extra APIs in the userspace interface for NIST CAVP
14529bc51715SRobert Elliott	  (Cryptographic Algorithm Validation Program) testing:
14539bc51715SRobert Elliott	  - resetting DRBG entropy
14549bc51715SRobert Elliott	  - providing Additional Data
14559bc51715SRobert Elliott
145677ebdabeSElena Petrova	  This should only be enabled for CAVP testing. You should say
145777ebdabeSElena Petrova	  no unless you know what this is.
145877ebdabeSElena Petrova
1459b64a2d95SHerbert Xuconfig CRYPTO_USER_API_AEAD
14609bc51715SRobert Elliott	tristate "AEAD cipher algorithms"
1461b64a2d95SHerbert Xu	depends on NET
1462b64a2d95SHerbert Xu	select CRYPTO_AEAD
1463b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
146472548b09SStephan Mueller	select CRYPTO_NULL
1465b64a2d95SHerbert Xu	select CRYPTO_USER_API
1466b64a2d95SHerbert Xu	help
14679bc51715SRobert Elliott	  Enable the userspace interface for AEAD cipher algorithms.
14689bc51715SRobert Elliott
14699bc51715SRobert Elliott	  See Documentation/crypto/userspace-if.rst and
14709bc51715SRobert Elliott	  https://www.chronox.de/libkcapi/html/index.html
1471b64a2d95SHerbert Xu
14729ace6771SArd Biesheuvelconfig CRYPTO_USER_API_ENABLE_OBSOLETE
14739bc51715SRobert Elliott	bool "Obsolete cryptographic algorithms"
14749ace6771SArd Biesheuvel	depends on CRYPTO_USER_API
14759ace6771SArd Biesheuvel	default y
14769ace6771SArd Biesheuvel	help
14779ace6771SArd Biesheuvel	  Allow obsolete cryptographic algorithms to be selected that have
14789ace6771SArd Biesheuvel	  already been phased out from internal use by the kernel, and are
14799ace6771SArd Biesheuvel	  only useful for userspace clients that still rely on them.
14809ace6771SArd Biesheuvel
1481cac5818cSCorentin Labbeconfig CRYPTO_STATS
14829bc51715SRobert Elliott	bool "Crypto usage statistics"
1483a6a31385SCorentin Labbe	depends on CRYPTO_USER
1484cac5818cSCorentin Labbe	help
14859bc51715SRobert Elliott	  Enable the gathering of crypto stats.
14869bc51715SRobert Elliott
148766dd59b7SEric Biggers	  Enabling this option reduces the performance of the crypto API.  It
148866dd59b7SEric Biggers	  should only be enabled when there is actually a use case for it.
148966dd59b7SEric Biggers
14909bc51715SRobert Elliott	  This collects data sizes, numbers of requests, and numbers
14919bc51715SRobert Elliott	  of errors processed by:
14929bc51715SRobert Elliott	  - AEAD ciphers (encrypt, decrypt)
14939bc51715SRobert Elliott	  - asymmetric key ciphers (encrypt, decrypt, verify, sign)
14949bc51715SRobert Elliott	  - symmetric key ciphers (encrypt, decrypt)
14959bc51715SRobert Elliott	  - compression algorithms (compress, decompress)
14969bc51715SRobert Elliott	  - hash algorithms (hash)
14979bc51715SRobert Elliott	  - key-agreement protocol primitives (setsecret, generate
14989bc51715SRobert Elliott	    public key, compute shared secret)
14999bc51715SRobert Elliott	  - RNG (generate, seed)
1500cac5818cSCorentin Labbe
1501f1f142adSRobert Elliottendmenu
1502f1f142adSRobert Elliott
1503ee08997fSDmitry Kasatkinconfig CRYPTO_HASH_INFO
1504ee08997fSDmitry Kasatkin	bool
1505ee08997fSDmitry Kasatkin
150627bc50fcSLinus Torvaldsif !KMSAN # avoid false positives from assembly
15074a329fecSRobert Elliottif ARM
15084a329fecSRobert Elliottsource "arch/arm/crypto/Kconfig"
15094a329fecSRobert Elliottendif
15104a329fecSRobert Elliottif ARM64
15114a329fecSRobert Elliottsource "arch/arm64/crypto/Kconfig"
15124a329fecSRobert Elliottendif
15132f164822SMin Zhouif LOONGARCH
15142f164822SMin Zhousource "arch/loongarch/crypto/Kconfig"
15152f164822SMin Zhouendif
1516e45f710bSRobert Elliottif MIPS
1517e45f710bSRobert Elliottsource "arch/mips/crypto/Kconfig"
1518e45f710bSRobert Elliottendif
15196a490a4eSRobert Elliottif PPC
15206a490a4eSRobert Elliottsource "arch/powerpc/crypto/Kconfig"
15216a490a4eSRobert Elliottendif
1522c9d24c97SRobert Elliottif S390
1523c9d24c97SRobert Elliottsource "arch/s390/crypto/Kconfig"
1524c9d24c97SRobert Elliottendif
15250e9f9ea6SRobert Elliottif SPARC
15260e9f9ea6SRobert Elliottsource "arch/sparc/crypto/Kconfig"
15270e9f9ea6SRobert Elliottendif
152828a936efSRobert Elliottif X86
152928a936efSRobert Elliottsource "arch/x86/crypto/Kconfig"
153028a936efSRobert Elliottendif
153127bc50fcSLinus Torvaldsendif
1532e45f710bSRobert Elliott
15331da177e4SLinus Torvaldssource "drivers/crypto/Kconfig"
15348636a1f9SMasahiro Yamadasource "crypto/asymmetric_keys/Kconfig"
15358636a1f9SMasahiro Yamadasource "certs/Kconfig"
15361da177e4SLinus Torvalds
1537cce9e06dSHerbert Xuendif	# if CRYPTO
1538