Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Ard Biesheuvel | 2c98833 | 2014-03-06 16:23:33 +0800 | [diff] [blame] | 2 | |
| 3 | menuconfig ARM64_CRYPTO |
| 4 | bool "ARM64 Accelerated Cryptographic Algorithms" |
| 5 | depends on ARM64 |
| 6 | help |
| 7 | Say Y here to choose from a selection of cryptographic algorithms |
| 8 | implemented using ARM64 specific CPU features or instructions. |
| 9 | |
| 10 | if ARM64_CRYPTO |
| 11 | |
Ard Biesheuvel | 7918ece | 2016-11-20 11:42:01 +0000 | [diff] [blame] | 12 | config CRYPTO_SHA256_ARM64 |
| 13 | tristate "SHA-224/SHA-256 digest algorithm for arm64" |
| 14 | select CRYPTO_HASH |
| 15 | |
| 16 | config CRYPTO_SHA512_ARM64 |
| 17 | tristate "SHA-384/SHA-512 digest algorithm for arm64" |
| 18 | select CRYPTO_HASH |
| 19 | |
Ard Biesheuvel | 2c98833 | 2014-03-06 16:23:33 +0800 | [diff] [blame] | 20 | config CRYPTO_SHA1_ARM64_CE |
| 21 | tristate "SHA-1 digest algorithm (ARMv8 Crypto Extensions)" |
Ard Biesheuvel | 0771f32 | 2017-07-24 11:28:08 +0100 | [diff] [blame] | 22 | depends on KERNEL_MODE_NEON |
Ard Biesheuvel | 2c98833 | 2014-03-06 16:23:33 +0800 | [diff] [blame] | 23 | select CRYPTO_HASH |
Ard Biesheuvel | 0771f32 | 2017-07-24 11:28:08 +0100 | [diff] [blame] | 24 | select CRYPTO_SHA1 |
Ard Biesheuvel | 2c98833 | 2014-03-06 16:23:33 +0800 | [diff] [blame] | 25 | |
Ard Biesheuvel | 6ba6c74 | 2014-03-20 15:35:40 +0100 | [diff] [blame] | 26 | config CRYPTO_SHA2_ARM64_CE |
| 27 | tristate "SHA-224/SHA-256 digest algorithm (ARMv8 Crypto Extensions)" |
Ard Biesheuvel | da17933 | 2017-07-24 11:28:09 +0100 | [diff] [blame] | 28 | depends on KERNEL_MODE_NEON |
Ard Biesheuvel | 6ba6c74 | 2014-03-20 15:35:40 +0100 | [diff] [blame] | 29 | select CRYPTO_HASH |
Ard Biesheuvel | da17933 | 2017-07-24 11:28:09 +0100 | [diff] [blame] | 30 | select CRYPTO_SHA256_ARM64 |
Ard Biesheuvel | 6ba6c74 | 2014-03-20 15:35:40 +0100 | [diff] [blame] | 31 | |
Ard Biesheuvel | bb6c8c4 | 2018-01-09 18:23:02 +0000 | [diff] [blame] | 32 | config CRYPTO_SHA512_ARM64_CE |
| 33 | tristate "SHA-384/SHA-512 digest algorithm (ARMv8 Crypto Extensions)" |
| 34 | depends on KERNEL_MODE_NEON |
| 35 | select CRYPTO_HASH |
| 36 | select CRYPTO_SHA512_ARM64 |
| 37 | |
Ard Biesheuvel | 15d5910 | 2018-01-19 12:04:38 +0000 | [diff] [blame] | 38 | config CRYPTO_SHA3_ARM64 |
| 39 | tristate "SHA3 digest algorithm (ARMv8.2 Crypto Extensions)" |
| 40 | depends on KERNEL_MODE_NEON |
| 41 | select CRYPTO_HASH |
| 42 | select CRYPTO_SHA3 |
| 43 | |
Ard Biesheuvel | 140aa50 | 2018-01-19 12:04:39 +0000 | [diff] [blame] | 44 | config CRYPTO_SM3_ARM64_CE |
| 45 | tristate "SM3 digest algorithm (ARMv8.2 Crypto Extensions)" |
| 46 | depends on KERNEL_MODE_NEON |
| 47 | select CRYPTO_HASH |
| 48 | select CRYPTO_SM3 |
| 49 | |
Ard Biesheuvel | e99ce92 | 2018-04-25 14:20:46 +0200 | [diff] [blame] | 50 | config CRYPTO_SM4_ARM64_CE |
| 51 | tristate "SM4 symmetric cipher (ARMv8.2 Crypto Extensions)" |
| 52 | depends on KERNEL_MODE_NEON |
| 53 | select CRYPTO_ALGAPI |
Tianjia Zhang | c59de48 | 2021-07-20 11:46:40 +0800 | [diff] [blame] | 54 | select CRYPTO_LIB_SM4 |
Ard Biesheuvel | e99ce92 | 2018-04-25 14:20:46 +0200 | [diff] [blame] | 55 | |
Ard Biesheuvel | fdd2389 | 2014-03-26 20:53:05 +0100 | [diff] [blame] | 56 | config CRYPTO_GHASH_ARM64_CE |
Ard Biesheuvel | 537c144 | 2017-07-24 11:28:16 +0100 | [diff] [blame] | 57 | tristate "GHASH/AES-GCM using ARMv8 Crypto Extensions" |
Ard Biesheuvel | 6d6254d | 2017-07-24 11:28:05 +0100 | [diff] [blame] | 58 | depends on KERNEL_MODE_NEON |
Ard Biesheuvel | fdd2389 | 2014-03-26 20:53:05 +0100 | [diff] [blame] | 59 | select CRYPTO_HASH |
Ard Biesheuvel | 6d6254d | 2017-07-24 11:28:05 +0100 | [diff] [blame] | 60 | select CRYPTO_GF128MUL |
Ard Biesheuvel | fe3b99b | 2019-07-02 21:41:28 +0200 | [diff] [blame] | 61 | select CRYPTO_LIB_AES |
Ard Biesheuvel | fdd2389 | 2014-03-26 20:53:05 +0100 | [diff] [blame] | 62 | |
Ard Biesheuvel | 6ef5737 | 2016-12-05 18:42:25 +0000 | [diff] [blame] | 63 | config CRYPTO_CRCT10DIF_ARM64_CE |
| 64 | tristate "CRCT10DIF digest algorithm using PMULL instructions" |
| 65 | depends on KERNEL_MODE_NEON && CRC_T10DIF |
| 66 | select CRYPTO_HASH |
| 67 | |
Ard Biesheuvel | bed593c | 2017-01-11 16:41:52 +0000 | [diff] [blame] | 68 | config CRYPTO_AES_ARM64 |
| 69 | tristate "AES core cipher using scalar instructions" |
| 70 | select CRYPTO_AES |
| 71 | |
Ard Biesheuvel | 317f2f7 | 2014-02-05 18:13:38 +0100 | [diff] [blame] | 72 | config CRYPTO_AES_ARM64_CE |
| 73 | tristate "AES core cipher using ARMv8 Crypto Extensions" |
| 74 | depends on ARM64 && KERNEL_MODE_NEON |
| 75 | select CRYPTO_ALGAPI |
Ard Biesheuvel | 4d3f9d8 | 2019-07-02 21:41:36 +0200 | [diff] [blame] | 76 | select CRYPTO_LIB_AES |
Ard Biesheuvel | 317f2f7 | 2014-02-05 18:13:38 +0100 | [diff] [blame] | 77 | |
Ard Biesheuvel | a3fd821 | 2014-02-10 11:26:29 +0100 | [diff] [blame] | 78 | config CRYPTO_AES_ARM64_CE_CCM |
| 79 | tristate "AES in CCM mode using ARMv8 Crypto Extensions" |
| 80 | depends on ARM64 && KERNEL_MODE_NEON |
| 81 | select CRYPTO_ALGAPI |
Ard Biesheuvel | 12ac3ef | 2014-11-03 16:50:01 +0000 | [diff] [blame] | 82 | select CRYPTO_AES_ARM64_CE |
Ard Biesheuvel | a3fd821 | 2014-02-10 11:26:29 +0100 | [diff] [blame] | 83 | select CRYPTO_AEAD |
Ard Biesheuvel | c59a6df | 2019-07-02 21:41:30 +0200 | [diff] [blame] | 84 | select CRYPTO_LIB_AES |
Ard Biesheuvel | a3fd821 | 2014-02-10 11:26:29 +0100 | [diff] [blame] | 85 | |
Ard Biesheuvel | 49788fe | 2014-03-21 10:19:17 +0100 | [diff] [blame] | 86 | config CRYPTO_AES_ARM64_CE_BLK |
| 87 | tristate "AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions" |
Ard Biesheuvel | e211506 | 2017-07-24 11:28:13 +0100 | [diff] [blame] | 88 | depends on KERNEL_MODE_NEON |
Eric Biggers | b95bba5 | 2019-10-25 12:41:13 -0700 | [diff] [blame] | 89 | select CRYPTO_SKCIPHER |
Ard Biesheuvel | 12ac3ef | 2014-11-03 16:50:01 +0000 | [diff] [blame] | 90 | select CRYPTO_AES_ARM64_CE |
Ard Biesheuvel | 49788fe | 2014-03-21 10:19:17 +0100 | [diff] [blame] | 91 | |
| 92 | config CRYPTO_AES_ARM64_NEON_BLK |
| 93 | tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions" |
Ard Biesheuvel | e211506 | 2017-07-24 11:28:13 +0100 | [diff] [blame] | 94 | depends on KERNEL_MODE_NEON |
Eric Biggers | b95bba5 | 2019-10-25 12:41:13 -0700 | [diff] [blame] | 95 | select CRYPTO_SKCIPHER |
Ard Biesheuvel | c184472 | 2019-07-02 21:41:32 +0200 | [diff] [blame] | 96 | select CRYPTO_LIB_AES |
Ard Biesheuvel | 49788fe | 2014-03-21 10:19:17 +0100 | [diff] [blame] | 97 | |
Ard Biesheuvel | b7171ce | 2017-01-11 16:41:49 +0000 | [diff] [blame] | 98 | config CRYPTO_CHACHA20_NEON |
Eric Biggers | 19c11c9 | 2018-12-03 19:52:52 -0800 | [diff] [blame] | 99 | tristate "ChaCha20, XChaCha20, and XChaCha12 stream ciphers using NEON instructions" |
Ard Biesheuvel | b7171ce | 2017-01-11 16:41:49 +0000 | [diff] [blame] | 100 | depends on KERNEL_MODE_NEON |
Eric Biggers | b95bba5 | 2019-10-25 12:41:13 -0700 | [diff] [blame] | 101 | select CRYPTO_SKCIPHER |
Ard Biesheuvel | c77da48 | 2019-11-08 13:22:11 +0100 | [diff] [blame] | 102 | select CRYPTO_LIB_CHACHA_GENERIC |
Ard Biesheuvel | b3aad5b | 2019-11-08 13:22:12 +0100 | [diff] [blame] | 103 | select CRYPTO_ARCH_HAVE_LIB_CHACHA |
Ard Biesheuvel | b7171ce | 2017-01-11 16:41:49 +0000 | [diff] [blame] | 104 | |
Ard Biesheuvel | f569ca1 | 2019-11-08 13:22:24 +0100 | [diff] [blame] | 105 | config CRYPTO_POLY1305_NEON |
| 106 | tristate "Poly1305 hash function using scalar or NEON instructions" |
| 107 | depends on KERNEL_MODE_NEON |
| 108 | select CRYPTO_HASH |
| 109 | select CRYPTO_ARCH_HAVE_LIB_POLY1305 |
| 110 | |
Eric Biggers | a00fa0c | 2018-12-03 19:52:49 -0800 | [diff] [blame] | 111 | config CRYPTO_NHPOLY1305_NEON |
| 112 | tristate "NHPoly1305 hash function using NEON instructions (for Adiantum)" |
| 113 | depends on KERNEL_MODE_NEON |
| 114 | select CRYPTO_NHPOLY1305 |
| 115 | |
Ard Biesheuvel | 1abee99 | 2017-01-11 16:41:55 +0000 | [diff] [blame] | 116 | config CRYPTO_AES_ARM64_BS |
| 117 | tristate "AES in ECB/CBC/CTR/XTS modes using bit-sliced NEON algorithm" |
| 118 | depends on KERNEL_MODE_NEON |
Eric Biggers | b95bba5 | 2019-10-25 12:41:13 -0700 | [diff] [blame] | 119 | select CRYPTO_SKCIPHER |
Ard Biesheuvel | 12fcd92 | 2017-01-28 23:25:39 +0000 | [diff] [blame] | 120 | select CRYPTO_AES_ARM64_NEON_BLK |
Ard Biesheuvel | f68df54 | 2019-07-02 21:41:31 +0200 | [diff] [blame] | 121 | select CRYPTO_LIB_AES |
Ard Biesheuvel | 1abee99 | 2017-01-11 16:41:55 +0000 | [diff] [blame] | 122 | |
Ard Biesheuvel | 2c98833 | 2014-03-06 16:23:33 +0800 | [diff] [blame] | 123 | endif |