Kconfig 39 KB

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