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