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