Kconfig 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Generic algorithms support
  4. #
  5. config XOR_BLOCKS
  6. tristate
  7. #
  8. # async_tx api: hardware offloaded memory transfer/transform support
  9. #
  10. source "crypto/async_tx/Kconfig"
  11. #
  12. # Cryptographic API Configuration
  13. #
  14. menuconfig CRYPTO
  15. tristate "Cryptographic API"
  16. select CRYPTO_LIB_UTILS
  17. help
  18. This option provides the core Cryptographic API.
  19. if CRYPTO
  20. menu "Crypto core or helper"
  21. config CRYPTO_FIPS
  22. bool "FIPS 200 compliance"
  23. depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS
  24. depends on (MODULE_SIG || !MODULES)
  25. help
  26. This option enables the fips boot option which is
  27. required if you want the system to operate in a FIPS 200
  28. certification. You should say no unless you know what
  29. this is.
  30. config CRYPTO_FIPS_NAME
  31. string "FIPS Module Name"
  32. default "Linux Kernel Cryptographic API"
  33. depends on CRYPTO_FIPS
  34. help
  35. This option sets the FIPS Module name reported by the Crypto API via
  36. the /proc/sys/crypto/fips_name file.
  37. config CRYPTO_FIPS_CUSTOM_VERSION
  38. bool "Use Custom FIPS Module Version"
  39. depends on CRYPTO_FIPS
  40. default n
  41. config CRYPTO_FIPS_VERSION
  42. string "FIPS Module Version"
  43. default "(none)"
  44. depends on CRYPTO_FIPS_CUSTOM_VERSION
  45. help
  46. This option provides the ability to override the FIPS Module Version.
  47. By default the KERNELRELEASE value is used.
  48. config CRYPTO_ALGAPI
  49. tristate
  50. select CRYPTO_ALGAPI2
  51. help
  52. This option provides the API for cryptographic algorithms.
  53. config CRYPTO_ALGAPI2
  54. tristate
  55. config CRYPTO_AEAD
  56. tristate
  57. select CRYPTO_AEAD2
  58. select CRYPTO_ALGAPI
  59. config CRYPTO_AEAD2
  60. tristate
  61. select CRYPTO_ALGAPI2
  62. config CRYPTO_SIG
  63. tristate
  64. select CRYPTO_SIG2
  65. select CRYPTO_ALGAPI
  66. config CRYPTO_SIG2
  67. tristate
  68. select CRYPTO_ALGAPI2
  69. config CRYPTO_SKCIPHER
  70. tristate
  71. select CRYPTO_SKCIPHER2
  72. select CRYPTO_ALGAPI
  73. select CRYPTO_ECB
  74. config CRYPTO_SKCIPHER2
  75. tristate
  76. select CRYPTO_ALGAPI2
  77. config CRYPTO_HASH
  78. tristate
  79. select CRYPTO_HASH2
  80. select CRYPTO_ALGAPI
  81. config CRYPTO_HASH2
  82. tristate
  83. select CRYPTO_ALGAPI2
  84. config CRYPTO_RNG
  85. tristate
  86. select CRYPTO_RNG2
  87. select CRYPTO_ALGAPI
  88. config CRYPTO_RNG2
  89. tristate
  90. select CRYPTO_ALGAPI2
  91. config CRYPTO_RNG_DEFAULT
  92. tristate
  93. select CRYPTO_DRBG_MENU
  94. config CRYPTO_AKCIPHER2
  95. tristate
  96. select CRYPTO_ALGAPI2
  97. config CRYPTO_AKCIPHER
  98. tristate
  99. select CRYPTO_AKCIPHER2
  100. select CRYPTO_ALGAPI
  101. config CRYPTO_KPP2
  102. tristate
  103. select CRYPTO_ALGAPI2
  104. config CRYPTO_KPP
  105. tristate
  106. select CRYPTO_ALGAPI
  107. select CRYPTO_KPP2
  108. config CRYPTO_ACOMP2
  109. tristate
  110. select CRYPTO_ALGAPI2
  111. select SGL_ALLOC
  112. config CRYPTO_ACOMP
  113. tristate
  114. select CRYPTO_ALGAPI
  115. select CRYPTO_ACOMP2
  116. config CRYPTO_MANAGER
  117. tristate "Cryptographic algorithm manager"
  118. select CRYPTO_MANAGER2
  119. help
  120. Create default cryptographic template instantiations such as
  121. cbc(aes).
  122. config CRYPTO_MANAGER2
  123. def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
  124. select CRYPTO_ACOMP2
  125. select CRYPTO_AEAD2
  126. select CRYPTO_AKCIPHER2
  127. select CRYPTO_SIG2
  128. select CRYPTO_HASH2
  129. select CRYPTO_KPP2
  130. select CRYPTO_RNG2
  131. select CRYPTO_SKCIPHER2
  132. config CRYPTO_USER
  133. tristate "Userspace cryptographic algorithm configuration"
  134. depends on NET
  135. select CRYPTO_MANAGER
  136. help
  137. Userspace configuration for cryptographic instantiations such as
  138. cbc(aes).
  139. config CRYPTO_MANAGER_DISABLE_TESTS
  140. bool "Disable run-time self tests"
  141. default y
  142. help
  143. Disable run-time self tests that normally take place at
  144. algorithm registration.
  145. config CRYPTO_MANAGER_EXTRA_TESTS
  146. bool "Enable extra run-time crypto self tests"
  147. depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_MANAGER
  148. help
  149. Enable extra run-time self tests of registered crypto algorithms,
  150. including randomized fuzz tests.
  151. This is intended for developer use only, as these tests take much
  152. longer to run than the normal self tests.
  153. config CRYPTO_NULL
  154. tristate "Null algorithms"
  155. select CRYPTO_NULL2
  156. help
  157. These are 'Null' algorithms, used by IPsec, which do nothing.
  158. config CRYPTO_NULL2
  159. tristate
  160. select CRYPTO_ALGAPI2
  161. select CRYPTO_SKCIPHER2
  162. select CRYPTO_HASH2
  163. config CRYPTO_PCRYPT
  164. tristate "Parallel crypto engine"
  165. depends on SMP
  166. select PADATA
  167. select CRYPTO_MANAGER
  168. select CRYPTO_AEAD
  169. help
  170. This converts an arbitrary crypto algorithm into a parallel
  171. algorithm that executes in kernel threads.
  172. config CRYPTO_CRYPTD
  173. tristate "Software async crypto daemon"
  174. select CRYPTO_SKCIPHER
  175. select CRYPTO_HASH
  176. select CRYPTO_MANAGER
  177. help
  178. This is a generic software asynchronous crypto daemon that
  179. converts an arbitrary synchronous software crypto algorithm
  180. into an asynchronous algorithm that executes in a kernel thread.
  181. config CRYPTO_AUTHENC
  182. tristate "Authenc support"
  183. select CRYPTO_AEAD
  184. select CRYPTO_SKCIPHER
  185. select CRYPTO_MANAGER
  186. select CRYPTO_HASH
  187. select CRYPTO_NULL
  188. help
  189. Authenc: Combined mode wrapper for IPsec.
  190. This is required for IPSec ESP (XFRM_ESP).
  191. config CRYPTO_TEST
  192. tristate "Testing module"
  193. depends on m || EXPERT
  194. select CRYPTO_MANAGER
  195. help
  196. Quick & dirty crypto test module.
  197. config CRYPTO_SIMD
  198. tristate
  199. select CRYPTO_CRYPTD
  200. config CRYPTO_ENGINE
  201. tristate
  202. endmenu
  203. menu "Public-key cryptography"
  204. config CRYPTO_RSA
  205. tristate "RSA (Rivest-Shamir-Adleman)"
  206. select CRYPTO_AKCIPHER
  207. select CRYPTO_MANAGER
  208. select MPILIB
  209. select ASN1
  210. help
  211. RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017)
  212. config CRYPTO_DH
  213. tristate "DH (Diffie-Hellman)"
  214. select CRYPTO_KPP
  215. select MPILIB
  216. help
  217. DH (Diffie-Hellman) key exchange algorithm
  218. config CRYPTO_DH_RFC7919_GROUPS
  219. bool "RFC 7919 FFDHE groups"
  220. depends on CRYPTO_DH
  221. select CRYPTO_RNG_DEFAULT
  222. help
  223. FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups
  224. defined in RFC7919.
  225. Support these finite-field groups in DH key exchanges:
  226. - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192
  227. If unsure, say N.
  228. config CRYPTO_ECC
  229. tristate
  230. select CRYPTO_RNG_DEFAULT
  231. config CRYPTO_ECDH
  232. tristate "ECDH (Elliptic Curve Diffie-Hellman)"
  233. select CRYPTO_ECC
  234. select CRYPTO_KPP
  235. help
  236. ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm
  237. using curves P-192, P-256, and P-384 (FIPS 186)
  238. config CRYPTO_ECDSA
  239. tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)"
  240. select CRYPTO_ECC
  241. select CRYPTO_AKCIPHER
  242. select ASN1
  243. help
  244. ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186,
  245. ISO/IEC 14888-3)
  246. using curves P-192, P-256, and P-384
  247. Only signature verification is implemented.
  248. config CRYPTO_ECRDSA
  249. tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)"
  250. select CRYPTO_ECC
  251. select CRYPTO_AKCIPHER
  252. select CRYPTO_STREEBOG
  253. select OID_REGISTRY
  254. select ASN1
  255. help
  256. Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012,
  257. RFC 7091, ISO/IEC 14888-3)
  258. One of the Russian cryptographic standard algorithms (called GOST
  259. algorithms). Only signature verification is implemented.
  260. config CRYPTO_CURVE25519
  261. tristate "Curve25519"
  262. select CRYPTO_KPP
  263. select CRYPTO_LIB_CURVE25519_GENERIC
  264. help
  265. Curve25519 elliptic curve (RFC7748)
  266. endmenu
  267. menu "Block ciphers"
  268. config CRYPTO_AES
  269. tristate "AES (Advanced Encryption Standard)"
  270. select CRYPTO_ALGAPI
  271. select CRYPTO_LIB_AES
  272. help
  273. AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
  274. Rijndael appears to be consistently a very good performer in
  275. both hardware and software across a wide range of computing
  276. environments regardless of its use in feedback or non-feedback
  277. modes. Its key setup time is excellent, and its key agility is
  278. good. Rijndael's very low memory requirements make it very well
  279. suited for restricted-space environments, in which it also
  280. demonstrates excellent performance. Rijndael's operations are
  281. among the easiest to defend against power and timing attacks.
  282. The AES specifies three key sizes: 128, 192 and 256 bits
  283. config CRYPTO_AES_TI
  284. tristate "AES (Advanced Encryption Standard) (fixed time)"
  285. select CRYPTO_ALGAPI
  286. select CRYPTO_LIB_AES
  287. help
  288. AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3)
  289. This is a generic implementation of AES that attempts to eliminate
  290. data dependent latencies as much as possible without affecting
  291. performance too much. It is intended for use by the generic CCM
  292. and GCM drivers, and other CTR or CMAC/XCBC based modes that rely
  293. solely on encryption (although decryption is supported as well, but
  294. with a more dramatic performance hit)
  295. Instead of using 16 lookup tables of 1 KB each, (8 for encryption and
  296. 8 for decryption), this implementation only uses just two S-boxes of
  297. 256 bytes each, and attempts to eliminate data dependent latencies by
  298. prefetching the entire table into the cache at the start of each
  299. block. Interrupts are also disabled to avoid races where cachelines
  300. are evicted when the CPU is interrupted to do something else.
  301. config CRYPTO_ANUBIS
  302. tristate "Anubis"
  303. depends on CRYPTO_USER_API_ENABLE_OBSOLETE
  304. select CRYPTO_ALGAPI
  305. help
  306. Anubis cipher algorithm
  307. Anubis is a variable key length cipher which can use keys from
  308. 128 bits to 320 bits in length. It was evaluated as a entrant
  309. in the NESSIE competition.
  310. See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html
  311. for further information.
  312. config CRYPTO_ARIA
  313. tristate "ARIA"
  314. select CRYPTO_ALGAPI
  315. help
  316. ARIA cipher algorithm (RFC5794)
  317. ARIA is a standard encryption algorithm of the Republic of Korea.
  318. The ARIA specifies three key sizes and rounds.
  319. 128-bit: 12 rounds.
  320. 192-bit: 14 rounds.
  321. 256-bit: 16 rounds.
  322. See:
  323. https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do
  324. config CRYPTO_BLOWFISH
  325. tristate "Blowfish"
  326. select CRYPTO_ALGAPI
  327. select CRYPTO_BLOWFISH_COMMON
  328. help
  329. Blowfish cipher algorithm, by Bruce Schneier
  330. This is a variable key length cipher which can use keys from 32
  331. bits to 448 bits in length. It's fast, simple and specifically
  332. designed for use on "large microprocessors".
  333. See https://www.schneier.com/blowfish.html for further information.
  334. config CRYPTO_BLOWFISH_COMMON
  335. tristate
  336. help
  337. Common parts of the Blowfish cipher algorithm shared by the
  338. generic c and the assembler implementations.
  339. config CRYPTO_CAMELLIA
  340. tristate "Camellia"
  341. select CRYPTO_ALGAPI
  342. help
  343. Camellia cipher algorithms (ISO/IEC 18033-3)
  344. Camellia is a symmetric key block cipher developed jointly
  345. at NTT and Mitsubishi Electric Corporation.
  346. The Camellia specifies three key sizes: 128, 192 and 256 bits.
  347. See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information.
  348. config CRYPTO_CAST_COMMON
  349. tristate
  350. help
  351. Common parts of the CAST cipher algorithms shared by the
  352. generic c and the assembler implementations.
  353. config CRYPTO_CAST5
  354. tristate "CAST5 (CAST-128)"
  355. select CRYPTO_ALGAPI
  356. select CRYPTO_CAST_COMMON
  357. help
  358. CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3)
  359. config CRYPTO_CAST6
  360. tristate "CAST6 (CAST-256)"
  361. select CRYPTO_ALGAPI
  362. select CRYPTO_CAST_COMMON
  363. help
  364. CAST6 (CAST-256) encryption algorithm (RFC2612)
  365. config CRYPTO_DES
  366. tristate "DES and Triple DES EDE"
  367. select CRYPTO_ALGAPI
  368. select CRYPTO_LIB_DES
  369. help
  370. DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and
  371. Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3)
  372. cipher algorithms
  373. config CRYPTO_FCRYPT
  374. tristate "FCrypt"
  375. select CRYPTO_ALGAPI
  376. select CRYPTO_SKCIPHER
  377. help
  378. FCrypt algorithm used by RxRPC
  379. See https://ota.polyonymo.us/fcrypt-paper.txt
  380. config CRYPTO_KHAZAD
  381. tristate "Khazad"
  382. depends on CRYPTO_USER_API_ENABLE_OBSOLETE
  383. select CRYPTO_ALGAPI
  384. help
  385. Khazad cipher algorithm
  386. Khazad was a finalist in the initial NESSIE competition. It is
  387. an algorithm optimized for 64-bit processors with good performance
  388. on 32-bit processors. Khazad uses an 128 bit key size.
  389. See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html
  390. for further information.
  391. config CRYPTO_SEED
  392. tristate "SEED"
  393. depends on CRYPTO_USER_API_ENABLE_OBSOLETE
  394. select CRYPTO_ALGAPI
  395. help
  396. SEED cipher algorithm (RFC4269, ISO/IEC 18033-3)
  397. SEED is a 128-bit symmetric key block cipher that has been
  398. developed by KISA (Korea Information Security Agency) as a
  399. national standard encryption algorithm of the Republic of Korea.
  400. It is a 16 round block cipher with the key size of 128 bit.
  401. See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do
  402. for further information.
  403. config CRYPTO_SERPENT
  404. tristate "Serpent"
  405. select CRYPTO_ALGAPI
  406. help
  407. Serpent cipher algorithm, by Anderson, Biham & Knudsen
  408. Keys are allowed to be from 0 to 256 bits in length, in steps
  409. of 8 bits.
  410. See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information.
  411. config CRYPTO_SM4
  412. tristate
  413. config CRYPTO_SM4_GENERIC
  414. tristate "SM4 (ShangMi 4)"
  415. select CRYPTO_ALGAPI
  416. select CRYPTO_SM4
  417. help
  418. SM4 cipher algorithms (OSCCA GB/T 32907-2016,
  419. ISO/IEC 18033-3:2010/Amd 1:2021)
  420. SM4 (GBT.32907-2016) is a cryptographic standard issued by the
  421. Organization of State Commercial Administration of China (OSCCA)
  422. as an authorized cryptographic algorithms for the use within China.
  423. SMS4 was originally created for use in protecting wireless
  424. networks, and is mandated in the Chinese National Standard for
  425. Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure)
  426. (GB.15629.11-2003).
  427. The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and
  428. standardized through TC 260 of the Standardization Administration
  429. of the People's Republic of China (SAC).
  430. The input, output, and key of SMS4 are each 128 bits.
  431. See https://eprint.iacr.org/2008/329.pdf for further information.
  432. If unsure, say N.
  433. config CRYPTO_TEA
  434. tristate "TEA, XTEA and XETA"
  435. depends on CRYPTO_USER_API_ENABLE_OBSOLETE
  436. select CRYPTO_ALGAPI
  437. help
  438. TEA (Tiny Encryption Algorithm) cipher algorithms
  439. Tiny Encryption Algorithm is a simple cipher that uses
  440. many rounds for security. It is very fast and uses
  441. little memory.
  442. Xtendend Tiny Encryption Algorithm is a modification to
  443. the TEA algorithm to address a potential key weakness
  444. in the TEA algorithm.
  445. Xtendend Encryption Tiny Algorithm is a mis-implementation
  446. of the XTEA algorithm for compatibility purposes.
  447. config CRYPTO_TWOFISH
  448. tristate "Twofish"
  449. select CRYPTO_ALGAPI
  450. select CRYPTO_TWOFISH_COMMON
  451. help
  452. Twofish cipher algorithm
  453. Twofish was submitted as an AES (Advanced Encryption Standard)
  454. candidate cipher by researchers at CounterPane Systems. It is a
  455. 16 round block cipher supporting key sizes of 128, 192, and 256
  456. bits.
  457. See https://www.schneier.com/twofish.html for further information.
  458. config CRYPTO_TWOFISH_COMMON
  459. tristate
  460. help
  461. Common parts of the Twofish cipher algorithm shared by the
  462. generic c and the assembler implementations.
  463. endmenu
  464. menu "Length-preserving ciphers and modes"
  465. config CRYPTO_ADIANTUM
  466. tristate "Adiantum"
  467. select CRYPTO_CHACHA20
  468. select CRYPTO_LIB_POLY1305_GENERIC
  469. select CRYPTO_NHPOLY1305
  470. select CRYPTO_MANAGER
  471. help
  472. Adiantum tweakable, length-preserving encryption mode
  473. Designed for fast and secure disk encryption, especially on
  474. CPUs without dedicated crypto instructions. It encrypts
  475. each sector using the XChaCha12 stream cipher, two passes of
  476. an ε-almost-∆-universal hash function, and an invocation of
  477. the AES-256 block cipher on a single 16-byte block. On CPUs
  478. without AES instructions, Adiantum is much faster than
  479. AES-XTS.
  480. Adiantum's security is provably reducible to that of its
  481. underlying stream and block ciphers, subject to a security
  482. bound. Unlike XTS, Adiantum is a true wide-block encryption
  483. mode, so it actually provides an even stronger notion of
  484. security than XTS, subject to the security bound.
  485. If unsure, say N.
  486. config CRYPTO_ARC4
  487. tristate "ARC4 (Alleged Rivest Cipher 4)"
  488. depends on CRYPTO_USER_API_ENABLE_OBSOLETE
  489. select CRYPTO_SKCIPHER
  490. select CRYPTO_LIB_ARC4
  491. help
  492. ARC4 cipher algorithm
  493. ARC4 is a stream cipher using keys ranging from 8 bits to 2048
  494. bits in length. This algorithm is required for driver-based
  495. WEP, but it should not be for other purposes because of the
  496. weakness of the algorithm.
  497. config CRYPTO_CHACHA20
  498. tristate "ChaCha"
  499. select CRYPTO_LIB_CHACHA_GENERIC
  500. select CRYPTO_SKCIPHER
  501. help
  502. The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms
  503. ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
  504. Bernstein and further specified in RFC7539 for use in IETF protocols.
  505. This is the portable C implementation of ChaCha20. See
  506. https://cr.yp.to/chacha/chacha-20080128.pdf for further information.
  507. XChaCha20 is the application of the XSalsa20 construction to ChaCha20
  508. rather than to Salsa20. XChaCha20 extends ChaCha20's nonce length
  509. from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits,
  510. while provably retaining ChaCha20's security. See
  511. https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information.
  512. XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly
  513. reduced security margin but increased performance. It can be needed
  514. in some performance-sensitive scenarios.
  515. config CRYPTO_CBC
  516. tristate "CBC (Cipher Block Chaining)"
  517. select CRYPTO_SKCIPHER
  518. select CRYPTO_MANAGER
  519. help
  520. CBC (Cipher Block Chaining) mode (NIST SP800-38A)
  521. This block cipher mode is required for IPSec ESP (XFRM_ESP).
  522. config CRYPTO_CTR
  523. tristate "CTR (Counter)"
  524. select CRYPTO_SKCIPHER
  525. select CRYPTO_MANAGER
  526. help
  527. CTR (Counter) mode (NIST SP800-38A)
  528. config CRYPTO_CTS
  529. tristate "CTS (Cipher Text Stealing)"
  530. select CRYPTO_SKCIPHER
  531. select CRYPTO_MANAGER
  532. help
  533. CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST
  534. Addendum to SP800-38A (October 2010))
  535. This mode is required for Kerberos gss mechanism support
  536. for AES encryption.
  537. config CRYPTO_ECB
  538. tristate "ECB (Electronic Codebook)"
  539. select CRYPTO_SKCIPHER2
  540. select CRYPTO_MANAGER
  541. help
  542. ECB (Electronic Codebook) mode (NIST SP800-38A)
  543. config CRYPTO_HCTR2
  544. tristate "HCTR2"
  545. select CRYPTO_XCTR
  546. select CRYPTO_POLYVAL
  547. select CRYPTO_MANAGER
  548. help
  549. HCTR2 length-preserving encryption mode
  550. A mode for storage encryption that is efficient on processors with
  551. instructions to accelerate AES and carryless multiplication, e.g.
  552. x86 processors with AES-NI and CLMUL, and ARM processors with the
  553. ARMv8 crypto extensions.
  554. See https://eprint.iacr.org/2021/1441
  555. config CRYPTO_KEYWRAP
  556. tristate "KW (AES Key Wrap)"
  557. select CRYPTO_SKCIPHER
  558. select CRYPTO_MANAGER
  559. help
  560. KW (AES Key Wrap) authenticated encryption mode (NIST SP800-38F
  561. and RFC3394) without padding.
  562. config CRYPTO_LRW
  563. tristate "LRW (Liskov Rivest Wagner)"
  564. select CRYPTO_LIB_GF128MUL
  565. select CRYPTO_SKCIPHER
  566. select CRYPTO_MANAGER
  567. select CRYPTO_ECB
  568. help
  569. LRW (Liskov Rivest Wagner) mode
  570. A tweakable, non malleable, non movable
  571. narrow block cipher mode for dm-crypt. Use it with cipher
  572. specification string aes-lrw-benbi, the key must be 256, 320 or 384.
  573. The first 128, 192 or 256 bits in the key are used for AES and the
  574. rest is used to tie each cipher block to its logical position.
  575. See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf
  576. config CRYPTO_PCBC
  577. tristate "PCBC (Propagating Cipher Block Chaining)"
  578. select CRYPTO_SKCIPHER
  579. select CRYPTO_MANAGER
  580. help
  581. PCBC (Propagating Cipher Block Chaining) mode
  582. This block cipher mode is required for RxRPC.
  583. config CRYPTO_XCTR
  584. tristate
  585. select CRYPTO_SKCIPHER
  586. select CRYPTO_MANAGER
  587. help
  588. XCTR (XOR Counter) mode for HCTR2
  589. This blockcipher mode is a variant of CTR mode using XORs and little-endian
  590. addition rather than big-endian arithmetic.
  591. XCTR mode is used to implement HCTR2.
  592. config CRYPTO_XTS
  593. tristate "XTS (XOR Encrypt XOR with ciphertext stealing)"
  594. select CRYPTO_SKCIPHER
  595. select CRYPTO_MANAGER
  596. select CRYPTO_ECB
  597. help
  598. XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
  599. and IEEE 1619)
  600. Use with aes-xts-plain, key size 256, 384 or 512 bits. This
  601. implementation currently can't handle a sectorsize which is not a
  602. multiple of 16 bytes.
  603. config CRYPTO_NHPOLY1305
  604. tristate
  605. select CRYPTO_HASH
  606. select CRYPTO_LIB_POLY1305_GENERIC
  607. endmenu
  608. menu "AEAD (authenticated encryption with associated data) ciphers"
  609. config CRYPTO_AEGIS128
  610. tristate "AEGIS-128"
  611. select CRYPTO_AEAD
  612. select CRYPTO_AES # for AES S-box tables
  613. help
  614. AEGIS-128 AEAD algorithm
  615. config CRYPTO_AEGIS128_SIMD
  616. bool "AEGIS-128 (arm NEON, arm64 NEON)"
  617. depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON)
  618. default y
  619. help
  620. AEGIS-128 AEAD algorithm
  621. Architecture: arm or arm64 using:
  622. - NEON (Advanced SIMD) extension
  623. config CRYPTO_CHACHA20POLY1305
  624. tristate "ChaCha20-Poly1305"
  625. select CRYPTO_CHACHA20
  626. select CRYPTO_POLY1305
  627. select CRYPTO_AEAD
  628. select CRYPTO_MANAGER
  629. help
  630. ChaCha20 stream cipher and Poly1305 authenticator combined
  631. mode (RFC8439)
  632. config CRYPTO_CCM
  633. tristate "CCM (Counter with Cipher Block Chaining-MAC)"
  634. select CRYPTO_CTR
  635. select CRYPTO_HASH
  636. select CRYPTO_AEAD
  637. select CRYPTO_MANAGER
  638. help
  639. CCM (Counter with Cipher Block Chaining-Message Authentication Code)
  640. authenticated encryption mode (NIST SP800-38C)
  641. config CRYPTO_GCM
  642. tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)"
  643. select CRYPTO_CTR
  644. select CRYPTO_AEAD
  645. select CRYPTO_GHASH
  646. select CRYPTO_NULL
  647. select CRYPTO_MANAGER
  648. help
  649. GCM (Galois/Counter Mode) authenticated encryption mode and GMAC
  650. (GCM Message Authentication Code) (NIST SP800-38D)
  651. This is required for IPSec ESP (XFRM_ESP).
  652. config CRYPTO_GENIV
  653. tristate
  654. select CRYPTO_AEAD
  655. select CRYPTO_NULL
  656. select CRYPTO_MANAGER
  657. select CRYPTO_RNG_DEFAULT
  658. config CRYPTO_SEQIV
  659. tristate "Sequence Number IV Generator"
  660. select CRYPTO_GENIV
  661. help
  662. Sequence Number IV generator
  663. This IV generator generates an IV based on a sequence number by
  664. xoring it with a salt. This algorithm is mainly useful for CTR.
  665. This is required for IPsec ESP (XFRM_ESP).
  666. config CRYPTO_ECHAINIV
  667. tristate "Encrypted Chain IV Generator"
  668. select CRYPTO_GENIV
  669. help
  670. Encrypted Chain IV generator
  671. This IV generator generates an IV based on the encryption of
  672. a sequence number xored with a salt. This is the default
  673. algorithm for CBC.
  674. config CRYPTO_ESSIV
  675. tristate "Encrypted Salt-Sector IV Generator"
  676. select CRYPTO_AUTHENC
  677. help
  678. Encrypted Salt-Sector IV generator
  679. This IV generator is used in some cases by fscrypt and/or
  680. dm-crypt. It uses the hash of the block encryption key as the
  681. symmetric key for a block encryption pass applied to the input
  682. IV, making low entropy IV sources more suitable for block
  683. encryption.
  684. This driver implements a crypto API template that can be
  685. instantiated either as an skcipher or as an AEAD (depending on the
  686. type of the first template argument), and which defers encryption
  687. and decryption requests to the encapsulated cipher after applying
  688. ESSIV to the input IV. Note that in the AEAD case, it is assumed
  689. that the keys are presented in the same format used by the authenc
  690. template, and that the IV appears at the end of the authenticated
  691. associated data (AAD) region (which is how dm-crypt uses it.)
  692. Note that the use of ESSIV is not recommended for new deployments,
  693. and so this only needs to be enabled when interoperability with
  694. existing encrypted volumes of filesystems is required, or when
  695. building for a particular system that requires it (e.g., when
  696. the SoC in question has accelerated CBC but not XTS, making CBC
  697. combined with ESSIV the only feasible mode for h/w accelerated
  698. block encryption)
  699. endmenu
  700. menu "Hashes, digests, and MACs"
  701. config CRYPTO_BLAKE2B
  702. tristate "BLAKE2b"
  703. select CRYPTO_HASH
  704. help
  705. BLAKE2b cryptographic hash function (RFC 7693)
  706. BLAKE2b is optimized for 64-bit platforms and can produce digests
  707. of any size between 1 and 64 bytes. The keyed hash is also implemented.
  708. This module provides the following algorithms:
  709. - blake2b-160
  710. - blake2b-256
  711. - blake2b-384
  712. - blake2b-512
  713. Used by the btrfs filesystem.
  714. See https://blake2.net for further information.
  715. config CRYPTO_CMAC
  716. tristate "CMAC (Cipher-based MAC)"
  717. select CRYPTO_HASH
  718. select CRYPTO_MANAGER
  719. help
  720. CMAC (Cipher-based Message Authentication Code) authentication
  721. mode (NIST SP800-38B and IETF RFC4493)
  722. config CRYPTO_GHASH
  723. tristate "GHASH"
  724. select CRYPTO_HASH
  725. select CRYPTO_LIB_GF128MUL
  726. help
  727. GCM GHASH function (NIST SP800-38D)
  728. config CRYPTO_HMAC
  729. tristate "HMAC (Keyed-Hash MAC)"
  730. select CRYPTO_HASH
  731. select CRYPTO_MANAGER
  732. help
  733. HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and
  734. RFC2104)
  735. This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
  736. config CRYPTO_MD4
  737. tristate "MD4"
  738. select CRYPTO_HASH
  739. help
  740. MD4 message digest algorithm (RFC1320)
  741. config CRYPTO_MD5
  742. tristate "MD5"
  743. select CRYPTO_HASH
  744. help
  745. MD5 message digest algorithm (RFC1321)
  746. config CRYPTO_MICHAEL_MIC
  747. tristate "Michael MIC"
  748. select CRYPTO_HASH
  749. help
  750. Michael MIC (Message Integrity Code) (IEEE 802.11i)
  751. Defined by the IEEE 802.11i TKIP (Temporal Key Integrity Protocol),
  752. known as WPA (Wif-Fi Protected Access).
  753. This algorithm is required for TKIP, but it should not be used for
  754. other purposes because of the weakness of the algorithm.
  755. config CRYPTO_POLYVAL
  756. tristate
  757. select CRYPTO_HASH
  758. select CRYPTO_LIB_GF128MUL
  759. help
  760. POLYVAL hash function for HCTR2
  761. This is used in HCTR2. It is not a general-purpose
  762. cryptographic hash function.
  763. config CRYPTO_POLY1305
  764. tristate "Poly1305"
  765. select CRYPTO_HASH
  766. select CRYPTO_LIB_POLY1305_GENERIC
  767. help
  768. Poly1305 authenticator algorithm (RFC7539)
  769. Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein.
  770. It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use
  771. in IETF protocols. This is the portable C implementation of Poly1305.
  772. config CRYPTO_RMD160
  773. tristate "RIPEMD-160"
  774. select CRYPTO_HASH
  775. help
  776. RIPEMD-160 hash function (ISO/IEC 10118-3)
  777. RIPEMD-160 is a 160-bit cryptographic hash function. It is intended
  778. to be used as a secure replacement for the 128-bit hash functions
  779. MD4, MD5 and its predecessor RIPEMD
  780. (not to be confused with RIPEMD-128).
  781. Its speed is comparable to SHA-1 and there are no known attacks
  782. against RIPEMD-160.
  783. Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
  784. See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
  785. for further information.
  786. config CRYPTO_SHA1
  787. tristate "SHA-1"
  788. select CRYPTO_HASH
  789. select CRYPTO_LIB_SHA1
  790. help
  791. SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3)
  792. config CRYPTO_SHA256
  793. tristate "SHA-224 and SHA-256"
  794. select CRYPTO_HASH
  795. select CRYPTO_LIB_SHA256
  796. help
  797. SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC 10118-3)
  798. This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP).
  799. Used by the btrfs filesystem, Ceph, NFS, and SMB.
  800. config CRYPTO_SHA512
  801. tristate "SHA-384 and SHA-512"
  802. select CRYPTO_HASH
  803. help
  804. SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC 10118-3)
  805. config CRYPTO_SHA3
  806. tristate "SHA-3"
  807. select CRYPTO_HASH
  808. help
  809. SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3)
  810. config CRYPTO_SM3
  811. tristate
  812. config CRYPTO_SM3_GENERIC
  813. tristate "SM3 (ShangMi 3)"
  814. select CRYPTO_HASH
  815. select CRYPTO_SM3
  816. help
  817. SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3)
  818. This is part of the Chinese Commercial Cryptography suite.
  819. References:
  820. http://www.oscca.gov.cn/UpFile/20101222141857786.pdf
  821. https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash
  822. config CRYPTO_STREEBOG
  823. tristate "Streebog"
  824. select CRYPTO_HASH
  825. help
  826. Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3)
  827. This is one of the Russian cryptographic standard algorithms (called
  828. GOST algorithms). This setting enables two hash algorithms with
  829. 256 and 512 bits output.
  830. References:
  831. https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf
  832. https://tools.ietf.org/html/rfc6986
  833. config CRYPTO_VMAC
  834. tristate "VMAC"
  835. select CRYPTO_HASH
  836. select CRYPTO_MANAGER
  837. help
  838. VMAC is a message authentication algorithm designed for
  839. very high speed on 64-bit architectures.
  840. See https://fastcrypto.org/vmac for further information.
  841. config CRYPTO_WP512
  842. tristate "Whirlpool"
  843. select CRYPTO_HASH
  844. help
  845. Whirlpool hash function (ISO/IEC 10118-3)
  846. 512, 384 and 256-bit hashes.
  847. Whirlpool-512 is part of the NESSIE cryptographic primitives.
  848. See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
  849. for further information.
  850. config CRYPTO_XCBC
  851. tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)"
  852. select CRYPTO_HASH
  853. select CRYPTO_MANAGER
  854. help
  855. XCBC-MAC (Extended Cipher Block Chaining Message Authentication
  856. Code) (RFC3566)
  857. config CRYPTO_XXHASH
  858. tristate "xxHash"
  859. select CRYPTO_HASH
  860. select XXHASH
  861. help
  862. xxHash non-cryptographic hash algorithm
  863. Extremely fast, working at speeds close to RAM limits.
  864. Used by the btrfs filesystem.
  865. endmenu
  866. menu "CRCs (cyclic redundancy checks)"
  867. config CRYPTO_CRC32C
  868. tristate "CRC32c"
  869. select CRYPTO_HASH
  870. select CRC32
  871. help
  872. CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
  873. A 32-bit CRC (cyclic redundancy check) with a polynomial defined
  874. by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic
  875. Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions
  876. on Communications, Vol. 41, No. 6, June 1993, selected for use with
  877. iSCSI.
  878. Used by btrfs, ext4, jbd2, NVMeoF/TCP, and iSCSI.
  879. config CRYPTO_CRC32
  880. tristate "CRC32"
  881. select CRYPTO_HASH
  882. select CRC32
  883. help
  884. CRC32 CRC algorithm (IEEE 802.3)
  885. Used by RoCEv2 and f2fs.
  886. config CRYPTO_CRCT10DIF
  887. tristate "CRCT10DIF"
  888. select CRYPTO_HASH
  889. help
  890. CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
  891. CRC algorithm used by the SCSI Block Commands standard.
  892. config CRYPTO_CRC64_ROCKSOFT
  893. tristate "CRC64 based on Rocksoft Model algorithm"
  894. depends on CRC64
  895. select CRYPTO_HASH
  896. help
  897. CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm
  898. Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY)
  899. See https://zlib.net/crc_v3.txt
  900. endmenu
  901. menu "Compression"
  902. config CRYPTO_DEFLATE
  903. tristate "Deflate"
  904. select CRYPTO_ALGAPI
  905. select CRYPTO_ACOMP2
  906. select ZLIB_INFLATE
  907. select ZLIB_DEFLATE
  908. help
  909. Deflate compression algorithm (RFC1951)
  910. Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394)
  911. config CRYPTO_LZO
  912. tristate "LZO"
  913. select CRYPTO_ALGAPI
  914. select CRYPTO_ACOMP2
  915. select LZO_COMPRESS
  916. select LZO_DECOMPRESS
  917. help
  918. LZO compression algorithm
  919. See https://www.oberhumer.com/opensource/lzo/ for further information.
  920. config CRYPTO_842
  921. tristate "842"
  922. select CRYPTO_ALGAPI
  923. select CRYPTO_ACOMP2
  924. select 842_COMPRESS
  925. select 842_DECOMPRESS
  926. help
  927. 842 compression algorithm by IBM
  928. See https://github.com/plauth/lib842 for further information.
  929. config CRYPTO_LZ4
  930. tristate "LZ4"
  931. select CRYPTO_ALGAPI
  932. select CRYPTO_ACOMP2
  933. select LZ4_COMPRESS
  934. select LZ4_DECOMPRESS
  935. help
  936. LZ4 compression algorithm
  937. See https://github.com/lz4/lz4 for further information.
  938. config CRYPTO_LZ4HC
  939. tristate "LZ4HC"
  940. select CRYPTO_ALGAPI
  941. select CRYPTO_ACOMP2
  942. select LZ4HC_COMPRESS
  943. select LZ4_DECOMPRESS
  944. help
  945. LZ4 high compression mode algorithm
  946. See https://github.com/lz4/lz4 for further information.
  947. config CRYPTO_ZSTD
  948. tristate "Zstd"
  949. select CRYPTO_ALGAPI
  950. select CRYPTO_ACOMP2
  951. select ZSTD_COMPRESS
  952. select ZSTD_DECOMPRESS
  953. help
  954. zstd compression algorithm
  955. See https://github.com/facebook/zstd for further information.
  956. endmenu
  957. menu "Random number generation"
  958. config CRYPTO_ANSI_CPRNG
  959. tristate "ANSI PRNG (Pseudo Random Number Generator)"
  960. select CRYPTO_AES
  961. select CRYPTO_RNG
  962. help
  963. Pseudo RNG (random number generator) (ANSI X9.31 Appendix A.2.4)
  964. This uses the AES cipher algorithm.
  965. Note that this option must be enabled if CRYPTO_FIPS is selected
  966. menuconfig CRYPTO_DRBG_MENU
  967. tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)"
  968. help
  969. DRBG (Deterministic Random Bit Generator) (NIST SP800-90A)
  970. In the following submenu, one or more of the DRBG types must be selected.
  971. if CRYPTO_DRBG_MENU
  972. config CRYPTO_DRBG_HMAC
  973. bool
  974. default y
  975. select CRYPTO_HMAC
  976. select CRYPTO_SHA512
  977. config CRYPTO_DRBG_HASH
  978. bool "Hash_DRBG"
  979. select CRYPTO_SHA256
  980. help
  981. Hash_DRBG variant as defined in NIST SP800-90A.
  982. This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms.
  983. config CRYPTO_DRBG_CTR
  984. bool "CTR_DRBG"
  985. select CRYPTO_AES
  986. select CRYPTO_CTR
  987. help
  988. CTR_DRBG variant as defined in NIST SP800-90A.
  989. This uses the AES cipher algorithm with the counter block mode.
  990. config CRYPTO_DRBG
  991. tristate
  992. default CRYPTO_DRBG_MENU
  993. select CRYPTO_RNG
  994. select CRYPTO_JITTERENTROPY
  995. endif # if CRYPTO_DRBG_MENU
  996. config CRYPTO_JITTERENTROPY
  997. tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)"
  998. select CRYPTO_RNG
  999. select CRYPTO_SHA3
  1000. help
  1001. CPU Jitter RNG (Random Number Generator) from the Jitterentropy library
  1002. A non-physical non-deterministic ("true") RNG (e.g., an entropy source
  1003. compliant with NIST SP800-90B) intended to provide a seed to a
  1004. deterministic RNG (e.g., per NIST SP800-90C).
  1005. This RNG does not perform any cryptographic whitening of the generated
  1006. random numbers.
  1007. See https://www.chronox.de/jent/
  1008. if CRYPTO_JITTERENTROPY
  1009. if CRYPTO_FIPS && EXPERT
  1010. choice
  1011. prompt "CPU Jitter RNG Memory Size"
  1012. default CRYPTO_JITTERENTROPY_MEMSIZE_2
  1013. help
  1014. The Jitter RNG measures the execution time of memory accesses.
  1015. Multiple consecutive memory accesses are performed. If the memory
  1016. size fits into a cache (e.g. L1), only the memory access timing
  1017. to that cache is measured. The closer the cache is to the CPU
  1018. the less variations are measured and thus the less entropy is
  1019. obtained. Thus, if the memory size fits into the L1 cache, the
  1020. obtained entropy is less than if the memory size fits within
  1021. L1 + L2, which in turn is less if the memory fits into
  1022. L1 + L2 + L3. Thus, by selecting a different memory size,
  1023. the entropy rate produced by the Jitter RNG can be modified.
  1024. config CRYPTO_JITTERENTROPY_MEMSIZE_2
  1025. bool "2048 Bytes (default)"
  1026. config CRYPTO_JITTERENTROPY_MEMSIZE_128
  1027. bool "128 kBytes"
  1028. config CRYPTO_JITTERENTROPY_MEMSIZE_1024
  1029. bool "1024 kBytes"
  1030. config CRYPTO_JITTERENTROPY_MEMSIZE_8192
  1031. bool "8192 kBytes"
  1032. endchoice
  1033. config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
  1034. int
  1035. default 64 if CRYPTO_JITTERENTROPY_MEMSIZE_2
  1036. default 512 if CRYPTO_JITTERENTROPY_MEMSIZE_128
  1037. default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
  1038. default 4096 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
  1039. config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
  1040. int
  1041. default 32 if CRYPTO_JITTERENTROPY_MEMSIZE_2
  1042. default 256 if CRYPTO_JITTERENTROPY_MEMSIZE_128
  1043. default 1024 if CRYPTO_JITTERENTROPY_MEMSIZE_1024
  1044. default 2048 if CRYPTO_JITTERENTROPY_MEMSIZE_8192
  1045. config CRYPTO_JITTERENTROPY_OSR
  1046. int "CPU Jitter RNG Oversampling Rate"
  1047. range 1 15
  1048. default 3
  1049. help
  1050. The Jitter RNG allows the specification of an oversampling rate (OSR).
  1051. The Jitter RNG operation requires a fixed amount of timing
  1052. measurements to produce one output block of random numbers. The
  1053. OSR value is multiplied with the amount of timing measurements to
  1054. generate one output block. Thus, the timing measurement is oversampled
  1055. by the OSR factor. The oversampling allows the Jitter RNG to operate
  1056. on hardware whose timers deliver limited amount of entropy (e.g.
  1057. the timer is coarse) by setting the OSR to a higher value. The
  1058. trade-off, however, is that the Jitter RNG now requires more time
  1059. to generate random numbers.
  1060. config CRYPTO_JITTERENTROPY_TESTINTERFACE
  1061. bool "CPU Jitter RNG Test Interface"
  1062. help
  1063. The test interface allows a privileged process to capture
  1064. the raw unconditioned high resolution time stamp noise that
  1065. is collected by the Jitter RNG for statistical analysis. As
  1066. this data is used at the same time to generate random bits,
  1067. the Jitter RNG operates in an insecure mode as long as the
  1068. recording is enabled. This interface therefore is only
  1069. intended for testing purposes and is not suitable for
  1070. production systems.
  1071. The raw noise data can be obtained using the jent_raw_hires
  1072. debugfs file. Using the option
  1073. jitterentropy_testing.boot_raw_hires_test=1 the raw noise of
  1074. the first 1000 entropy events since boot can be sampled.
  1075. If unsure, select N.
  1076. endif # if CRYPTO_FIPS && EXPERT
  1077. if !(CRYPTO_FIPS && EXPERT)
  1078. config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
  1079. int
  1080. default 64
  1081. config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
  1082. int
  1083. default 32
  1084. config CRYPTO_JITTERENTROPY_OSR
  1085. int
  1086. default 1
  1087. config CRYPTO_JITTERENTROPY_TESTINTERFACE
  1088. bool
  1089. endif # if !(CRYPTO_FIPS && EXPERT)
  1090. endif # if CRYPTO_JITTERENTROPY
  1091. config CRYPTO_KDF800108_CTR
  1092. tristate
  1093. select CRYPTO_HMAC
  1094. select CRYPTO_SHA256
  1095. endmenu
  1096. menu "Userspace interface"
  1097. config CRYPTO_USER_API
  1098. tristate
  1099. config CRYPTO_USER_API_HASH
  1100. tristate "Hash algorithms"
  1101. depends on NET
  1102. select CRYPTO_HASH
  1103. select CRYPTO_USER_API
  1104. help
  1105. Enable the userspace interface for hash algorithms.
  1106. See Documentation/crypto/userspace-if.rst and
  1107. https://www.chronox.de/libkcapi/html/index.html
  1108. config CRYPTO_USER_API_SKCIPHER
  1109. tristate "Symmetric key cipher algorithms"
  1110. depends on NET
  1111. select CRYPTO_SKCIPHER
  1112. select CRYPTO_USER_API
  1113. help
  1114. Enable the userspace interface for symmetric key cipher algorithms.
  1115. See Documentation/crypto/userspace-if.rst and
  1116. https://www.chronox.de/libkcapi/html/index.html
  1117. config CRYPTO_USER_API_RNG
  1118. tristate "RNG (random number generator) algorithms"
  1119. depends on NET
  1120. select CRYPTO_RNG
  1121. select CRYPTO_USER_API
  1122. help
  1123. Enable the userspace interface for RNG (random number generator)
  1124. algorithms.
  1125. See Documentation/crypto/userspace-if.rst and
  1126. https://www.chronox.de/libkcapi/html/index.html
  1127. config CRYPTO_USER_API_RNG_CAVP
  1128. bool "Enable CAVP testing of DRBG"
  1129. depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG
  1130. help
  1131. Enable extra APIs in the userspace interface for NIST CAVP
  1132. (Cryptographic Algorithm Validation Program) testing:
  1133. - resetting DRBG entropy
  1134. - providing Additional Data
  1135. This should only be enabled for CAVP testing. You should say
  1136. no unless you know what this is.
  1137. config CRYPTO_USER_API_AEAD
  1138. tristate "AEAD cipher algorithms"
  1139. depends on NET
  1140. select CRYPTO_AEAD
  1141. select CRYPTO_SKCIPHER
  1142. select CRYPTO_NULL
  1143. select CRYPTO_USER_API
  1144. help
  1145. Enable the userspace interface for AEAD cipher algorithms.
  1146. See Documentation/crypto/userspace-if.rst and
  1147. https://www.chronox.de/libkcapi/html/index.html
  1148. config CRYPTO_USER_API_ENABLE_OBSOLETE
  1149. bool "Obsolete cryptographic algorithms"
  1150. depends on CRYPTO_USER_API
  1151. default y
  1152. help
  1153. Allow obsolete cryptographic algorithms to be selected that have
  1154. already been phased out from internal use by the kernel, and are
  1155. only useful for userspace clients that still rely on them.
  1156. endmenu
  1157. config CRYPTO_HASH_INFO
  1158. bool
  1159. if !KMSAN # avoid false positives from assembly
  1160. if ARM
  1161. source "arch/arm/crypto/Kconfig"
  1162. endif
  1163. if ARM64
  1164. source "arch/arm64/crypto/Kconfig"
  1165. endif
  1166. if LOONGARCH
  1167. source "arch/loongarch/crypto/Kconfig"
  1168. endif
  1169. if MIPS
  1170. source "arch/mips/crypto/Kconfig"
  1171. endif
  1172. if PPC
  1173. source "arch/powerpc/crypto/Kconfig"
  1174. endif
  1175. if RISCV
  1176. source "arch/riscv/crypto/Kconfig"
  1177. endif
  1178. if S390
  1179. source "arch/s390/crypto/Kconfig"
  1180. endif
  1181. if SPARC
  1182. source "arch/sparc/crypto/Kconfig"
  1183. endif
  1184. if X86
  1185. source "arch/x86/crypto/Kconfig"
  1186. endif
  1187. endif
  1188. source "drivers/crypto/Kconfig"
  1189. source "crypto/asymmetric_keys/Kconfig"
  1190. source "certs/Kconfig"
  1191. endif # if CRYPTO