blob: addfa413650bd368ba1841affc8275f0e74c9f8c [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Ard Biesheuvel2c988332014-03-06 16:23:33 +08002
3menuconfig 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
10if ARM64_CRYPTO
11
Ard Biesheuvel7918ece2016-11-20 11:42:01 +000012config CRYPTO_SHA256_ARM64
13 tristate "SHA-224/SHA-256 digest algorithm for arm64"
14 select CRYPTO_HASH
15
16config CRYPTO_SHA512_ARM64
17 tristate "SHA-384/SHA-512 digest algorithm for arm64"
18 select CRYPTO_HASH
19
Ard Biesheuvel2c988332014-03-06 16:23:33 +080020config CRYPTO_SHA1_ARM64_CE
21 tristate "SHA-1 digest algorithm (ARMv8 Crypto Extensions)"
Ard Biesheuvel0771f322017-07-24 11:28:08 +010022 depends on KERNEL_MODE_NEON
Ard Biesheuvel2c988332014-03-06 16:23:33 +080023 select CRYPTO_HASH
Ard Biesheuvel0771f322017-07-24 11:28:08 +010024 select CRYPTO_SHA1
Ard Biesheuvel2c988332014-03-06 16:23:33 +080025
Ard Biesheuvel6ba6c742014-03-20 15:35:40 +010026config CRYPTO_SHA2_ARM64_CE
27 tristate "SHA-224/SHA-256 digest algorithm (ARMv8 Crypto Extensions)"
Ard Biesheuvelda179332017-07-24 11:28:09 +010028 depends on KERNEL_MODE_NEON
Ard Biesheuvel6ba6c742014-03-20 15:35:40 +010029 select CRYPTO_HASH
Ard Biesheuvelda179332017-07-24 11:28:09 +010030 select CRYPTO_SHA256_ARM64
Ard Biesheuvel6ba6c742014-03-20 15:35:40 +010031
Ard Biesheuvelbb6c8c42018-01-09 18:23:02 +000032config 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 Biesheuvel15d59102018-01-19 12:04:38 +000038config 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 Biesheuvel140aa502018-01-19 12:04:39 +000044config 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 Biesheuvele99ce922018-04-25 14:20:46 +020050config CRYPTO_SM4_ARM64_CE
51 tristate "SM4 symmetric cipher (ARMv8.2 Crypto Extensions)"
52 depends on KERNEL_MODE_NEON
53 select CRYPTO_ALGAPI
Tianjia Zhangc59de482021-07-20 11:46:40 +080054 select CRYPTO_LIB_SM4
Ard Biesheuvele99ce922018-04-25 14:20:46 +020055
Ard Biesheuvelfdd23892014-03-26 20:53:05 +010056config CRYPTO_GHASH_ARM64_CE
Ard Biesheuvel537c1442017-07-24 11:28:16 +010057 tristate "GHASH/AES-GCM using ARMv8 Crypto Extensions"
Ard Biesheuvel6d6254d2017-07-24 11:28:05 +010058 depends on KERNEL_MODE_NEON
Ard Biesheuvelfdd23892014-03-26 20:53:05 +010059 select CRYPTO_HASH
Ard Biesheuvel6d6254d2017-07-24 11:28:05 +010060 select CRYPTO_GF128MUL
Ard Biesheuvelfe3b99b2019-07-02 21:41:28 +020061 select CRYPTO_LIB_AES
Ard Biesheuvelfdd23892014-03-26 20:53:05 +010062
Ard Biesheuvel6ef57372016-12-05 18:42:25 +000063config 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 Biesheuvelbed593c2017-01-11 16:41:52 +000068config CRYPTO_AES_ARM64
69 tristate "AES core cipher using scalar instructions"
70 select CRYPTO_AES
71
Ard Biesheuvel317f2f72014-02-05 18:13:38 +010072config 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 Biesheuvel4d3f9d82019-07-02 21:41:36 +020076 select CRYPTO_LIB_AES
Ard Biesheuvel317f2f72014-02-05 18:13:38 +010077
Ard Biesheuvela3fd8212014-02-10 11:26:29 +010078config 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 Biesheuvel12ac3ef2014-11-03 16:50:01 +000082 select CRYPTO_AES_ARM64_CE
Ard Biesheuvela3fd8212014-02-10 11:26:29 +010083 select CRYPTO_AEAD
Ard Biesheuvelc59a6df2019-07-02 21:41:30 +020084 select CRYPTO_LIB_AES
Ard Biesheuvela3fd8212014-02-10 11:26:29 +010085
Ard Biesheuvel49788fe2014-03-21 10:19:17 +010086config CRYPTO_AES_ARM64_CE_BLK
87 tristate "AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions"
Ard Biesheuvele2115062017-07-24 11:28:13 +010088 depends on KERNEL_MODE_NEON
Eric Biggersb95bba52019-10-25 12:41:13 -070089 select CRYPTO_SKCIPHER
Ard Biesheuvel12ac3ef2014-11-03 16:50:01 +000090 select CRYPTO_AES_ARM64_CE
Ard Biesheuvel49788fe2014-03-21 10:19:17 +010091
92config CRYPTO_AES_ARM64_NEON_BLK
93 tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions"
Ard Biesheuvele2115062017-07-24 11:28:13 +010094 depends on KERNEL_MODE_NEON
Eric Biggersb95bba52019-10-25 12:41:13 -070095 select CRYPTO_SKCIPHER
Ard Biesheuvelc1844722019-07-02 21:41:32 +020096 select CRYPTO_LIB_AES
Ard Biesheuvel49788fe2014-03-21 10:19:17 +010097
Ard Biesheuvelb7171ce2017-01-11 16:41:49 +000098config CRYPTO_CHACHA20_NEON
Eric Biggers19c11c92018-12-03 19:52:52 -080099 tristate "ChaCha20, XChaCha20, and XChaCha12 stream ciphers using NEON instructions"
Ard Biesheuvelb7171ce2017-01-11 16:41:49 +0000100 depends on KERNEL_MODE_NEON
Eric Biggersb95bba52019-10-25 12:41:13 -0700101 select CRYPTO_SKCIPHER
Ard Biesheuvelc77da482019-11-08 13:22:11 +0100102 select CRYPTO_LIB_CHACHA_GENERIC
Ard Biesheuvelb3aad5b2019-11-08 13:22:12 +0100103 select CRYPTO_ARCH_HAVE_LIB_CHACHA
Ard Biesheuvelb7171ce2017-01-11 16:41:49 +0000104
Ard Biesheuvelf569ca12019-11-08 13:22:24 +0100105config 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 Biggersa00fa0c2018-12-03 19:52:49 -0800111config 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 Biesheuvel1abee992017-01-11 16:41:55 +0000116config 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 Biggersb95bba52019-10-25 12:41:13 -0700119 select CRYPTO_SKCIPHER
Ard Biesheuvel12fcd922017-01-28 23:25:39 +0000120 select CRYPTO_AES_ARM64_NEON_BLK
Ard Biesheuvelf68df542019-07-02 21:41:31 +0200121 select CRYPTO_LIB_AES
Ard Biesheuvel1abee992017-01-11 16:41:55 +0000122
Ard Biesheuvel2c988332014-03-06 16:23:33 +0800123endif