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