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