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 75b95bba5dSEric Biggersconfig CRYPTO_SKCIPHER 765cde0af2SHerbert Xu tristate 77b95bba5dSEric Biggers select CRYPTO_SKCIPHER2 785cde0af2SHerbert Xu select CRYPTO_ALGAPI 796a0fcbb4SHerbert Xu 80b95bba5dSEric Biggersconfig CRYPTO_SKCIPHER2 816a0fcbb4SHerbert Xu tristate 826a0fcbb4SHerbert Xu select CRYPTO_ALGAPI2 835cde0af2SHerbert Xu 84055bcee3SHerbert Xuconfig CRYPTO_HASH 85055bcee3SHerbert Xu tristate 866a0fcbb4SHerbert Xu select CRYPTO_HASH2 87055bcee3SHerbert Xu select CRYPTO_ALGAPI 88055bcee3SHerbert Xu 896a0fcbb4SHerbert Xuconfig CRYPTO_HASH2 906a0fcbb4SHerbert Xu tristate 916a0fcbb4SHerbert Xu select CRYPTO_ALGAPI2 926a0fcbb4SHerbert Xu 9317f0f4a4SNeil Hormanconfig CRYPTO_RNG 9417f0f4a4SNeil Horman tristate 956a0fcbb4SHerbert Xu select CRYPTO_RNG2 9617f0f4a4SNeil Horman select CRYPTO_ALGAPI 9717f0f4a4SNeil Horman 986a0fcbb4SHerbert Xuconfig CRYPTO_RNG2 996a0fcbb4SHerbert Xu tristate 1006a0fcbb4SHerbert Xu select CRYPTO_ALGAPI2 1016a0fcbb4SHerbert Xu 102401e4238SHerbert Xuconfig CRYPTO_RNG_DEFAULT 103401e4238SHerbert Xu tristate 104401e4238SHerbert Xu select CRYPTO_DRBG_MENU 105401e4238SHerbert Xu 1063c339ab8STadeusz Strukconfig CRYPTO_AKCIPHER2 1073c339ab8STadeusz Struk tristate 1083c339ab8STadeusz Struk select CRYPTO_ALGAPI2 1093c339ab8STadeusz Struk 1103c339ab8STadeusz Strukconfig CRYPTO_AKCIPHER 1113c339ab8STadeusz Struk tristate 1123c339ab8STadeusz Struk select CRYPTO_AKCIPHER2 1133c339ab8STadeusz Struk select CRYPTO_ALGAPI 1143c339ab8STadeusz Struk 1154e5f2c40SSalvatore Benedettoconfig CRYPTO_KPP2 1164e5f2c40SSalvatore Benedetto tristate 1174e5f2c40SSalvatore Benedetto select CRYPTO_ALGAPI2 1184e5f2c40SSalvatore Benedetto 1194e5f2c40SSalvatore Benedettoconfig CRYPTO_KPP 1204e5f2c40SSalvatore Benedetto tristate 1214e5f2c40SSalvatore Benedetto select CRYPTO_ALGAPI 1224e5f2c40SSalvatore Benedetto select CRYPTO_KPP2 1234e5f2c40SSalvatore Benedetto 1242ebda74fSGiovanni Cabidduconfig CRYPTO_ACOMP2 1252ebda74fSGiovanni Cabiddu tristate 1262ebda74fSGiovanni Cabiddu select CRYPTO_ALGAPI2 1278cd579d2SBart Van Assche select SGL_ALLOC 1282ebda74fSGiovanni Cabiddu 1292ebda74fSGiovanni Cabidduconfig CRYPTO_ACOMP 1302ebda74fSGiovanni Cabiddu tristate 1312ebda74fSGiovanni Cabiddu select CRYPTO_ALGAPI 1322ebda74fSGiovanni Cabiddu select CRYPTO_ACOMP2 1332ebda74fSGiovanni Cabiddu 1342b8c19dbSHerbert Xuconfig CRYPTO_MANAGER 1352b8c19dbSHerbert Xu tristate "Cryptographic algorithm manager" 1366a0fcbb4SHerbert Xu select CRYPTO_MANAGER2 1372b8c19dbSHerbert Xu help 1382b8c19dbSHerbert Xu Create default cryptographic template instantiations such as 1392b8c19dbSHerbert Xu cbc(aes). 1402b8c19dbSHerbert Xu 1416a0fcbb4SHerbert Xuconfig CRYPTO_MANAGER2 1426a0fcbb4SHerbert Xu def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y) 1432ebda74fSGiovanni Cabiddu select CRYPTO_ACOMP2 144fb28fabfSHerbert Xu select CRYPTO_AEAD2 145fb28fabfSHerbert Xu select CRYPTO_AKCIPHER2 146fb28fabfSHerbert Xu select CRYPTO_HASH2 147fb28fabfSHerbert Xu select CRYPTO_KPP2 148fb28fabfSHerbert Xu select CRYPTO_RNG2 149fb28fabfSHerbert Xu select CRYPTO_SKCIPHER2 1506a0fcbb4SHerbert Xu 151a38f7907SSteffen Klassertconfig CRYPTO_USER 152a38f7907SSteffen Klassert tristate "Userspace cryptographic algorithm configuration" 1535db017aaSHerbert Xu depends on NET 154a38f7907SSteffen Klassert select CRYPTO_MANAGER 155a38f7907SSteffen Klassert help 156d19978f5SValdis.Kletnieks@vt.edu Userspace configuration for cryptographic instantiations such as 157a38f7907SSteffen Klassert cbc(aes). 158a38f7907SSteffen Klassert 159326a6346SHerbert Xuconfig CRYPTO_MANAGER_DISABLE_TESTS 160326a6346SHerbert Xu bool "Disable run-time self tests" 16100ca28a5SHerbert Xu default y 1620b767f96SAlexander Shishkin help 163326a6346SHerbert Xu Disable run-time self tests that normally take place at 164326a6346SHerbert Xu algorithm registration. 1650b767f96SAlexander Shishkin 1665b2706a4SEric Biggersconfig CRYPTO_MANAGER_EXTRA_TESTS 1675b2706a4SEric Biggers bool "Enable extra run-time crypto self tests" 1686569e309SJason A. Donenfeld depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_MANAGER 1695b2706a4SEric Biggers help 1705b2706a4SEric Biggers Enable extra run-time self tests of registered crypto algorithms, 1715b2706a4SEric Biggers including randomized fuzz tests. 1725b2706a4SEric Biggers 1735b2706a4SEric Biggers This is intended for developer use only, as these tests take much 1745b2706a4SEric Biggers longer to run than the normal self tests. 1755b2706a4SEric Biggers 176584fffc8SSebastian Siewiorconfig CRYPTO_NULL 177584fffc8SSebastian Siewior tristate "Null algorithms" 178149a3971SHerbert Xu select CRYPTO_NULL2 179584fffc8SSebastian Siewior help 180584fffc8SSebastian Siewior These are 'Null' algorithms, used by IPsec, which do nothing. 181584fffc8SSebastian Siewior 182149a3971SHerbert Xuconfig CRYPTO_NULL2 183dd43c4e9SHerbert Xu tristate 184149a3971SHerbert Xu select CRYPTO_ALGAPI2 185b95bba5dSEric Biggers select CRYPTO_SKCIPHER2 186149a3971SHerbert Xu select CRYPTO_HASH2 187149a3971SHerbert Xu 1885068c7a8SSteffen Klassertconfig CRYPTO_PCRYPT 1893b4afaf2SKees Cook tristate "Parallel crypto engine" 1903b4afaf2SKees Cook depends on SMP 1915068c7a8SSteffen Klassert select PADATA 1925068c7a8SSteffen Klassert select CRYPTO_MANAGER 1935068c7a8SSteffen Klassert select CRYPTO_AEAD 1945068c7a8SSteffen Klassert help 1955068c7a8SSteffen Klassert This converts an arbitrary crypto algorithm into a parallel 1965068c7a8SSteffen Klassert algorithm that executes in kernel threads. 1975068c7a8SSteffen Klassert 198584fffc8SSebastian Siewiorconfig CRYPTO_CRYPTD 199584fffc8SSebastian Siewior tristate "Software async crypto daemon" 200b95bba5dSEric Biggers select CRYPTO_SKCIPHER 201b8a28251SLoc Ho select CRYPTO_HASH 202584fffc8SSebastian Siewior select CRYPTO_MANAGER 203584fffc8SSebastian Siewior help 204584fffc8SSebastian Siewior This is a generic software asynchronous crypto daemon that 205584fffc8SSebastian Siewior converts an arbitrary synchronous software crypto algorithm 206584fffc8SSebastian Siewior into an asynchronous algorithm that executes in a kernel thread. 207584fffc8SSebastian Siewior 208584fffc8SSebastian Siewiorconfig CRYPTO_AUTHENC 209584fffc8SSebastian Siewior tristate "Authenc support" 210584fffc8SSebastian Siewior select CRYPTO_AEAD 211b95bba5dSEric Biggers select CRYPTO_SKCIPHER 212584fffc8SSebastian Siewior select CRYPTO_MANAGER 213584fffc8SSebastian Siewior select CRYPTO_HASH 214e94c6a7aSHerbert Xu select CRYPTO_NULL 215584fffc8SSebastian Siewior help 216584fffc8SSebastian Siewior Authenc: Combined mode wrapper for IPsec. 217cf514b2aSRobert Elliott 218cf514b2aSRobert Elliott This is required for IPSec ESP (XFRM_ESP). 219584fffc8SSebastian Siewior 220584fffc8SSebastian Siewiorconfig CRYPTO_TEST 221584fffc8SSebastian Siewior tristate "Testing module" 22200ea27f1SArd Biesheuvel depends on m || EXPERT 223da7f033dSHerbert Xu select CRYPTO_MANAGER 224584fffc8SSebastian Siewior help 225584fffc8SSebastian Siewior Quick & dirty crypto test module. 226584fffc8SSebastian Siewior 227266d0516SHerbert Xuconfig CRYPTO_SIMD 228266d0516SHerbert Xu tristate 229266d0516SHerbert Xu select CRYPTO_CRYPTD 230266d0516SHerbert Xu 231735d37b5SBaolin Wangconfig CRYPTO_ENGINE 232735d37b5SBaolin Wang tristate 233735d37b5SBaolin Wang 234f1f142adSRobert Elliottendmenu 235f1f142adSRobert Elliott 236f1f142adSRobert Elliottmenu "Public-key cryptography" 2373d6228a5SVitaly Chikunov 2383d6228a5SVitaly Chikunovconfig CRYPTO_RSA 23905b37465SRobert Elliott tristate "RSA (Rivest-Shamir-Adleman)" 2403d6228a5SVitaly Chikunov select CRYPTO_AKCIPHER 2413d6228a5SVitaly Chikunov select CRYPTO_MANAGER 2423d6228a5SVitaly Chikunov select MPILIB 2433d6228a5SVitaly Chikunov select ASN1 2443d6228a5SVitaly Chikunov help 24505b37465SRobert Elliott RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017) 2463d6228a5SVitaly Chikunov 2473d6228a5SVitaly Chikunovconfig CRYPTO_DH 24805b37465SRobert Elliott tristate "DH (Diffie-Hellman)" 2493d6228a5SVitaly Chikunov select CRYPTO_KPP 2503d6228a5SVitaly Chikunov select MPILIB 2513d6228a5SVitaly Chikunov help 25205b37465SRobert Elliott DH (Diffie-Hellman) key exchange algorithm 2533d6228a5SVitaly Chikunov 2547dce5981SNicolai Stangeconfig CRYPTO_DH_RFC7919_GROUPS 25505b37465SRobert Elliott bool "RFC 7919 FFDHE groups" 2567dce5981SNicolai Stange depends on CRYPTO_DH 2571e207964SNicolai Stange select CRYPTO_RNG_DEFAULT 2587dce5981SNicolai Stange help 25905b37465SRobert Elliott FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups 26005b37465SRobert Elliott defined in RFC7919. 26105b37465SRobert Elliott 26205b37465SRobert Elliott Support these finite-field groups in DH key exchanges: 26305b37465SRobert Elliott - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192 26405b37465SRobert Elliott 26505b37465SRobert Elliott If unsure, say N. 2667dce5981SNicolai Stange 2674a2289daSVitaly Chikunovconfig CRYPTO_ECC 2684a2289daSVitaly Chikunov tristate 26938aa192aSArnd Bergmann select CRYPTO_RNG_DEFAULT 2704a2289daSVitaly Chikunov 2713d6228a5SVitaly Chikunovconfig CRYPTO_ECDH 27205b37465SRobert Elliott tristate "ECDH (Elliptic Curve Diffie-Hellman)" 2734a2289daSVitaly Chikunov select CRYPTO_ECC 2743d6228a5SVitaly Chikunov select CRYPTO_KPP 2753d6228a5SVitaly Chikunov help 27605b37465SRobert Elliott ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm 27705b37465SRobert Elliott using curves P-192, P-256, and P-384 (FIPS 186) 2783d6228a5SVitaly Chikunov 2794e660291SStefan Bergerconfig CRYPTO_ECDSA 28005b37465SRobert Elliott tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)" 2814e660291SStefan Berger select CRYPTO_ECC 2824e660291SStefan Berger select CRYPTO_AKCIPHER 2834e660291SStefan Berger select ASN1 2844e660291SStefan Berger help 28505b37465SRobert Elliott ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186, 28605b37465SRobert Elliott ISO/IEC 14888-3) 28705b37465SRobert Elliott using curves P-192, P-256, and P-384 28805b37465SRobert Elliott 28905b37465SRobert Elliott Only signature verification is implemented. 2904e660291SStefan Berger 2910d7a7864SVitaly Chikunovconfig CRYPTO_ECRDSA 29205b37465SRobert Elliott tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)" 2930d7a7864SVitaly Chikunov select CRYPTO_ECC 2940d7a7864SVitaly Chikunov select CRYPTO_AKCIPHER 2950d7a7864SVitaly Chikunov select CRYPTO_STREEBOG 2961036633eSVitaly Chikunov select OID_REGISTRY 2971036633eSVitaly Chikunov select ASN1 2980d7a7864SVitaly Chikunov help 2990d7a7864SVitaly Chikunov Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012, 30005b37465SRobert Elliott RFC 7091, ISO/IEC 14888-3) 30105b37465SRobert Elliott 30205b37465SRobert Elliott One of the Russian cryptographic standard algorithms (called GOST 30305b37465SRobert Elliott algorithms). Only signature verification is implemented. 3040d7a7864SVitaly Chikunov 305ea7ecb66STianjia Zhangconfig CRYPTO_SM2 30605b37465SRobert Elliott tristate "SM2 (ShangMi 2)" 307d2825fa9SJason A. Donenfeld select CRYPTO_SM3 308ea7ecb66STianjia Zhang select CRYPTO_AKCIPHER 309ea7ecb66STianjia Zhang select CRYPTO_MANAGER 310ea7ecb66STianjia Zhang select MPILIB 311ea7ecb66STianjia Zhang select ASN1 312ea7ecb66STianjia Zhang help 31305b37465SRobert Elliott SM2 (ShangMi 2) public key algorithm 31405b37465SRobert Elliott 31505b37465SRobert Elliott Published by State Encryption Management Bureau, China, 316ea7ecb66STianjia Zhang as specified by OSCCA GM/T 0003.1-2012 -- 0003.5-2012. 317ea7ecb66STianjia Zhang 318ea7ecb66STianjia Zhang References: 31905b37465SRobert Elliott https://datatracker.ietf.org/doc/draft-shen-sm2-ecdsa/ 320ea7ecb66STianjia Zhang http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml 321ea7ecb66STianjia Zhang http://www.gmbz.org.cn/main/bzlb.html 322ea7ecb66STianjia Zhang 323ee772cb6SArd Biesheuvelconfig CRYPTO_CURVE25519 32405b37465SRobert Elliott tristate "Curve25519" 325ee772cb6SArd Biesheuvel select CRYPTO_KPP 326ee772cb6SArd Biesheuvel select CRYPTO_LIB_CURVE25519_GENERIC 32705b37465SRobert Elliott help 32805b37465SRobert Elliott Curve25519 elliptic curve (RFC7748) 329ee772cb6SArd Biesheuvel 330f1f142adSRobert Elliottendmenu 331584fffc8SSebastian Siewior 332f1f142adSRobert Elliottmenu "Block ciphers" 3331da177e4SLinus Torvalds 3341da177e4SLinus Torvaldsconfig CRYPTO_AES 335cf514b2aSRobert Elliott tristate "AES (Advanced Encryption Standard)" 336cce9e06dSHerbert Xu select CRYPTO_ALGAPI 3375bb12d78SArd Biesheuvel select CRYPTO_LIB_AES 3381da177e4SLinus Torvalds help 339cf514b2aSRobert Elliott AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3) 3401da177e4SLinus Torvalds 3411da177e4SLinus Torvalds Rijndael appears to be consistently a very good performer in 3421da177e4SLinus Torvalds both hardware and software across a wide range of computing 3431da177e4SLinus Torvalds environments regardless of its use in feedback or non-feedback 3441da177e4SLinus Torvalds modes. Its key setup time is excellent, and its key agility is 3451da177e4SLinus Torvalds good. Rijndael's very low memory requirements make it very well 3461da177e4SLinus Torvalds suited for restricted-space environments, in which it also 3471da177e4SLinus Torvalds demonstrates excellent performance. Rijndael's operations are 3481da177e4SLinus Torvalds among the easiest to defend against power and timing attacks. 3491da177e4SLinus Torvalds 3501da177e4SLinus Torvalds The AES specifies three key sizes: 128, 192 and 256 bits 3511da177e4SLinus Torvalds 352b5e0b032SArd Biesheuvelconfig CRYPTO_AES_TI 353cf514b2aSRobert Elliott tristate "AES (Advanced Encryption Standard) (fixed time)" 354b5e0b032SArd Biesheuvel select CRYPTO_ALGAPI 355e59c1c98SArd Biesheuvel select CRYPTO_LIB_AES 356b5e0b032SArd Biesheuvel help 357cf514b2aSRobert Elliott AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3) 358cf514b2aSRobert Elliott 359b5e0b032SArd Biesheuvel This is a generic implementation of AES that attempts to eliminate 360b5e0b032SArd Biesheuvel data dependent latencies as much as possible without affecting 361b5e0b032SArd Biesheuvel performance too much. It is intended for use by the generic CCM 362b5e0b032SArd Biesheuvel and GCM drivers, and other CTR or CMAC/XCBC based modes that rely 363b5e0b032SArd Biesheuvel solely on encryption (although decryption is supported as well, but 364b5e0b032SArd Biesheuvel with a more dramatic performance hit) 365b5e0b032SArd Biesheuvel 366b5e0b032SArd Biesheuvel Instead of using 16 lookup tables of 1 KB each, (8 for encryption and 367b5e0b032SArd Biesheuvel 8 for decryption), this implementation only uses just two S-boxes of 368b5e0b032SArd Biesheuvel 256 bytes each, and attempts to eliminate data dependent latencies by 369b5e0b032SArd Biesheuvel prefetching the entire table into the cache at the start of each 3700a6a40c2SEric Biggers block. Interrupts are also disabled to avoid races where cachelines 3710a6a40c2SEric Biggers are evicted when the CPU is interrupted to do something else. 372b5e0b032SArd Biesheuvel 3731da177e4SLinus Torvaldsconfig CRYPTO_ANUBIS 374cf514b2aSRobert Elliott tristate "Anubis" 3751674aea5SArd Biesheuvel depends on CRYPTO_USER_API_ENABLE_OBSOLETE 376cce9e06dSHerbert Xu select CRYPTO_ALGAPI 3771da177e4SLinus Torvalds help 378cf514b2aSRobert Elliott Anubis cipher algorithm 3791da177e4SLinus Torvalds 3801da177e4SLinus Torvalds Anubis is a variable key length cipher which can use keys from 3811da177e4SLinus Torvalds 128 bits to 320 bits in length. It was evaluated as a entrant 3821da177e4SLinus Torvalds in the NESSIE competition. 3831da177e4SLinus Torvalds 384cf514b2aSRobert Elliott See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html 385cf514b2aSRobert Elliott for further information. 3861da177e4SLinus Torvalds 387f1f142adSRobert Elliottconfig CRYPTO_ARIA 388cf514b2aSRobert Elliott tristate "ARIA" 389f1f142adSRobert Elliott select CRYPTO_ALGAPI 390e2ee95b8SHye-Shik Chang help 391cf514b2aSRobert Elliott ARIA cipher algorithm (RFC5794) 392e2ee95b8SHye-Shik Chang 393f1f142adSRobert Elliott ARIA is a standard encryption algorithm of the Republic of Korea. 394f1f142adSRobert Elliott The ARIA specifies three key sizes and rounds. 395f1f142adSRobert Elliott 128-bit: 12 rounds. 396f1f142adSRobert Elliott 192-bit: 14 rounds. 397f1f142adSRobert Elliott 256-bit: 16 rounds. 398f1f142adSRobert Elliott 399cf514b2aSRobert Elliott See: 400cf514b2aSRobert Elliott https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do 401584fffc8SSebastian Siewior 402584fffc8SSebastian Siewiorconfig CRYPTO_BLOWFISH 403cf514b2aSRobert Elliott tristate "Blowfish" 404584fffc8SSebastian Siewior select CRYPTO_ALGAPI 40552ba867cSJussi Kivilinna select CRYPTO_BLOWFISH_COMMON 406584fffc8SSebastian Siewior help 407cf514b2aSRobert Elliott Blowfish cipher algorithm, by Bruce Schneier 408584fffc8SSebastian Siewior 409584fffc8SSebastian Siewior This is a variable key length cipher which can use keys from 32 410584fffc8SSebastian Siewior bits to 448 bits in length. It's fast, simple and specifically 411584fffc8SSebastian Siewior designed for use on "large microprocessors". 412e2ee95b8SHye-Shik Chang 413cf514b2aSRobert Elliott See https://www.schneier.com/blowfish.html for further information. 414584fffc8SSebastian Siewior 41552ba867cSJussi Kivilinnaconfig CRYPTO_BLOWFISH_COMMON 41652ba867cSJussi Kivilinna tristate 41752ba867cSJussi Kivilinna help 41852ba867cSJussi Kivilinna Common parts of the Blowfish cipher algorithm shared by the 41952ba867cSJussi Kivilinna generic c and the assembler implementations. 42052ba867cSJussi Kivilinna 421584fffc8SSebastian Siewiorconfig CRYPTO_CAMELLIA 422cf514b2aSRobert Elliott tristate "Camellia" 423584fffc8SSebastian Siewior select CRYPTO_ALGAPI 424584fffc8SSebastian Siewior help 425cf514b2aSRobert Elliott Camellia cipher algorithms (ISO/IEC 18033-3) 426584fffc8SSebastian Siewior 427584fffc8SSebastian Siewior Camellia is a symmetric key block cipher developed jointly 428584fffc8SSebastian Siewior at NTT and Mitsubishi Electric Corporation. 429584fffc8SSebastian Siewior 430584fffc8SSebastian Siewior The Camellia specifies three key sizes: 128, 192 and 256 bits. 431584fffc8SSebastian Siewior 432cf514b2aSRobert Elliott See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information. 433584fffc8SSebastian Siewior 434044ab525SJussi Kivilinnaconfig CRYPTO_CAST_COMMON 435044ab525SJussi Kivilinna tristate 436044ab525SJussi Kivilinna help 437044ab525SJussi Kivilinna Common parts of the CAST cipher algorithms shared by the 438044ab525SJussi Kivilinna generic c and the assembler implementations. 439044ab525SJussi Kivilinna 440584fffc8SSebastian Siewiorconfig CRYPTO_CAST5 441cf514b2aSRobert Elliott tristate "CAST5 (CAST-128)" 442584fffc8SSebastian Siewior select CRYPTO_ALGAPI 443044ab525SJussi Kivilinna select CRYPTO_CAST_COMMON 444584fffc8SSebastian Siewior help 445cf514b2aSRobert Elliott CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3) 446584fffc8SSebastian Siewior 447584fffc8SSebastian Siewiorconfig CRYPTO_CAST6 448cf514b2aSRobert Elliott tristate "CAST6 (CAST-256)" 449584fffc8SSebastian Siewior select CRYPTO_ALGAPI 450044ab525SJussi Kivilinna select CRYPTO_CAST_COMMON 451584fffc8SSebastian Siewior help 452cf514b2aSRobert Elliott CAST6 (CAST-256) encryption algorithm (RFC2612) 453584fffc8SSebastian Siewior 454584fffc8SSebastian Siewiorconfig CRYPTO_DES 455cf514b2aSRobert Elliott tristate "DES and Triple DES EDE" 456584fffc8SSebastian Siewior select CRYPTO_ALGAPI 45704007b0eSArd Biesheuvel select CRYPTO_LIB_DES 458584fffc8SSebastian Siewior help 459cf514b2aSRobert Elliott DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and 460cf514b2aSRobert Elliott Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3) 461cf514b2aSRobert Elliott cipher algorithms 462584fffc8SSebastian Siewior 463584fffc8SSebastian Siewiorconfig CRYPTO_FCRYPT 464cf514b2aSRobert Elliott tristate "FCrypt" 465584fffc8SSebastian Siewior select CRYPTO_ALGAPI 466b95bba5dSEric Biggers select CRYPTO_SKCIPHER 467584fffc8SSebastian Siewior help 468cf514b2aSRobert Elliott FCrypt algorithm used by RxRPC 469cf514b2aSRobert Elliott 470cf514b2aSRobert Elliott See https://ota.polyonymo.us/fcrypt-paper.txt 471584fffc8SSebastian Siewior 472584fffc8SSebastian Siewiorconfig CRYPTO_KHAZAD 473cf514b2aSRobert Elliott tristate "Khazad" 4741674aea5SArd Biesheuvel depends on CRYPTO_USER_API_ENABLE_OBSOLETE 475584fffc8SSebastian Siewior select CRYPTO_ALGAPI 476584fffc8SSebastian Siewior help 477cf514b2aSRobert Elliott Khazad cipher algorithm 478584fffc8SSebastian Siewior 479584fffc8SSebastian Siewior Khazad was a finalist in the initial NESSIE competition. It is 480584fffc8SSebastian Siewior an algorithm optimized for 64-bit processors with good performance 481584fffc8SSebastian Siewior on 32-bit processors. Khazad uses an 128 bit key size. 482584fffc8SSebastian Siewior 483cf514b2aSRobert Elliott See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html 484cf514b2aSRobert Elliott for further information. 485e2ee95b8SHye-Shik Chang 486584fffc8SSebastian Siewiorconfig CRYPTO_SEED 487cf514b2aSRobert Elliott tristate "SEED" 4881674aea5SArd Biesheuvel depends on CRYPTO_USER_API_ENABLE_OBSOLETE 489584fffc8SSebastian Siewior select CRYPTO_ALGAPI 490584fffc8SSebastian Siewior help 491cf514b2aSRobert Elliott SEED cipher algorithm (RFC4269, ISO/IEC 18033-3) 492584fffc8SSebastian Siewior 493584fffc8SSebastian Siewior SEED is a 128-bit symmetric key block cipher that has been 494584fffc8SSebastian Siewior developed by KISA (Korea Information Security Agency) as a 495584fffc8SSebastian Siewior national standard encryption algorithm of the Republic of Korea. 496584fffc8SSebastian Siewior It is a 16 round block cipher with the key size of 128 bit. 497584fffc8SSebastian Siewior 498cf514b2aSRobert Elliott See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do 499cf514b2aSRobert Elliott for further information. 500584fffc8SSebastian Siewior 501584fffc8SSebastian Siewiorconfig CRYPTO_SERPENT 502cf514b2aSRobert Elliott tristate "Serpent" 503584fffc8SSebastian Siewior select CRYPTO_ALGAPI 504584fffc8SSebastian Siewior help 505cf514b2aSRobert Elliott Serpent cipher algorithm, by Anderson, Biham & Knudsen 506584fffc8SSebastian Siewior 507584fffc8SSebastian Siewior Keys are allowed to be from 0 to 256 bits in length, in steps 508784506a1SArd Biesheuvel of 8 bits. 509584fffc8SSebastian Siewior 510cf514b2aSRobert Elliott See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information. 511584fffc8SSebastian Siewior 512747c8ce4SGilad Ben-Yossefconfig CRYPTO_SM4 513d2825fa9SJason A. Donenfeld tristate 514d2825fa9SJason A. Donenfeld 515d2825fa9SJason A. Donenfeldconfig CRYPTO_SM4_GENERIC 516cf514b2aSRobert Elliott tristate "SM4 (ShangMi 4)" 517747c8ce4SGilad Ben-Yossef select CRYPTO_ALGAPI 518d2825fa9SJason A. Donenfeld select CRYPTO_SM4 519747c8ce4SGilad Ben-Yossef help 520cf514b2aSRobert Elliott SM4 cipher algorithms (OSCCA GB/T 32907-2016, 521cf514b2aSRobert Elliott ISO/IEC 18033-3:2010/Amd 1:2021) 522747c8ce4SGilad Ben-Yossef 523747c8ce4SGilad Ben-Yossef SM4 (GBT.32907-2016) is a cryptographic standard issued by the 524747c8ce4SGilad Ben-Yossef Organization of State Commercial Administration of China (OSCCA) 525747c8ce4SGilad Ben-Yossef as an authorized cryptographic algorithms for the use within China. 526747c8ce4SGilad Ben-Yossef 527747c8ce4SGilad Ben-Yossef SMS4 was originally created for use in protecting wireless 528747c8ce4SGilad Ben-Yossef networks, and is mandated in the Chinese National Standard for 529747c8ce4SGilad Ben-Yossef Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure) 530747c8ce4SGilad Ben-Yossef (GB.15629.11-2003). 531747c8ce4SGilad Ben-Yossef 532747c8ce4SGilad Ben-Yossef The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and 533747c8ce4SGilad Ben-Yossef standardized through TC 260 of the Standardization Administration 534747c8ce4SGilad Ben-Yossef of the People's Republic of China (SAC). 535747c8ce4SGilad Ben-Yossef 536747c8ce4SGilad Ben-Yossef The input, output, and key of SMS4 are each 128 bits. 537747c8ce4SGilad Ben-Yossef 538cf514b2aSRobert Elliott See https://eprint.iacr.org/2008/329.pdf for further information. 539747c8ce4SGilad Ben-Yossef 540747c8ce4SGilad Ben-Yossef If unsure, say N. 541747c8ce4SGilad Ben-Yossef 542584fffc8SSebastian Siewiorconfig CRYPTO_TEA 543cf514b2aSRobert Elliott tristate "TEA, XTEA and XETA" 5441674aea5SArd Biesheuvel depends on CRYPTO_USER_API_ENABLE_OBSOLETE 545584fffc8SSebastian Siewior select CRYPTO_ALGAPI 546584fffc8SSebastian Siewior help 547cf514b2aSRobert Elliott TEA (Tiny Encryption Algorithm) cipher algorithms 548584fffc8SSebastian Siewior 549584fffc8SSebastian Siewior Tiny Encryption Algorithm is a simple cipher that uses 550584fffc8SSebastian Siewior many rounds for security. It is very fast and uses 551584fffc8SSebastian Siewior little memory. 552584fffc8SSebastian Siewior 553584fffc8SSebastian Siewior Xtendend Tiny Encryption Algorithm is a modification to 554584fffc8SSebastian Siewior the TEA algorithm to address a potential key weakness 555584fffc8SSebastian Siewior in the TEA algorithm. 556584fffc8SSebastian Siewior 557584fffc8SSebastian Siewior Xtendend Encryption Tiny Algorithm is a mis-implementation 558584fffc8SSebastian Siewior of the XTEA algorithm for compatibility purposes. 559584fffc8SSebastian Siewior 560584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH 561cf514b2aSRobert Elliott tristate "Twofish" 562584fffc8SSebastian Siewior select CRYPTO_ALGAPI 563584fffc8SSebastian Siewior select CRYPTO_TWOFISH_COMMON 564584fffc8SSebastian Siewior help 565cf514b2aSRobert Elliott Twofish cipher algorithm 566584fffc8SSebastian Siewior 567584fffc8SSebastian Siewior Twofish was submitted as an AES (Advanced Encryption Standard) 568584fffc8SSebastian Siewior candidate cipher by researchers at CounterPane Systems. It is a 569584fffc8SSebastian Siewior 16 round block cipher supporting key sizes of 128, 192, and 256 570584fffc8SSebastian Siewior bits. 571584fffc8SSebastian Siewior 572cf514b2aSRobert Elliott See https://www.schneier.com/twofish.html for further information. 573584fffc8SSebastian Siewior 574584fffc8SSebastian Siewiorconfig CRYPTO_TWOFISH_COMMON 575584fffc8SSebastian Siewior tristate 576584fffc8SSebastian Siewior help 577584fffc8SSebastian Siewior Common parts of the Twofish cipher algorithm shared by the 578584fffc8SSebastian Siewior generic c and the assembler implementations. 579584fffc8SSebastian Siewior 580f1f142adSRobert Elliottendmenu 581f1f142adSRobert Elliott 582f1f142adSRobert Elliottmenu "Length-preserving ciphers and modes" 583f1f142adSRobert Elliott 584f1f142adSRobert Elliottconfig CRYPTO_ADIANTUM 585cf514b2aSRobert Elliott tristate "Adiantum" 586f1f142adSRobert Elliott select CRYPTO_CHACHA20 587f1f142adSRobert Elliott select CRYPTO_LIB_POLY1305_GENERIC 588f1f142adSRobert Elliott select CRYPTO_NHPOLY1305 589f1f142adSRobert Elliott select CRYPTO_MANAGER 590f1f142adSRobert Elliott help 591cf514b2aSRobert Elliott Adiantum tweakable, length-preserving encryption mode 592cf514b2aSRobert Elliott 593cf514b2aSRobert Elliott Designed for fast and secure disk encryption, especially on 594f1f142adSRobert Elliott CPUs without dedicated crypto instructions. It encrypts 595f1f142adSRobert Elliott each sector using the XChaCha12 stream cipher, two passes of 596f1f142adSRobert Elliott an ε-almost-∆-universal hash function, and an invocation of 597f1f142adSRobert Elliott the AES-256 block cipher on a single 16-byte block. On CPUs 598f1f142adSRobert Elliott without AES instructions, Adiantum is much faster than 599f1f142adSRobert Elliott AES-XTS. 600f1f142adSRobert Elliott 601f1f142adSRobert Elliott Adiantum's security is provably reducible to that of its 602f1f142adSRobert Elliott underlying stream and block ciphers, subject to a security 603f1f142adSRobert Elliott bound. Unlike XTS, Adiantum is a true wide-block encryption 604f1f142adSRobert Elliott mode, so it actually provides an even stronger notion of 605f1f142adSRobert Elliott security than XTS, subject to the security bound. 606f1f142adSRobert Elliott 607f1f142adSRobert Elliott If unsure, say N. 608f1f142adSRobert Elliott 609f1f142adSRobert Elliottconfig CRYPTO_ARC4 610cf514b2aSRobert Elliott tristate "ARC4 (Alleged Rivest Cipher 4)" 611f1f142adSRobert Elliott depends on CRYPTO_USER_API_ENABLE_OBSOLETE 612f1f142adSRobert Elliott select CRYPTO_SKCIPHER 613f1f142adSRobert Elliott select CRYPTO_LIB_ARC4 614f1f142adSRobert Elliott help 615cf514b2aSRobert Elliott ARC4 cipher algorithm 616f1f142adSRobert Elliott 617f1f142adSRobert Elliott ARC4 is a stream cipher using keys ranging from 8 bits to 2048 618f1f142adSRobert Elliott bits in length. This algorithm is required for driver-based 619f1f142adSRobert Elliott WEP, but it should not be for other purposes because of the 620f1f142adSRobert Elliott weakness of the algorithm. 621f1f142adSRobert Elliott 622f1f142adSRobert Elliottconfig CRYPTO_CHACHA20 623cf514b2aSRobert Elliott tristate "ChaCha" 624f1f142adSRobert Elliott select CRYPTO_LIB_CHACHA_GENERIC 625f1f142adSRobert Elliott select CRYPTO_SKCIPHER 626f1f142adSRobert Elliott help 627cf514b2aSRobert Elliott The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms 628f1f142adSRobert Elliott 629f1f142adSRobert Elliott ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J. 630f1f142adSRobert Elliott Bernstein and further specified in RFC7539 for use in IETF protocols. 631cf514b2aSRobert Elliott This is the portable C implementation of ChaCha20. See 632cf514b2aSRobert Elliott https://cr.yp.to/chacha/chacha-20080128.pdf for further information. 633f1f142adSRobert Elliott 634f1f142adSRobert Elliott XChaCha20 is the application of the XSalsa20 construction to ChaCha20 635f1f142adSRobert Elliott rather than to Salsa20. XChaCha20 extends ChaCha20's nonce length 636f1f142adSRobert Elliott from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits, 637cf514b2aSRobert Elliott while provably retaining ChaCha20's security. See 638cf514b2aSRobert Elliott https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information. 639f1f142adSRobert Elliott 640f1f142adSRobert Elliott XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly 641f1f142adSRobert Elliott reduced security margin but increased performance. It can be needed 642f1f142adSRobert Elliott in some performance-sensitive scenarios. 643f1f142adSRobert Elliott 644f1f142adSRobert Elliottconfig CRYPTO_CBC 645cf514b2aSRobert Elliott tristate "CBC (Cipher Block Chaining)" 646f1f142adSRobert Elliott select CRYPTO_SKCIPHER 647f1f142adSRobert Elliott select CRYPTO_MANAGER 648f1f142adSRobert Elliott help 649cf514b2aSRobert Elliott CBC (Cipher Block Chaining) mode (NIST SP800-38A) 650cf514b2aSRobert Elliott 651cf514b2aSRobert Elliott This block cipher mode is required for IPSec ESP (XFRM_ESP). 652f1f142adSRobert Elliott 653f1f142adSRobert Elliottconfig CRYPTO_CFB 654cf514b2aSRobert Elliott tristate "CFB (Cipher Feedback)" 655f1f142adSRobert Elliott select CRYPTO_SKCIPHER 656f1f142adSRobert Elliott select CRYPTO_MANAGER 657f1f142adSRobert Elliott help 658cf514b2aSRobert Elliott CFB (Cipher Feedback) mode (NIST SP800-38A) 659cf514b2aSRobert Elliott 660cf514b2aSRobert Elliott This block cipher mode is required for TPM2 Cryptography. 661f1f142adSRobert Elliott 662f1f142adSRobert Elliottconfig CRYPTO_CTR 663cf514b2aSRobert Elliott tristate "CTR (Counter)" 664f1f142adSRobert Elliott select CRYPTO_SKCIPHER 665f1f142adSRobert Elliott select CRYPTO_MANAGER 666f1f142adSRobert Elliott help 667cf514b2aSRobert Elliott CTR (Counter) mode (NIST SP800-38A) 668f1f142adSRobert Elliott 669f1f142adSRobert Elliottconfig CRYPTO_CTS 670cf514b2aSRobert Elliott tristate "CTS (Cipher Text Stealing)" 671f1f142adSRobert Elliott select CRYPTO_SKCIPHER 672f1f142adSRobert Elliott select CRYPTO_MANAGER 673f1f142adSRobert Elliott help 674cf514b2aSRobert Elliott CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST 675cf514b2aSRobert Elliott Addendum to SP800-38A (October 2010)) 676cf514b2aSRobert Elliott 677f1f142adSRobert Elliott This mode is required for Kerberos gss mechanism support 678f1f142adSRobert Elliott for AES encryption. 679f1f142adSRobert Elliott 680f1f142adSRobert Elliottconfig CRYPTO_ECB 681cf514b2aSRobert Elliott tristate "ECB (Electronic Codebook)" 682f1f142adSRobert Elliott select CRYPTO_SKCIPHER 683f1f142adSRobert Elliott select CRYPTO_MANAGER 684f1f142adSRobert Elliott help 685cf514b2aSRobert Elliott ECB (Electronic Codebook) mode (NIST SP800-38A) 686f1f142adSRobert Elliott 687f1f142adSRobert Elliottconfig CRYPTO_HCTR2 688cf514b2aSRobert Elliott tristate "HCTR2" 689f1f142adSRobert Elliott select CRYPTO_XCTR 690f1f142adSRobert Elliott select CRYPTO_POLYVAL 691f1f142adSRobert Elliott select CRYPTO_MANAGER 692f1f142adSRobert Elliott help 693cf514b2aSRobert Elliott HCTR2 length-preserving encryption mode 694cf514b2aSRobert Elliott 695cf514b2aSRobert Elliott A mode for storage encryption that is efficient on processors with 696cf514b2aSRobert Elliott instructions to accelerate AES and carryless multiplication, e.g. 697cf514b2aSRobert Elliott x86 processors with AES-NI and CLMUL, and ARM processors with the 698cf514b2aSRobert Elliott ARMv8 crypto extensions. 699cf514b2aSRobert Elliott 700cf514b2aSRobert Elliott See https://eprint.iacr.org/2021/1441 701f1f142adSRobert Elliott 702f1f142adSRobert Elliottconfig CRYPTO_KEYWRAP 703cf514b2aSRobert Elliott tristate "KW (AES Key Wrap)" 704f1f142adSRobert Elliott select CRYPTO_SKCIPHER 705f1f142adSRobert Elliott select CRYPTO_MANAGER 706f1f142adSRobert Elliott help 707cf514b2aSRobert Elliott KW (AES Key Wrap) authenticated encryption mode (NIST SP800-38F 708cf514b2aSRobert Elliott and RFC3394) without padding. 709f1f142adSRobert Elliott 710f1f142adSRobert Elliottconfig CRYPTO_LRW 711cf514b2aSRobert Elliott tristate "LRW (Liskov Rivest Wagner)" 71261c581a4SArd Biesheuvel select CRYPTO_LIB_GF128MUL 713f1f142adSRobert Elliott select CRYPTO_SKCIPHER 714f1f142adSRobert Elliott select CRYPTO_MANAGER 715f1f142adSRobert Elliott select CRYPTO_ECB 716f1f142adSRobert Elliott help 717cf514b2aSRobert Elliott LRW (Liskov Rivest Wagner) mode 718cf514b2aSRobert Elliott 719cf514b2aSRobert Elliott A tweakable, non malleable, non movable 720f1f142adSRobert Elliott narrow block cipher mode for dm-crypt. Use it with cipher 721f1f142adSRobert Elliott specification string aes-lrw-benbi, the key must be 256, 320 or 384. 722f1f142adSRobert Elliott The first 128, 192 or 256 bits in the key are used for AES and the 723f1f142adSRobert Elliott rest is used to tie each cipher block to its logical position. 724f1f142adSRobert Elliott 725cf514b2aSRobert Elliott See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf 726cf514b2aSRobert Elliott 727f1f142adSRobert Elliottconfig CRYPTO_OFB 728cf514b2aSRobert Elliott tristate "OFB (Output Feedback)" 729f1f142adSRobert Elliott select CRYPTO_SKCIPHER 730f1f142adSRobert Elliott select CRYPTO_MANAGER 731f1f142adSRobert Elliott help 732cf514b2aSRobert Elliott OFB (Output Feedback) mode (NIST SP800-38A) 733cf514b2aSRobert Elliott 734cf514b2aSRobert Elliott This mode makes a block cipher into a synchronous 735f1f142adSRobert Elliott stream cipher. It generates keystream blocks, which are then XORed 736f1f142adSRobert Elliott with the plaintext blocks to get the ciphertext. Flipping a bit in the 737f1f142adSRobert Elliott ciphertext produces a flipped bit in the plaintext at the same 738f1f142adSRobert Elliott location. This property allows many error correcting codes to function 739f1f142adSRobert Elliott normally even when applied before encryption. 740f1f142adSRobert Elliott 741f1f142adSRobert Elliottconfig CRYPTO_PCBC 742cf514b2aSRobert Elliott tristate "PCBC (Propagating Cipher Block Chaining)" 743f1f142adSRobert Elliott select CRYPTO_SKCIPHER 744f1f142adSRobert Elliott select CRYPTO_MANAGER 745f1f142adSRobert Elliott help 746cf514b2aSRobert Elliott PCBC (Propagating Cipher Block Chaining) mode 747cf514b2aSRobert Elliott 748cf514b2aSRobert Elliott This block cipher mode is required for RxRPC. 749f1f142adSRobert Elliott 750f1f142adSRobert Elliottconfig CRYPTO_XCTR 751f1f142adSRobert Elliott tristate 752f1f142adSRobert Elliott select CRYPTO_SKCIPHER 753f1f142adSRobert Elliott select CRYPTO_MANAGER 754f1f142adSRobert Elliott help 755cf514b2aSRobert Elliott XCTR (XOR Counter) mode for HCTR2 756cf514b2aSRobert Elliott 757cf514b2aSRobert Elliott This blockcipher mode is a variant of CTR mode using XORs and little-endian 758cf514b2aSRobert Elliott addition rather than big-endian arithmetic. 759cf514b2aSRobert Elliott 760f1f142adSRobert Elliott XCTR mode is used to implement HCTR2. 761f1f142adSRobert Elliott 762f1f142adSRobert Elliottconfig CRYPTO_XTS 763cf514b2aSRobert Elliott tristate "XTS (XOR Encrypt XOR with ciphertext stealing)" 764f1f142adSRobert Elliott select CRYPTO_SKCIPHER 765f1f142adSRobert Elliott select CRYPTO_MANAGER 766f1f142adSRobert Elliott select CRYPTO_ECB 767f1f142adSRobert Elliott help 768cf514b2aSRobert Elliott XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E 769cf514b2aSRobert Elliott and IEEE 1619) 770cf514b2aSRobert Elliott 771cf514b2aSRobert Elliott Use with aes-xts-plain, key size 256, 384 or 512 bits. This 772cf514b2aSRobert Elliott implementation currently can't handle a sectorsize which is not a 773cf514b2aSRobert Elliott multiple of 16 bytes. 774f1f142adSRobert Elliott 775f1f142adSRobert Elliottconfig CRYPTO_NHPOLY1305 776f1f142adSRobert Elliott tristate 777f1f142adSRobert Elliott select CRYPTO_HASH 778f1f142adSRobert Elliott select CRYPTO_LIB_POLY1305_GENERIC 779f1f142adSRobert Elliott 780f1f142adSRobert Elliottendmenu 781f1f142adSRobert Elliott 782f1f142adSRobert Elliottmenu "AEAD (authenticated encryption with associated data) ciphers" 783f1f142adSRobert Elliott 784f1f142adSRobert Elliottconfig CRYPTO_AEGIS128 785e3d2eaddSRobert Elliott tristate "AEGIS-128" 786f1f142adSRobert Elliott select CRYPTO_AEAD 787f1f142adSRobert Elliott select CRYPTO_AES # for AES S-box tables 788f1f142adSRobert Elliott help 789e3d2eaddSRobert Elliott AEGIS-128 AEAD algorithm 790f1f142adSRobert Elliott 791f1f142adSRobert Elliottconfig CRYPTO_AEGIS128_SIMD 792e3d2eaddSRobert Elliott bool "AEGIS-128 (arm NEON, arm64 NEON)" 793f1f142adSRobert Elliott depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON) 794f1f142adSRobert Elliott default y 795e3d2eaddSRobert Elliott help 796e3d2eaddSRobert Elliott AEGIS-128 AEAD algorithm 797e3d2eaddSRobert Elliott 798e3d2eaddSRobert Elliott Architecture: arm or arm64 using: 799e3d2eaddSRobert Elliott - NEON (Advanced SIMD) extension 800f1f142adSRobert Elliott 801f1f142adSRobert Elliottconfig CRYPTO_CHACHA20POLY1305 802e3d2eaddSRobert Elliott tristate "ChaCha20-Poly1305" 803f1f142adSRobert Elliott select CRYPTO_CHACHA20 804f1f142adSRobert Elliott select CRYPTO_POLY1305 805f1f142adSRobert Elliott select CRYPTO_AEAD 806f1f142adSRobert Elliott select CRYPTO_MANAGER 807f1f142adSRobert Elliott help 808e3d2eaddSRobert Elliott ChaCha20 stream cipher and Poly1305 authenticator combined 809e3d2eaddSRobert Elliott mode (RFC8439) 810f1f142adSRobert Elliott 811f1f142adSRobert Elliottconfig CRYPTO_CCM 812cf514b2aSRobert Elliott tristate "CCM (Counter with Cipher Block Chaining-MAC)" 813f1f142adSRobert Elliott select CRYPTO_CTR 814f1f142adSRobert Elliott select CRYPTO_HASH 815f1f142adSRobert Elliott select CRYPTO_AEAD 816f1f142adSRobert Elliott select CRYPTO_MANAGER 817f1f142adSRobert Elliott help 818e3d2eaddSRobert Elliott CCM (Counter with Cipher Block Chaining-Message Authentication Code) 819e3d2eaddSRobert Elliott authenticated encryption mode (NIST SP800-38C) 820f1f142adSRobert Elliott 821f1f142adSRobert Elliottconfig CRYPTO_GCM 822cf514b2aSRobert Elliott tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)" 823f1f142adSRobert Elliott select CRYPTO_CTR 824f1f142adSRobert Elliott select CRYPTO_AEAD 825f1f142adSRobert Elliott select CRYPTO_GHASH 826f1f142adSRobert Elliott select CRYPTO_NULL 827f1f142adSRobert Elliott select CRYPTO_MANAGER 828f1f142adSRobert Elliott help 829e3d2eaddSRobert Elliott GCM (Galois/Counter Mode) authenticated encryption mode and GMAC 830e3d2eaddSRobert Elliott (GCM Message Authentication Code) (NIST SP800-38D) 831e3d2eaddSRobert Elliott 832e3d2eaddSRobert Elliott This is required for IPSec ESP (XFRM_ESP). 833f1f142adSRobert Elliott 834*ba51738fSHerbert Xuconfig CRYPTO_GENIV 835*ba51738fSHerbert Xu tristate 836*ba51738fSHerbert Xu select CRYPTO_AEAD 837*ba51738fSHerbert Xu select CRYPTO_NULL 838*ba51738fSHerbert Xu select CRYPTO_MANAGER 839*ba51738fSHerbert Xu select CRYPTO_RNG_DEFAULT 840*ba51738fSHerbert Xu 841f1f142adSRobert Elliottconfig CRYPTO_SEQIV 842f1f142adSRobert Elliott tristate "Sequence Number IV Generator" 843*ba51738fSHerbert Xu select CRYPTO_GENIV 844f1f142adSRobert Elliott help 845e3d2eaddSRobert Elliott Sequence Number IV generator 846e3d2eaddSRobert Elliott 847f1f142adSRobert Elliott This IV generator generates an IV based on a sequence number by 848e3d2eaddSRobert Elliott xoring it with a salt. This algorithm is mainly useful for CTR. 849e3d2eaddSRobert Elliott 850e3d2eaddSRobert Elliott This is required for IPsec ESP (XFRM_ESP). 851f1f142adSRobert Elliott 852f1f142adSRobert Elliottconfig CRYPTO_ECHAINIV 853f1f142adSRobert Elliott tristate "Encrypted Chain IV Generator" 854*ba51738fSHerbert Xu select CRYPTO_GENIV 855f1f142adSRobert Elliott help 856e3d2eaddSRobert Elliott Encrypted Chain IV generator 857e3d2eaddSRobert Elliott 858f1f142adSRobert Elliott This IV generator generates an IV based on the encryption of 859f1f142adSRobert Elliott a sequence number xored with a salt. This is the default 860f1f142adSRobert Elliott algorithm for CBC. 861f1f142adSRobert Elliott 862f1f142adSRobert Elliottconfig CRYPTO_ESSIV 863e3d2eaddSRobert Elliott tristate "Encrypted Salt-Sector IV Generator" 864f1f142adSRobert Elliott select CRYPTO_AUTHENC 865f1f142adSRobert Elliott help 866e3d2eaddSRobert Elliott Encrypted Salt-Sector IV generator 867e3d2eaddSRobert Elliott 868e3d2eaddSRobert Elliott This IV generator is used in some cases by fscrypt and/or 869f1f142adSRobert Elliott dm-crypt. It uses the hash of the block encryption key as the 870f1f142adSRobert Elliott symmetric key for a block encryption pass applied to the input 871f1f142adSRobert Elliott IV, making low entropy IV sources more suitable for block 872f1f142adSRobert Elliott encryption. 873f1f142adSRobert Elliott 874f1f142adSRobert Elliott This driver implements a crypto API template that can be 875f1f142adSRobert Elliott instantiated either as an skcipher or as an AEAD (depending on the 876f1f142adSRobert Elliott type of the first template argument), and which defers encryption 877f1f142adSRobert Elliott and decryption requests to the encapsulated cipher after applying 878f1f142adSRobert Elliott ESSIV to the input IV. Note that in the AEAD case, it is assumed 879f1f142adSRobert Elliott that the keys are presented in the same format used by the authenc 880f1f142adSRobert Elliott template, and that the IV appears at the end of the authenticated 881f1f142adSRobert Elliott associated data (AAD) region (which is how dm-crypt uses it.) 882f1f142adSRobert Elliott 883f1f142adSRobert Elliott Note that the use of ESSIV is not recommended for new deployments, 884f1f142adSRobert Elliott and so this only needs to be enabled when interoperability with 885f1f142adSRobert Elliott existing encrypted volumes of filesystems is required, or when 886f1f142adSRobert Elliott building for a particular system that requires it (e.g., when 887f1f142adSRobert Elliott the SoC in question has accelerated CBC but not XTS, making CBC 888f1f142adSRobert Elliott combined with ESSIV the only feasible mode for h/w accelerated 889f1f142adSRobert Elliott block encryption) 890f1f142adSRobert Elliott 891f1f142adSRobert Elliottendmenu 892f1f142adSRobert Elliott 893f1f142adSRobert Elliottmenu "Hashes, digests, and MACs" 894f1f142adSRobert Elliott 895f1f142adSRobert Elliottconfig CRYPTO_BLAKE2B 8963f342a23SRobert Elliott tristate "BLAKE2b" 897f1f142adSRobert Elliott select CRYPTO_HASH 898f1f142adSRobert Elliott help 8993f342a23SRobert Elliott BLAKE2b cryptographic hash function (RFC 7693) 9003f342a23SRobert Elliott 9013f342a23SRobert Elliott BLAKE2b is optimized for 64-bit platforms and can produce digests 9023f342a23SRobert Elliott of any size between 1 and 64 bytes. The keyed hash is also implemented. 903f1f142adSRobert Elliott 904f1f142adSRobert Elliott This module provides the following algorithms: 905f1f142adSRobert Elliott - blake2b-160 906f1f142adSRobert Elliott - blake2b-256 907f1f142adSRobert Elliott - blake2b-384 908f1f142adSRobert Elliott - blake2b-512 909f1f142adSRobert Elliott 9103f342a23SRobert Elliott Used by the btrfs filesystem. 9113f342a23SRobert Elliott 9123f342a23SRobert Elliott See https://blake2.net for further information. 9133f342a23SRobert Elliott 914f1f142adSRobert Elliottconfig CRYPTO_CMAC 9153f342a23SRobert Elliott tristate "CMAC (Cipher-based MAC)" 916f1f142adSRobert Elliott select CRYPTO_HASH 917f1f142adSRobert Elliott select CRYPTO_MANAGER 918f1f142adSRobert Elliott help 9193f342a23SRobert Elliott CMAC (Cipher-based Message Authentication Code) authentication 9203f342a23SRobert Elliott mode (NIST SP800-38B and IETF RFC4493) 921f1f142adSRobert Elliott 922f1f142adSRobert Elliottconfig CRYPTO_GHASH 9233f342a23SRobert Elliott tristate "GHASH" 924f1f142adSRobert Elliott select CRYPTO_HASH 92561c581a4SArd Biesheuvel select CRYPTO_LIB_GF128MUL 926f1f142adSRobert Elliott help 9273f342a23SRobert Elliott GCM GHASH function (NIST SP800-38D) 928f1f142adSRobert Elliott 929f1f142adSRobert Elliottconfig CRYPTO_HMAC 9303f342a23SRobert Elliott tristate "HMAC (Keyed-Hash MAC)" 931f1f142adSRobert Elliott select CRYPTO_HASH 932f1f142adSRobert Elliott select CRYPTO_MANAGER 933f1f142adSRobert Elliott help 9343f342a23SRobert Elliott HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and 9353f342a23SRobert Elliott RFC2104) 9363f342a23SRobert Elliott 9373f342a23SRobert Elliott This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP). 938f1f142adSRobert Elliott 939f1f142adSRobert Elliottconfig CRYPTO_MD4 9403f342a23SRobert Elliott tristate "MD4" 941f1f142adSRobert Elliott select CRYPTO_HASH 942f1f142adSRobert Elliott help 9433f342a23SRobert Elliott MD4 message digest algorithm (RFC1320) 944f1f142adSRobert Elliott 945f1f142adSRobert Elliottconfig CRYPTO_MD5 9463f342a23SRobert Elliott tristate "MD5" 947f1f142adSRobert Elliott select CRYPTO_HASH 948f1f142adSRobert Elliott help 9493f342a23SRobert Elliott MD5 message digest algorithm (RFC1321) 950f1f142adSRobert Elliott 951f1f142adSRobert Elliottconfig CRYPTO_MICHAEL_MIC 9523f342a23SRobert Elliott tristate "Michael MIC" 953f1f142adSRobert Elliott select CRYPTO_HASH 954f1f142adSRobert Elliott help 9553f342a23SRobert Elliott Michael MIC (Message Integrity Code) (IEEE 802.11i) 9563f342a23SRobert Elliott 9573f342a23SRobert Elliott Defined by the IEEE 802.11i TKIP (Temporal Key Integrity Protocol), 9583f342a23SRobert Elliott known as WPA (Wif-Fi Protected Access). 9593f342a23SRobert Elliott 9603f342a23SRobert Elliott This algorithm is required for TKIP, but it should not be used for 9613f342a23SRobert Elliott other purposes because of the weakness of the algorithm. 962f1f142adSRobert Elliott 963f1f142adSRobert Elliottconfig CRYPTO_POLYVAL 964f1f142adSRobert Elliott tristate 965f1f142adSRobert Elliott select CRYPTO_HASH 96661c581a4SArd Biesheuvel select CRYPTO_LIB_GF128MUL 967f1f142adSRobert Elliott help 9683f342a23SRobert Elliott POLYVAL hash function for HCTR2 9693f342a23SRobert Elliott 9703f342a23SRobert Elliott This is used in HCTR2. It is not a general-purpose 971f1f142adSRobert Elliott cryptographic hash function. 972f1f142adSRobert Elliott 973f1f142adSRobert Elliottconfig CRYPTO_POLY1305 9743f342a23SRobert Elliott tristate "Poly1305" 975f1f142adSRobert Elliott select CRYPTO_HASH 976f1f142adSRobert Elliott select CRYPTO_LIB_POLY1305_GENERIC 977f1f142adSRobert Elliott help 9783f342a23SRobert Elliott Poly1305 authenticator algorithm (RFC7539) 979f1f142adSRobert Elliott 980f1f142adSRobert Elliott Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein. 981f1f142adSRobert Elliott It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use 982f1f142adSRobert Elliott in IETF protocols. This is the portable C implementation of Poly1305. 983f1f142adSRobert Elliott 984f1f142adSRobert Elliottconfig CRYPTO_RMD160 9853f342a23SRobert Elliott tristate "RIPEMD-160" 986f1f142adSRobert Elliott select CRYPTO_HASH 987f1f142adSRobert Elliott help 9883f342a23SRobert Elliott RIPEMD-160 hash function (ISO/IEC 10118-3) 989f1f142adSRobert Elliott 990f1f142adSRobert Elliott RIPEMD-160 is a 160-bit cryptographic hash function. It is intended 991f1f142adSRobert Elliott to be used as a secure replacement for the 128-bit hash functions 992f1f142adSRobert Elliott MD4, MD5 and its predecessor RIPEMD 993f1f142adSRobert Elliott (not to be confused with RIPEMD-128). 994f1f142adSRobert Elliott 9953f342a23SRobert Elliott Its speed is comparable to SHA-1 and there are no known attacks 996f1f142adSRobert Elliott against RIPEMD-160. 997f1f142adSRobert Elliott 998f1f142adSRobert Elliott Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. 9993f342a23SRobert Elliott See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html 10003f342a23SRobert Elliott for further information. 1001f1f142adSRobert Elliott 1002f1f142adSRobert Elliottconfig CRYPTO_SHA1 10033f342a23SRobert Elliott tristate "SHA-1" 1004f1f142adSRobert Elliott select CRYPTO_HASH 1005f1f142adSRobert Elliott select CRYPTO_LIB_SHA1 1006f1f142adSRobert Elliott help 10073f342a23SRobert Elliott SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3) 1008f1f142adSRobert Elliott 1009f1f142adSRobert Elliottconfig CRYPTO_SHA256 10103f342a23SRobert Elliott tristate "SHA-224 and SHA-256" 1011f1f142adSRobert Elliott select CRYPTO_HASH 1012f1f142adSRobert Elliott select CRYPTO_LIB_SHA256 1013f1f142adSRobert Elliott help 10143f342a23SRobert Elliott SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC 10118-3) 1015f1f142adSRobert Elliott 10163f342a23SRobert Elliott This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP). 10173f342a23SRobert Elliott Used by the btrfs filesystem, Ceph, NFS, and SMB. 1018f1f142adSRobert Elliott 1019f1f142adSRobert Elliottconfig CRYPTO_SHA512 10203f342a23SRobert Elliott tristate "SHA-384 and SHA-512" 1021f1f142adSRobert Elliott select CRYPTO_HASH 1022f1f142adSRobert Elliott help 10233f342a23SRobert Elliott SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC 10118-3) 1024f1f142adSRobert Elliott 1025f1f142adSRobert Elliottconfig CRYPTO_SHA3 10263f342a23SRobert Elliott tristate "SHA-3" 1027f1f142adSRobert Elliott select CRYPTO_HASH 1028f1f142adSRobert Elliott help 10293f342a23SRobert Elliott SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3) 1030f1f142adSRobert Elliott 1031f1f142adSRobert Elliottconfig CRYPTO_SM3 1032f1f142adSRobert Elliott tristate 1033f1f142adSRobert Elliott 1034f1f142adSRobert Elliottconfig CRYPTO_SM3_GENERIC 10353f342a23SRobert Elliott tristate "SM3 (ShangMi 3)" 1036f1f142adSRobert Elliott select CRYPTO_HASH 1037f1f142adSRobert Elliott select CRYPTO_SM3 1038f1f142adSRobert Elliott help 10393f342a23SRobert Elliott SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3) 10403f342a23SRobert Elliott 10413f342a23SRobert Elliott This is part of the Chinese Commercial Cryptography suite. 1042f1f142adSRobert Elliott 1043f1f142adSRobert Elliott References: 1044f1f142adSRobert Elliott http://www.oscca.gov.cn/UpFile/20101222141857786.pdf 1045f1f142adSRobert Elliott https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash 1046f1f142adSRobert Elliott 1047f1f142adSRobert Elliottconfig CRYPTO_STREEBOG 10483f342a23SRobert Elliott tristate "Streebog" 1049f1f142adSRobert Elliott select CRYPTO_HASH 1050f1f142adSRobert Elliott help 10513f342a23SRobert Elliott Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3) 10523f342a23SRobert Elliott 10533f342a23SRobert Elliott This is one of the Russian cryptographic standard algorithms (called 10543f342a23SRobert Elliott GOST algorithms). This setting enables two hash algorithms with 10553f342a23SRobert Elliott 256 and 512 bits output. 1056f1f142adSRobert Elliott 1057f1f142adSRobert Elliott References: 1058f1f142adSRobert Elliott https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf 1059f1f142adSRobert Elliott https://tools.ietf.org/html/rfc6986 1060f1f142adSRobert Elliott 1061f1f142adSRobert Elliottconfig CRYPTO_VMAC 10623f342a23SRobert Elliott tristate "VMAC" 1063f1f142adSRobert Elliott select CRYPTO_HASH 1064f1f142adSRobert Elliott select CRYPTO_MANAGER 1065f1f142adSRobert Elliott help 1066f1f142adSRobert Elliott VMAC is a message authentication algorithm designed for 1067f1f142adSRobert Elliott very high speed on 64-bit architectures. 1068f1f142adSRobert Elliott 10693f342a23SRobert Elliott See https://fastcrypto.org/vmac for further information. 1070f1f142adSRobert Elliott 1071f1f142adSRobert Elliottconfig CRYPTO_WP512 10723f342a23SRobert Elliott tristate "Whirlpool" 1073f1f142adSRobert Elliott select CRYPTO_HASH 1074f1f142adSRobert Elliott help 10753f342a23SRobert Elliott Whirlpool hash function (ISO/IEC 10118-3) 10763f342a23SRobert Elliott 10773f342a23SRobert Elliott 512, 384 and 256-bit hashes. 1078f1f142adSRobert Elliott 1079f1f142adSRobert Elliott Whirlpool-512 is part of the NESSIE cryptographic primitives. 1080f1f142adSRobert Elliott 10813f342a23SRobert Elliott See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html 10823f342a23SRobert Elliott for further information. 1083f1f142adSRobert Elliott 1084f1f142adSRobert Elliottconfig CRYPTO_XCBC 10853f342a23SRobert Elliott tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)" 1086f1f142adSRobert Elliott select CRYPTO_HASH 1087f1f142adSRobert Elliott select CRYPTO_MANAGER 1088f1f142adSRobert Elliott help 10893f342a23SRobert Elliott XCBC-MAC (Extended Cipher Block Chaining Message Authentication 10903f342a23SRobert Elliott Code) (RFC3566) 1091f1f142adSRobert Elliott 1092f1f142adSRobert Elliottconfig CRYPTO_XXHASH 10933f342a23SRobert Elliott tristate "xxHash" 1094f1f142adSRobert Elliott select CRYPTO_HASH 1095f1f142adSRobert Elliott select XXHASH 1096f1f142adSRobert Elliott help 10973f342a23SRobert Elliott xxHash non-cryptographic hash algorithm 10983f342a23SRobert Elliott 10993f342a23SRobert Elliott Extremely fast, working at speeds close to RAM limits. 11003f342a23SRobert Elliott 11013f342a23SRobert Elliott Used by the btrfs filesystem. 1102f1f142adSRobert Elliott 1103f1f142adSRobert Elliottendmenu 1104f1f142adSRobert Elliott 1105f1f142adSRobert Elliottmenu "CRCs (cyclic redundancy checks)" 1106f1f142adSRobert Elliott 1107f1f142adSRobert Elliottconfig CRYPTO_CRC32C 1108ec84348dSRobert Elliott tristate "CRC32c" 1109f1f142adSRobert Elliott select CRYPTO_HASH 1110f1f142adSRobert Elliott select CRC32 1111f1f142adSRobert Elliott help 1112ec84348dSRobert Elliott CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720) 1113ec84348dSRobert Elliott 1114ec84348dSRobert Elliott A 32-bit CRC (cyclic redundancy check) with a polynomial defined 1115ec84348dSRobert Elliott by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic 1116ec84348dSRobert Elliott Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions 1117ec84348dSRobert Elliott on Communications, Vol. 41, No. 6, June 1993, selected for use with 1118ec84348dSRobert Elliott iSCSI. 1119ec84348dSRobert Elliott 1120ec84348dSRobert Elliott Used by btrfs, ext4, jbd2, NVMeoF/TCP, and iSCSI. 1121f1f142adSRobert Elliott 1122f1f142adSRobert Elliottconfig CRYPTO_CRC32 1123ec84348dSRobert Elliott tristate "CRC32" 1124f1f142adSRobert Elliott select CRYPTO_HASH 1125f1f142adSRobert Elliott select CRC32 1126f1f142adSRobert Elliott help 1127ec84348dSRobert Elliott CRC32 CRC algorithm (IEEE 802.3) 1128ec84348dSRobert Elliott 1129ec84348dSRobert Elliott Used by RoCEv2 and f2fs. 1130f1f142adSRobert Elliott 1131f1f142adSRobert Elliottconfig CRYPTO_CRCT10DIF 1132ec84348dSRobert Elliott tristate "CRCT10DIF" 1133f1f142adSRobert Elliott select CRYPTO_HASH 1134f1f142adSRobert Elliott help 1135ec84348dSRobert Elliott CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF) 1136ec84348dSRobert Elliott 1137ec84348dSRobert Elliott CRC algorithm used by the SCSI Block Commands standard. 1138f1f142adSRobert Elliott 1139f1f142adSRobert Elliottconfig CRYPTO_CRC64_ROCKSOFT 1140ec84348dSRobert Elliott tristate "CRC64 based on Rocksoft Model algorithm" 1141f1f142adSRobert Elliott depends on CRC64 1142f1f142adSRobert Elliott select CRYPTO_HASH 1143ec84348dSRobert Elliott help 1144ec84348dSRobert Elliott CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm 1145ec84348dSRobert Elliott 1146ec84348dSRobert Elliott Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY) 1147ec84348dSRobert Elliott 1148ec84348dSRobert Elliott See https://zlib.net/crc_v3.txt 1149f1f142adSRobert Elliott 1150f1f142adSRobert Elliottendmenu 1151f1f142adSRobert Elliott 1152f1f142adSRobert Elliottmenu "Compression" 1153584fffc8SSebastian Siewior 11541da177e4SLinus Torvaldsconfig CRYPTO_DEFLATE 1155a9a98d49SRobert Elliott tristate "Deflate" 1156cce9e06dSHerbert Xu select CRYPTO_ALGAPI 1157f6ded09dSGiovanni Cabiddu select CRYPTO_ACOMP2 11581da177e4SLinus Torvalds select ZLIB_INFLATE 11591da177e4SLinus Torvalds select ZLIB_DEFLATE 11601da177e4SLinus Torvalds help 1161a9a98d49SRobert Elliott Deflate compression algorithm (RFC1951) 11621da177e4SLinus Torvalds 1163a9a98d49SRobert Elliott Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394) 11641da177e4SLinus Torvalds 11650b77abb3SZoltan Sogorconfig CRYPTO_LZO 1166a9a98d49SRobert Elliott tristate "LZO" 11670b77abb3SZoltan Sogor select CRYPTO_ALGAPI 1168ac9d2c4bSGiovanni Cabiddu select CRYPTO_ACOMP2 11690b77abb3SZoltan Sogor select LZO_COMPRESS 11700b77abb3SZoltan Sogor select LZO_DECOMPRESS 11710b77abb3SZoltan Sogor help 1172a9a98d49SRobert Elliott LZO compression algorithm 1173a9a98d49SRobert Elliott 1174a9a98d49SRobert Elliott See https://www.oberhumer.com/opensource/lzo/ for further information. 11750b77abb3SZoltan Sogor 117635a1fc18SSeth Jenningsconfig CRYPTO_842 1177a9a98d49SRobert Elliott tristate "842" 11782062c5b6SDan Streetman select CRYPTO_ALGAPI 11796a8de3aeSGiovanni Cabiddu select CRYPTO_ACOMP2 11802062c5b6SDan Streetman select 842_COMPRESS 11812062c5b6SDan Streetman select 842_DECOMPRESS 118235a1fc18SSeth Jennings help 1183a9a98d49SRobert Elliott 842 compression algorithm by IBM 1184a9a98d49SRobert Elliott 1185a9a98d49SRobert Elliott See https://github.com/plauth/lib842 for further information. 118635a1fc18SSeth Jennings 11870ea8530dSChanho Minconfig CRYPTO_LZ4 1188a9a98d49SRobert Elliott tristate "LZ4" 11890ea8530dSChanho Min select CRYPTO_ALGAPI 11908cd9330eSGiovanni Cabiddu select CRYPTO_ACOMP2 11910ea8530dSChanho Min select LZ4_COMPRESS 11920ea8530dSChanho Min select LZ4_DECOMPRESS 11930ea8530dSChanho Min help 1194a9a98d49SRobert Elliott LZ4 compression algorithm 1195a9a98d49SRobert Elliott 1196a9a98d49SRobert Elliott See https://github.com/lz4/lz4 for further information. 11970ea8530dSChanho Min 11980ea8530dSChanho Minconfig CRYPTO_LZ4HC 1199a9a98d49SRobert Elliott tristate "LZ4HC" 12000ea8530dSChanho Min select CRYPTO_ALGAPI 120191d53d96SGiovanni Cabiddu select CRYPTO_ACOMP2 12020ea8530dSChanho Min select LZ4HC_COMPRESS 12030ea8530dSChanho Min select LZ4_DECOMPRESS 12040ea8530dSChanho Min help 1205a9a98d49SRobert Elliott LZ4 high compression mode algorithm 1206a9a98d49SRobert Elliott 1207a9a98d49SRobert Elliott See https://github.com/lz4/lz4 for further information. 12080ea8530dSChanho Min 1209d28fc3dbSNick Terrellconfig CRYPTO_ZSTD 1210a9a98d49SRobert Elliott tristate "Zstd" 1211d28fc3dbSNick Terrell select CRYPTO_ALGAPI 1212d28fc3dbSNick Terrell select CRYPTO_ACOMP2 1213d28fc3dbSNick Terrell select ZSTD_COMPRESS 1214d28fc3dbSNick Terrell select ZSTD_DECOMPRESS 1215d28fc3dbSNick Terrell help 1216a9a98d49SRobert Elliott zstd compression algorithm 1217a9a98d49SRobert Elliott 1218a9a98d49SRobert Elliott See https://github.com/facebook/zstd for further information. 1219d28fc3dbSNick Terrell 1220f1f142adSRobert Elliottendmenu 1221f1f142adSRobert Elliott 1222f1f142adSRobert Elliottmenu "Random number generation" 122317f0f4a4SNeil Horman 122417f0f4a4SNeil Hormanconfig CRYPTO_ANSI_CPRNG 1225a9a98d49SRobert Elliott tristate "ANSI PRNG (Pseudo Random Number Generator)" 122617f0f4a4SNeil Horman select CRYPTO_AES 122717f0f4a4SNeil Horman select CRYPTO_RNG 122817f0f4a4SNeil Horman help 1229a9a98d49SRobert Elliott Pseudo RNG (random number generator) (ANSI X9.31 Appendix A.2.4) 1230a9a98d49SRobert Elliott 1231a9a98d49SRobert Elliott This uses the AES cipher algorithm. 1232a9a98d49SRobert Elliott 1233a9a98d49SRobert Elliott Note that this option must be enabled if CRYPTO_FIPS is selected 123417f0f4a4SNeil Horman 1235f2c89a10SHerbert Xumenuconfig CRYPTO_DRBG_MENU 1236a9a98d49SRobert Elliott tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)" 1237419090c6SStephan Mueller help 1238a9a98d49SRobert Elliott DRBG (Deterministic Random Bit Generator) (NIST SP800-90A) 1239a9a98d49SRobert Elliott 1240a9a98d49SRobert Elliott In the following submenu, one or more of the DRBG types must be selected. 1241419090c6SStephan Mueller 1242f2c89a10SHerbert Xuif CRYPTO_DRBG_MENU 1243419090c6SStephan Mueller 1244419090c6SStephan Muellerconfig CRYPTO_DRBG_HMAC 1245401e4238SHerbert Xu bool 1246419090c6SStephan Mueller default y 1247419090c6SStephan Mueller select CRYPTO_HMAC 12485261cdf4SStephan Mueller select CRYPTO_SHA512 1249419090c6SStephan Mueller 1250419090c6SStephan Muellerconfig CRYPTO_DRBG_HASH 1251a9a98d49SRobert Elliott bool "Hash_DRBG" 1252826775bbSHerbert Xu select CRYPTO_SHA256 1253419090c6SStephan Mueller help 1254a9a98d49SRobert Elliott Hash_DRBG variant as defined in NIST SP800-90A. 1255a9a98d49SRobert Elliott 1256a9a98d49SRobert Elliott This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms. 1257419090c6SStephan Mueller 1258419090c6SStephan Muellerconfig CRYPTO_DRBG_CTR 1259a9a98d49SRobert Elliott bool "CTR_DRBG" 1260419090c6SStephan Mueller select CRYPTO_AES 1261d6fc1a45SCorentin Labbe select CRYPTO_CTR 1262419090c6SStephan Mueller help 1263a9a98d49SRobert Elliott CTR_DRBG variant as defined in NIST SP800-90A. 1264a9a98d49SRobert Elliott 1265a9a98d49SRobert Elliott This uses the AES cipher algorithm with the counter block mode. 1266419090c6SStephan Mueller 1267f2c89a10SHerbert Xuconfig CRYPTO_DRBG 1268f2c89a10SHerbert Xu tristate 1269401e4238SHerbert Xu default CRYPTO_DRBG_MENU 1270f2c89a10SHerbert Xu select CRYPTO_RNG 1271bb5530e4SStephan Mueller select CRYPTO_JITTERENTROPY 1272f2c89a10SHerbert Xu 1273f2c89a10SHerbert Xuendif # if CRYPTO_DRBG_MENU 1274419090c6SStephan Mueller 1275bb5530e4SStephan Muellerconfig CRYPTO_JITTERENTROPY 1276a9a98d49SRobert Elliott tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)" 12772f313e02SArnd Bergmann select CRYPTO_RNG 1278bb897c55SStephan Müller select CRYPTO_SHA3 1279bb5530e4SStephan Mueller help 1280a9a98d49SRobert Elliott CPU Jitter RNG (Random Number Generator) from the Jitterentropy library 1281a9a98d49SRobert Elliott 1282a9a98d49SRobert Elliott A non-physical non-deterministic ("true") RNG (e.g., an entropy source 1283a9a98d49SRobert Elliott compliant with NIST SP800-90B) intended to provide a seed to a 1284a9a98d49SRobert Elliott deterministic RNG (e.g. per NIST SP800-90C). 1285a9a98d49SRobert Elliott This RNG does not perform any cryptographic whitening of the generated 1286a9a98d49SRobert Elliott 1287a9a98d49SRobert Elliott See https://www.chronox.de/jent.html 1288bb5530e4SStephan Mueller 128969f1c387SStephan Müllerconfig CRYPTO_JITTERENTROPY_TESTINTERFACE 129069f1c387SStephan Müller bool "CPU Jitter RNG Test Interface" 129169f1c387SStephan Müller depends on CRYPTO_JITTERENTROPY 129269f1c387SStephan Müller help 129369f1c387SStephan Müller The test interface allows a privileged process to capture 129469f1c387SStephan Müller the raw unconditioned high resolution time stamp noise that 129569f1c387SStephan Müller is collected by the Jitter RNG for statistical analysis. As 129669f1c387SStephan Müller this data is used at the same time to generate random bits, 129769f1c387SStephan Müller the Jitter RNG operates in an insecure mode as long as the 129869f1c387SStephan Müller recording is enabled. This interface therefore is only 129969f1c387SStephan Müller intended for testing purposes and is not suitable for 130069f1c387SStephan Müller production systems. 130169f1c387SStephan Müller 130269f1c387SStephan Müller The raw noise data can be obtained using the jent_raw_hires 130369f1c387SStephan Müller debugfs file. Using the option 130469f1c387SStephan Müller jitterentropy_testing.boot_raw_hires_test=1 the raw noise of 130569f1c387SStephan Müller the first 1000 entropy events since boot can be sampled. 130669f1c387SStephan Müller 130769f1c387SStephan Müller If unsure, select N. 130869f1c387SStephan Müller 1309026a733eSStephan Müllerconfig CRYPTO_KDF800108_CTR 1310026a733eSStephan Müller tristate 1311a88592ccSHerbert Xu select CRYPTO_HMAC 1312304b4aceSStephan Müller select CRYPTO_SHA256 1313026a733eSStephan Müller 1314f1f142adSRobert Elliottendmenu 13159bc51715SRobert Elliottmenu "Userspace interface" 1316f1f142adSRobert Elliott 131703c8efc1SHerbert Xuconfig CRYPTO_USER_API 131803c8efc1SHerbert Xu tristate 131903c8efc1SHerbert Xu 1320fe869cdbSHerbert Xuconfig CRYPTO_USER_API_HASH 13219bc51715SRobert Elliott tristate "Hash algorithms" 13227451708fSHerbert Xu depends on NET 1323fe869cdbSHerbert Xu select CRYPTO_HASH 1324fe869cdbSHerbert Xu select CRYPTO_USER_API 1325fe869cdbSHerbert Xu help 13269bc51715SRobert Elliott Enable the userspace interface for hash algorithms. 13279bc51715SRobert Elliott 13289bc51715SRobert Elliott See Documentation/crypto/userspace-if.rst and 13299bc51715SRobert Elliott https://www.chronox.de/libkcapi/html/index.html 1330fe869cdbSHerbert Xu 13318ff59090SHerbert Xuconfig CRYPTO_USER_API_SKCIPHER 13329bc51715SRobert Elliott tristate "Symmetric key cipher algorithms" 13337451708fSHerbert Xu depends on NET 1334b95bba5dSEric Biggers select CRYPTO_SKCIPHER 13358ff59090SHerbert Xu select CRYPTO_USER_API 13368ff59090SHerbert Xu help 13379bc51715SRobert Elliott Enable the userspace interface for symmetric key cipher algorithms. 13389bc51715SRobert Elliott 13399bc51715SRobert Elliott See Documentation/crypto/userspace-if.rst and 13409bc51715SRobert Elliott https://www.chronox.de/libkcapi/html/index.html 13418ff59090SHerbert Xu 13422f375538SStephan Muellerconfig CRYPTO_USER_API_RNG 13439bc51715SRobert Elliott tristate "RNG (random number generator) algorithms" 13442f375538SStephan Mueller depends on NET 13452f375538SStephan Mueller select CRYPTO_RNG 13462f375538SStephan Mueller select CRYPTO_USER_API 13472f375538SStephan Mueller help 13489bc51715SRobert Elliott Enable the userspace interface for RNG (random number generator) 13499bc51715SRobert Elliott algorithms. 13509bc51715SRobert Elliott 13519bc51715SRobert Elliott See Documentation/crypto/userspace-if.rst and 13529bc51715SRobert Elliott https://www.chronox.de/libkcapi/html/index.html 13532f375538SStephan Mueller 135477ebdabeSElena Petrovaconfig CRYPTO_USER_API_RNG_CAVP 135577ebdabeSElena Petrova bool "Enable CAVP testing of DRBG" 135677ebdabeSElena Petrova depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG 135777ebdabeSElena Petrova help 13589bc51715SRobert Elliott Enable extra APIs in the userspace interface for NIST CAVP 13599bc51715SRobert Elliott (Cryptographic Algorithm Validation Program) testing: 13609bc51715SRobert Elliott - resetting DRBG entropy 13619bc51715SRobert Elliott - providing Additional Data 13629bc51715SRobert Elliott 136377ebdabeSElena Petrova This should only be enabled for CAVP testing. You should say 136477ebdabeSElena Petrova no unless you know what this is. 136577ebdabeSElena Petrova 1366b64a2d95SHerbert Xuconfig CRYPTO_USER_API_AEAD 13679bc51715SRobert Elliott tristate "AEAD cipher algorithms" 1368b64a2d95SHerbert Xu depends on NET 1369b64a2d95SHerbert Xu select CRYPTO_AEAD 1370b95bba5dSEric Biggers select CRYPTO_SKCIPHER 137172548b09SStephan Mueller select CRYPTO_NULL 1372b64a2d95SHerbert Xu select CRYPTO_USER_API 1373b64a2d95SHerbert Xu help 13749bc51715SRobert Elliott Enable the userspace interface for AEAD cipher algorithms. 13759bc51715SRobert Elliott 13769bc51715SRobert Elliott See Documentation/crypto/userspace-if.rst and 13779bc51715SRobert Elliott https://www.chronox.de/libkcapi/html/index.html 1378b64a2d95SHerbert Xu 13799ace6771SArd Biesheuvelconfig CRYPTO_USER_API_ENABLE_OBSOLETE 13809bc51715SRobert Elliott bool "Obsolete cryptographic algorithms" 13819ace6771SArd Biesheuvel depends on CRYPTO_USER_API 13829ace6771SArd Biesheuvel default y 13839ace6771SArd Biesheuvel help 13849ace6771SArd Biesheuvel Allow obsolete cryptographic algorithms to be selected that have 13859ace6771SArd Biesheuvel already been phased out from internal use by the kernel, and are 13869ace6771SArd Biesheuvel only useful for userspace clients that still rely on them. 13879ace6771SArd Biesheuvel 1388cac5818cSCorentin Labbeconfig CRYPTO_STATS 13899bc51715SRobert Elliott bool "Crypto usage statistics" 1390a6a31385SCorentin Labbe depends on CRYPTO_USER 1391cac5818cSCorentin Labbe help 13929bc51715SRobert Elliott Enable the gathering of crypto stats. 13939bc51715SRobert Elliott 139466dd59b7SEric Biggers Enabling this option reduces the performance of the crypto API. It 139566dd59b7SEric Biggers should only be enabled when there is actually a use case for it. 139666dd59b7SEric Biggers 13979bc51715SRobert Elliott This collects data sizes, numbers of requests, and numbers 13989bc51715SRobert Elliott of errors processed by: 13999bc51715SRobert Elliott - AEAD ciphers (encrypt, decrypt) 14009bc51715SRobert Elliott - asymmetric key ciphers (encrypt, decrypt, verify, sign) 14019bc51715SRobert Elliott - symmetric key ciphers (encrypt, decrypt) 14029bc51715SRobert Elliott - compression algorithms (compress, decompress) 14039bc51715SRobert Elliott - hash algorithms (hash) 14049bc51715SRobert Elliott - key-agreement protocol primitives (setsecret, generate 14059bc51715SRobert Elliott public key, compute shared secret) 14069bc51715SRobert Elliott - RNG (generate, seed) 1407cac5818cSCorentin Labbe 1408f1f142adSRobert Elliottendmenu 1409f1f142adSRobert Elliott 1410ee08997fSDmitry Kasatkinconfig CRYPTO_HASH_INFO 1411ee08997fSDmitry Kasatkin bool 1412ee08997fSDmitry Kasatkin 141327bc50fcSLinus Torvaldsif !KMSAN # avoid false positives from assembly 14144a329fecSRobert Elliottif ARM 14154a329fecSRobert Elliottsource "arch/arm/crypto/Kconfig" 14164a329fecSRobert Elliottendif 14174a329fecSRobert Elliottif ARM64 14184a329fecSRobert Elliottsource "arch/arm64/crypto/Kconfig" 14194a329fecSRobert Elliottendif 14202f164822SMin Zhouif LOONGARCH 14212f164822SMin Zhousource "arch/loongarch/crypto/Kconfig" 14222f164822SMin Zhouendif 1423e45f710bSRobert Elliottif MIPS 1424e45f710bSRobert Elliottsource "arch/mips/crypto/Kconfig" 1425e45f710bSRobert Elliottendif 14266a490a4eSRobert Elliottif PPC 14276a490a4eSRobert Elliottsource "arch/powerpc/crypto/Kconfig" 14286a490a4eSRobert Elliottendif 1429c9d24c97SRobert Elliottif S390 1430c9d24c97SRobert Elliottsource "arch/s390/crypto/Kconfig" 1431c9d24c97SRobert Elliottendif 14320e9f9ea6SRobert Elliottif SPARC 14330e9f9ea6SRobert Elliottsource "arch/sparc/crypto/Kconfig" 14340e9f9ea6SRobert Elliottendif 143528a936efSRobert Elliottif X86 143628a936efSRobert Elliottsource "arch/x86/crypto/Kconfig" 143728a936efSRobert Elliottendif 143827bc50fcSLinus Torvaldsendif 1439e45f710bSRobert Elliott 14401da177e4SLinus Torvaldssource "drivers/crypto/Kconfig" 14418636a1f9SMasahiro Yamadasource "crypto/asymmetric_keys/Kconfig" 14428636a1f9SMasahiro Yamadasource "certs/Kconfig" 14431da177e4SLinus Torvalds 1444cce9e06dSHerbert Xuendif # if CRYPTO 1445