Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "Accelerated Cryptographic Algorithms for CPU (x86)"
  3. config CRYPTO_CURVE25519_X86
  4. tristate "Public key crypto: Curve25519 (ADX)"
  5. depends on X86 && 64BIT
  6. select CRYPTO_LIB_CURVE25519_GENERIC
  7. select CRYPTO_ARCH_HAVE_LIB_CURVE25519
  8. help
  9. Curve25519 algorithm
  10. Architecture: x86_64 using:
  11. - ADX (large integer arithmetic)
  12. config CRYPTO_AES_NI_INTEL
  13. tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XCTR, XTS, GCM (AES-NI/VAES)"
  14. depends on X86
  15. select CRYPTO_AEAD
  16. select CRYPTO_LIB_AES
  17. select CRYPTO_LIB_GF128MUL
  18. select CRYPTO_ALGAPI
  19. select CRYPTO_SKCIPHER
  20. select CRYPTO_SIMD
  21. help
  22. Block cipher: AES cipher algorithms
  23. AEAD cipher: AES with GCM
  24. Length-preserving ciphers: AES with ECB, CBC, CTS, CTR, XCTR, XTS
  25. Architecture: x86 (32-bit and 64-bit) using:
  26. - AES-NI (AES new instructions)
  27. - VAES (Vector AES)
  28. Some algorithm implementations are supported only in 64-bit builds,
  29. and some have additional prerequisites such as AVX2 or AVX512.
  30. config CRYPTO_BLOWFISH_X86_64
  31. tristate "Ciphers: Blowfish, modes: ECB, CBC"
  32. depends on X86 && 64BIT
  33. select CRYPTO_SKCIPHER
  34. select CRYPTO_BLOWFISH_COMMON
  35. imply CRYPTO_CTR
  36. help
  37. Block cipher: Blowfish cipher algorithm
  38. Length-preserving ciphers: Blowfish with ECB and CBC modes
  39. Architecture: x86_64
  40. config CRYPTO_CAMELLIA_X86_64
  41. tristate "Ciphers: Camellia with modes: ECB, CBC"
  42. depends on X86 && 64BIT
  43. select CRYPTO_SKCIPHER
  44. imply CRYPTO_CTR
  45. help
  46. Block cipher: Camellia cipher algorithms
  47. Length-preserving ciphers: Camellia with ECB and CBC modes
  48. Architecture: x86_64
  49. config CRYPTO_CAMELLIA_AESNI_AVX_X86_64
  50. tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX)"
  51. depends on X86 && 64BIT
  52. select CRYPTO_SKCIPHER
  53. select CRYPTO_CAMELLIA_X86_64
  54. select CRYPTO_SIMD
  55. imply CRYPTO_XTS
  56. help
  57. Length-preserving ciphers: Camellia with ECB and CBC modes
  58. Architecture: x86_64 using:
  59. - AES-NI (AES New Instructions)
  60. - AVX (Advanced Vector Extensions)
  61. config CRYPTO_CAMELLIA_AESNI_AVX2_X86_64
  62. tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX2)"
  63. depends on X86 && 64BIT
  64. select CRYPTO_CAMELLIA_AESNI_AVX_X86_64
  65. help
  66. Length-preserving ciphers: Camellia with ECB and CBC modes
  67. Architecture: x86_64 using:
  68. - AES-NI (AES New Instructions)
  69. - AVX2 (Advanced Vector Extensions 2)
  70. config CRYPTO_CAST5_AVX_X86_64
  71. tristate "Ciphers: CAST5 with modes: ECB, CBC (AVX)"
  72. depends on X86 && 64BIT
  73. select CRYPTO_SKCIPHER
  74. select CRYPTO_CAST5
  75. select CRYPTO_CAST_COMMON
  76. select CRYPTO_SIMD
  77. imply CRYPTO_CTR
  78. help
  79. Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm
  80. (RFC2144) with ECB and CBC modes
  81. Architecture: x86_64 using:
  82. - AVX (Advanced Vector Extensions)
  83. Processes 16 blocks in parallel.
  84. config CRYPTO_CAST6_AVX_X86_64
  85. tristate "Ciphers: CAST6 with modes: ECB, CBC (AVX)"
  86. depends on X86 && 64BIT
  87. select CRYPTO_SKCIPHER
  88. select CRYPTO_CAST6
  89. select CRYPTO_CAST_COMMON
  90. select CRYPTO_SIMD
  91. imply CRYPTO_XTS
  92. imply CRYPTO_CTR
  93. help
  94. Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm
  95. (RFC2612) with ECB and CBC modes
  96. Architecture: x86_64 using:
  97. - AVX (Advanced Vector Extensions)
  98. Processes eight blocks in parallel.
  99. config CRYPTO_DES3_EDE_X86_64
  100. tristate "Ciphers: Triple DES EDE with modes: ECB, CBC"
  101. depends on X86 && 64BIT
  102. select CRYPTO_SKCIPHER
  103. select CRYPTO_LIB_DES
  104. imply CRYPTO_CTR
  105. help
  106. Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
  107. Length-preserving ciphers: Triple DES EDE with ECB and CBC modes
  108. Architecture: x86_64
  109. Processes one or three blocks in parallel.
  110. config CRYPTO_SERPENT_SSE2_X86_64
  111. tristate "Ciphers: Serpent with modes: ECB, CBC (SSE2)"
  112. depends on X86 && 64BIT
  113. select CRYPTO_SKCIPHER
  114. select CRYPTO_SERPENT
  115. select CRYPTO_SIMD
  116. imply CRYPTO_CTR
  117. help
  118. Length-preserving ciphers: Serpent cipher algorithm
  119. with ECB and CBC modes
  120. Architecture: x86_64 using:
  121. - SSE2 (Streaming SIMD Extensions 2)
  122. Processes eight blocks in parallel.
  123. config CRYPTO_SERPENT_SSE2_586
  124. tristate "Ciphers: Serpent with modes: ECB, CBC (32-bit with SSE2)"
  125. depends on X86 && !64BIT
  126. select CRYPTO_SKCIPHER
  127. select CRYPTO_SERPENT
  128. select CRYPTO_SIMD
  129. imply CRYPTO_CTR
  130. help
  131. Length-preserving ciphers: Serpent cipher algorithm
  132. with ECB and CBC modes
  133. Architecture: x86 (32-bit) using:
  134. - SSE2 (Streaming SIMD Extensions 2)
  135. Processes four blocks in parallel.
  136. config CRYPTO_SERPENT_AVX_X86_64
  137. tristate "Ciphers: Serpent with modes: ECB, CBC (AVX)"
  138. depends on X86 && 64BIT
  139. select CRYPTO_SKCIPHER
  140. select CRYPTO_SERPENT
  141. select CRYPTO_SIMD
  142. imply CRYPTO_XTS
  143. imply CRYPTO_CTR
  144. help
  145. Length-preserving ciphers: Serpent cipher algorithm
  146. with ECB and CBC modes
  147. Architecture: x86_64 using:
  148. - AVX (Advanced Vector Extensions)
  149. Processes eight blocks in parallel.
  150. config CRYPTO_SERPENT_AVX2_X86_64
  151. tristate "Ciphers: Serpent with modes: ECB, CBC (AVX2)"
  152. depends on X86 && 64BIT
  153. select CRYPTO_SERPENT_AVX_X86_64
  154. help
  155. Length-preserving ciphers: Serpent cipher algorithm
  156. with ECB and CBC modes
  157. Architecture: x86_64 using:
  158. - AVX2 (Advanced Vector Extensions 2)
  159. Processes 16 blocks in parallel.
  160. config CRYPTO_SM4_AESNI_AVX_X86_64
  161. tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX)"
  162. depends on X86 && 64BIT
  163. select CRYPTO_SKCIPHER
  164. select CRYPTO_SIMD
  165. select CRYPTO_ALGAPI
  166. select CRYPTO_SM4
  167. help
  168. Length-preserving ciphers: SM4 cipher algorithms
  169. (OSCCA GB/T 32907-2016) with ECB, CBC, and CTR modes
  170. Architecture: x86_64 using:
  171. - AES-NI (AES New Instructions)
  172. - AVX (Advanced Vector Extensions)
  173. Through two affine transforms,
  174. we can use the AES S-Box to simulate the SM4 S-Box to achieve the
  175. effect of instruction acceleration.
  176. If unsure, say N.
  177. config CRYPTO_SM4_AESNI_AVX2_X86_64
  178. tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX2)"
  179. depends on X86 && 64BIT
  180. select CRYPTO_SKCIPHER
  181. select CRYPTO_SIMD
  182. select CRYPTO_ALGAPI
  183. select CRYPTO_SM4
  184. select CRYPTO_SM4_AESNI_AVX_X86_64
  185. help
  186. Length-preserving ciphers: SM4 cipher algorithms
  187. (OSCCA GB/T 32907-2016) with ECB, CBC, and CTR modes
  188. Architecture: x86_64 using:
  189. - AES-NI (AES New Instructions)
  190. - AVX2 (Advanced Vector Extensions 2)
  191. Through two affine transforms,
  192. we can use the AES S-Box to simulate the SM4 S-Box to achieve the
  193. effect of instruction acceleration.
  194. If unsure, say N.
  195. config CRYPTO_TWOFISH_586
  196. tristate "Ciphers: Twofish (32-bit)"
  197. depends on (X86 || UML_X86) && !64BIT
  198. select CRYPTO_ALGAPI
  199. select CRYPTO_TWOFISH_COMMON
  200. imply CRYPTO_CTR
  201. help
  202. Block cipher: Twofish cipher algorithm
  203. Architecture: x86 (32-bit)
  204. config CRYPTO_TWOFISH_X86_64
  205. tristate "Ciphers: Twofish"
  206. depends on (X86 || UML_X86) && 64BIT
  207. select CRYPTO_ALGAPI
  208. select CRYPTO_TWOFISH_COMMON
  209. imply CRYPTO_CTR
  210. help
  211. Block cipher: Twofish cipher algorithm
  212. Architecture: x86_64
  213. config CRYPTO_TWOFISH_X86_64_3WAY
  214. tristate "Ciphers: Twofish with modes: ECB, CBC (3-way parallel)"
  215. depends on X86 && 64BIT
  216. select CRYPTO_SKCIPHER
  217. select CRYPTO_TWOFISH_COMMON
  218. select CRYPTO_TWOFISH_X86_64
  219. help
  220. Length-preserving cipher: Twofish cipher algorithm
  221. with ECB and CBC modes
  222. Architecture: x86_64
  223. Processes three blocks in parallel, better utilizing resources of
  224. out-of-order CPUs.
  225. config CRYPTO_TWOFISH_AVX_X86_64
  226. tristate "Ciphers: Twofish with modes: ECB, CBC (AVX)"
  227. depends on X86 && 64BIT
  228. select CRYPTO_SKCIPHER
  229. select CRYPTO_SIMD
  230. select CRYPTO_TWOFISH_COMMON
  231. select CRYPTO_TWOFISH_X86_64
  232. select CRYPTO_TWOFISH_X86_64_3WAY
  233. imply CRYPTO_XTS
  234. help
  235. Length-preserving cipher: Twofish cipher algorithm
  236. with ECB and CBC modes
  237. Architecture: x86_64 using:
  238. - AVX (Advanced Vector Extensions)
  239. Processes eight blocks in parallel.
  240. config CRYPTO_ARIA_AESNI_AVX_X86_64
  241. tristate "Ciphers: ARIA with modes: ECB, CTR (AES-NI/AVX/GFNI)"
  242. depends on X86 && 64BIT
  243. select CRYPTO_SKCIPHER
  244. select CRYPTO_SIMD
  245. select CRYPTO_ALGAPI
  246. select CRYPTO_ARIA
  247. help
  248. Length-preserving cipher: ARIA cipher algorithms
  249. (RFC 5794) with ECB and CTR modes
  250. Architecture: x86_64 using:
  251. - AES-NI (AES New Instructions)
  252. - AVX (Advanced Vector Extensions)
  253. - GFNI (Galois Field New Instructions)
  254. Processes 16 blocks in parallel.
  255. config CRYPTO_ARIA_AESNI_AVX2_X86_64
  256. tristate "Ciphers: ARIA with modes: ECB, CTR (AES-NI/AVX2/GFNI)"
  257. depends on X86 && 64BIT
  258. select CRYPTO_SKCIPHER
  259. select CRYPTO_SIMD
  260. select CRYPTO_ALGAPI
  261. select CRYPTO_ARIA
  262. select CRYPTO_ARIA_AESNI_AVX_X86_64
  263. help
  264. Length-preserving cipher: ARIA cipher algorithms
  265. (RFC 5794) with ECB and CTR modes
  266. Architecture: x86_64 using:
  267. - AES-NI (AES New Instructions)
  268. - AVX2 (Advanced Vector Extensions)
  269. - GFNI (Galois Field New Instructions)
  270. Processes 32 blocks in parallel.
  271. config CRYPTO_ARIA_GFNI_AVX512_X86_64
  272. tristate "Ciphers: ARIA with modes: ECB, CTR (AVX512/GFNI)"
  273. depends on X86 && 64BIT && AS_AVX512 && AS_GFNI
  274. select CRYPTO_SKCIPHER
  275. select CRYPTO_SIMD
  276. select CRYPTO_ALGAPI
  277. select CRYPTO_ARIA
  278. select CRYPTO_ARIA_AESNI_AVX_X86_64
  279. select CRYPTO_ARIA_AESNI_AVX2_X86_64
  280. help
  281. Length-preserving cipher: ARIA cipher algorithms
  282. (RFC 5794) with ECB and CTR modes
  283. Architecture: x86_64 using:
  284. - AVX512 (Advanced Vector Extensions)
  285. - GFNI (Galois Field New Instructions)
  286. Processes 64 blocks in parallel.
  287. config CRYPTO_CHACHA20_X86_64
  288. tristate "Ciphers: ChaCha20, XChaCha20, XChaCha12 (SSSE3/AVX2/AVX-512VL)"
  289. depends on X86 && 64BIT
  290. select CRYPTO_SKCIPHER
  291. select CRYPTO_LIB_CHACHA_GENERIC
  292. select CRYPTO_ARCH_HAVE_LIB_CHACHA
  293. help
  294. Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
  295. stream cipher algorithms
  296. Architecture: x86_64 using:
  297. - SSSE3 (Supplemental SSE3)
  298. - AVX2 (Advanced Vector Extensions 2)
  299. - AVX-512VL (Advanced Vector Extensions-512VL)
  300. config CRYPTO_AEGIS128_AESNI_SSE2
  301. tristate "AEAD ciphers: AEGIS-128 (AES-NI/SSE2)"
  302. depends on X86 && 64BIT
  303. select CRYPTO_AEAD
  304. select CRYPTO_SIMD
  305. help
  306. AEGIS-128 AEAD algorithm
  307. Architecture: x86_64 using:
  308. - AES-NI (AES New Instructions)
  309. - SSE2 (Streaming SIMD Extensions 2)
  310. config CRYPTO_NHPOLY1305_SSE2
  311. tristate "Hash functions: NHPoly1305 (SSE2)"
  312. depends on X86 && 64BIT
  313. select CRYPTO_NHPOLY1305
  314. help
  315. NHPoly1305 hash function for Adiantum
  316. Architecture: x86_64 using:
  317. - SSE2 (Streaming SIMD Extensions 2)
  318. config CRYPTO_NHPOLY1305_AVX2
  319. tristate "Hash functions: NHPoly1305 (AVX2)"
  320. depends on X86 && 64BIT
  321. select CRYPTO_NHPOLY1305
  322. help
  323. NHPoly1305 hash function for Adiantum
  324. Architecture: x86_64 using:
  325. - AVX2 (Advanced Vector Extensions 2)
  326. config CRYPTO_BLAKE2S_X86
  327. bool "Hash functions: BLAKE2s (SSSE3/AVX-512)"
  328. depends on X86 && 64BIT
  329. select CRYPTO_LIB_BLAKE2S_GENERIC
  330. select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
  331. help
  332. BLAKE2s cryptographic hash function (RFC 7693)
  333. Architecture: x86_64 using:
  334. - SSSE3 (Supplemental SSE3)
  335. - AVX-512 (Advanced Vector Extensions-512)
  336. config CRYPTO_POLYVAL_CLMUL_NI
  337. tristate "Hash functions: POLYVAL (CLMUL-NI)"
  338. depends on X86 && 64BIT
  339. select CRYPTO_POLYVAL
  340. help
  341. POLYVAL hash function for HCTR2
  342. Architecture: x86_64 using:
  343. - CLMUL-NI (carry-less multiplication new instructions)
  344. config CRYPTO_POLY1305_X86_64
  345. tristate "Hash functions: Poly1305 (SSE2/AVX2)"
  346. depends on X86 && 64BIT
  347. select CRYPTO_LIB_POLY1305_GENERIC
  348. select CRYPTO_ARCH_HAVE_LIB_POLY1305
  349. help
  350. Poly1305 authenticator algorithm (RFC7539)
  351. Architecture: x86_64 using:
  352. - SSE2 (Streaming SIMD Extensions 2)
  353. - AVX2 (Advanced Vector Extensions 2)
  354. config CRYPTO_SHA1_SSSE3
  355. tristate "Hash functions: SHA-1 (SSSE3/AVX/AVX2/SHA-NI)"
  356. depends on X86 && 64BIT
  357. select CRYPTO_SHA1
  358. select CRYPTO_HASH
  359. help
  360. SHA-1 secure hash algorithm (FIPS 180)
  361. Architecture: x86_64 using:
  362. - SSSE3 (Supplemental SSE3)
  363. - AVX (Advanced Vector Extensions)
  364. - AVX2 (Advanced Vector Extensions 2)
  365. - SHA-NI (SHA Extensions New Instructions)
  366. config CRYPTO_SHA256_SSSE3
  367. tristate "Hash functions: SHA-224 and SHA-256 (SSSE3/AVX/AVX2/SHA-NI)"
  368. depends on X86 && 64BIT
  369. select CRYPTO_SHA256
  370. select CRYPTO_HASH
  371. help
  372. SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
  373. Architecture: x86_64 using:
  374. - SSSE3 (Supplemental SSE3)
  375. - AVX (Advanced Vector Extensions)
  376. - AVX2 (Advanced Vector Extensions 2)
  377. - SHA-NI (SHA Extensions New Instructions)
  378. config CRYPTO_SHA512_SSSE3
  379. tristate "Hash functions: SHA-384 and SHA-512 (SSSE3/AVX/AVX2)"
  380. depends on X86 && 64BIT
  381. select CRYPTO_SHA512
  382. select CRYPTO_HASH
  383. help
  384. SHA-384 and SHA-512 secure hash algorithms (FIPS 180)
  385. Architecture: x86_64 using:
  386. - SSSE3 (Supplemental SSE3)
  387. - AVX (Advanced Vector Extensions)
  388. - AVX2 (Advanced Vector Extensions 2)
  389. config CRYPTO_SM3_AVX_X86_64
  390. tristate "Hash functions: SM3 (AVX)"
  391. depends on X86 && 64BIT
  392. select CRYPTO_HASH
  393. select CRYPTO_SM3
  394. help
  395. SM3 secure hash function as defined by OSCCA GM/T 0004-2012 SM3
  396. Architecture: x86_64 using:
  397. - AVX (Advanced Vector Extensions)
  398. If unsure, say N.
  399. config CRYPTO_GHASH_CLMUL_NI_INTEL
  400. tristate "Hash functions: GHASH (CLMUL-NI)"
  401. depends on X86 && 64BIT
  402. select CRYPTO_CRYPTD
  403. help
  404. GCM GHASH hash function (NIST SP800-38D)
  405. Architecture: x86_64 using:
  406. - CLMUL-NI (carry-less multiplication new instructions)
  407. config CRYPTO_CRC32C_INTEL
  408. tristate "CRC32c (SSE4.2/PCLMULQDQ)"
  409. depends on X86
  410. select CRYPTO_HASH
  411. help
  412. CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
  413. Architecture: x86 (32-bit and 64-bit) using:
  414. - SSE4.2 (Streaming SIMD Extensions 4.2) CRC32 instruction
  415. - PCLMULQDQ (carry-less multiplication)
  416. config CRYPTO_CRC32_PCLMUL
  417. tristate "CRC32 (PCLMULQDQ)"
  418. depends on X86
  419. select CRYPTO_HASH
  420. select CRC32
  421. help
  422. CRC32 CRC algorithm (IEEE 802.3)
  423. Architecture: x86 (32-bit and 64-bit) using:
  424. - PCLMULQDQ (carry-less multiplication)
  425. config CRYPTO_CRCT10DIF_PCLMUL
  426. tristate "CRCT10DIF (PCLMULQDQ)"
  427. depends on X86 && 64BIT && CRC_T10DIF
  428. select CRYPTO_HASH
  429. help
  430. CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
  431. Architecture: x86_64 using:
  432. - PCLMULQDQ (carry-less multiplication)
  433. endmenu