18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_cimenuconfig ARM64_CRYPTO
48c2ecf20Sopenharmony_ci	bool "ARM64 Accelerated Cryptographic Algorithms"
58c2ecf20Sopenharmony_ci	depends on ARM64
68c2ecf20Sopenharmony_ci	help
78c2ecf20Sopenharmony_ci	  Say Y here to choose from a selection of cryptographic algorithms
88c2ecf20Sopenharmony_ci	  implemented using ARM64 specific CPU features or instructions.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciif ARM64_CRYPTO
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciconfig CRYPTO_SHA256_ARM64
138c2ecf20Sopenharmony_ci	tristate "SHA-224/SHA-256 digest algorithm for arm64"
148c2ecf20Sopenharmony_ci	select CRYPTO_HASH
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciconfig CRYPTO_SHA512_ARM64
178c2ecf20Sopenharmony_ci	tristate "SHA-384/SHA-512 digest algorithm for arm64"
188c2ecf20Sopenharmony_ci	select CRYPTO_HASH
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciconfig CRYPTO_SHA1_ARM64_CE
218c2ecf20Sopenharmony_ci	tristate "SHA-1 digest algorithm (ARMv8 Crypto Extensions)"
228c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
238c2ecf20Sopenharmony_ci	select CRYPTO_HASH
248c2ecf20Sopenharmony_ci	select CRYPTO_SHA1
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciconfig CRYPTO_SHA2_ARM64_CE
278c2ecf20Sopenharmony_ci	tristate "SHA-224/SHA-256 digest algorithm (ARMv8 Crypto Extensions)"
288c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
298c2ecf20Sopenharmony_ci	select CRYPTO_HASH
308c2ecf20Sopenharmony_ci	select CRYPTO_SHA256_ARM64
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciconfig CRYPTO_SHA512_ARM64_CE
338c2ecf20Sopenharmony_ci	tristate "SHA-384/SHA-512 digest algorithm (ARMv8 Crypto Extensions)"
348c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
358c2ecf20Sopenharmony_ci	select CRYPTO_HASH
368c2ecf20Sopenharmony_ci	select CRYPTO_SHA512_ARM64
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciconfig CRYPTO_SHA3_ARM64
398c2ecf20Sopenharmony_ci	tristate "SHA3 digest algorithm (ARMv8.2 Crypto Extensions)"
408c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
418c2ecf20Sopenharmony_ci	select CRYPTO_HASH
428c2ecf20Sopenharmony_ci	select CRYPTO_SHA3
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciconfig CRYPTO_SM3_ARM64_CE
458c2ecf20Sopenharmony_ci	tristate "SM3 digest algorithm (ARMv8.2 Crypto Extensions)"
468c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
478c2ecf20Sopenharmony_ci	select CRYPTO_HASH
488c2ecf20Sopenharmony_ci	select CRYPTO_SM3
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciconfig CRYPTO_SM4_ARM64_CE
518c2ecf20Sopenharmony_ci	tristate "SM4 symmetric cipher (ARMv8.2 Crypto Extensions)"
528c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
538c2ecf20Sopenharmony_ci	select CRYPTO_ALGAPI
548c2ecf20Sopenharmony_ci	select CRYPTO_SM4
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciconfig CRYPTO_GHASH_ARM64_CE
578c2ecf20Sopenharmony_ci	tristate "GHASH/AES-GCM using ARMv8 Crypto Extensions"
588c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
598c2ecf20Sopenharmony_ci	select CRYPTO_HASH
608c2ecf20Sopenharmony_ci	select CRYPTO_GF128MUL
618c2ecf20Sopenharmony_ci	select CRYPTO_LIB_AES
628c2ecf20Sopenharmony_ci	select CRYPTO_AEAD
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciconfig CRYPTO_CRCT10DIF_ARM64_CE
658c2ecf20Sopenharmony_ci	tristate "CRCT10DIF digest algorithm using PMULL instructions"
668c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON && CRC_T10DIF
678c2ecf20Sopenharmony_ci	select CRYPTO_HASH
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciconfig CRYPTO_AES_ARM64
708c2ecf20Sopenharmony_ci	tristate "AES core cipher using scalar instructions"
718c2ecf20Sopenharmony_ci	select CRYPTO_AES
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciconfig CRYPTO_AES_ARM64_CE
748c2ecf20Sopenharmony_ci	tristate "AES core cipher using ARMv8 Crypto Extensions"
758c2ecf20Sopenharmony_ci	depends on ARM64 && KERNEL_MODE_NEON
768c2ecf20Sopenharmony_ci	select CRYPTO_ALGAPI
778c2ecf20Sopenharmony_ci	select CRYPTO_LIB_AES
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ciconfig CRYPTO_AES_ARM64_CE_CCM
808c2ecf20Sopenharmony_ci	tristate "AES in CCM mode using ARMv8 Crypto Extensions"
818c2ecf20Sopenharmony_ci	depends on ARM64 && KERNEL_MODE_NEON
828c2ecf20Sopenharmony_ci	select CRYPTO_ALGAPI
838c2ecf20Sopenharmony_ci	select CRYPTO_AES_ARM64_CE
848c2ecf20Sopenharmony_ci	select CRYPTO_AEAD
858c2ecf20Sopenharmony_ci	select CRYPTO_LIB_AES
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ciconfig CRYPTO_AES_ARM64_CE_BLK
888c2ecf20Sopenharmony_ci	tristate "AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions"
898c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
908c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
918c2ecf20Sopenharmony_ci	select CRYPTO_AES_ARM64_CE
928c2ecf20Sopenharmony_ci	select CRYPTO_AES_ARM64
938c2ecf20Sopenharmony_ci	select CRYPTO_SIMD
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ciconfig CRYPTO_AES_ARM64_NEON_BLK
968c2ecf20Sopenharmony_ci	tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions"
978c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
988c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
998c2ecf20Sopenharmony_ci	select CRYPTO_AES_ARM64
1008c2ecf20Sopenharmony_ci	select CRYPTO_LIB_AES
1018c2ecf20Sopenharmony_ci	select CRYPTO_SIMD
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ciconfig CRYPTO_CHACHA20_NEON
1048c2ecf20Sopenharmony_ci	tristate "ChaCha20, XChaCha20, and XChaCha12 stream ciphers using NEON instructions"
1058c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
1068c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
1078c2ecf20Sopenharmony_ci	select CRYPTO_LIB_CHACHA_GENERIC
1088c2ecf20Sopenharmony_ci	select CRYPTO_ARCH_HAVE_LIB_CHACHA
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ciconfig CRYPTO_POLY1305_NEON
1118c2ecf20Sopenharmony_ci	tristate "Poly1305 hash function using scalar or NEON instructions"
1128c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
1138c2ecf20Sopenharmony_ci	select CRYPTO_HASH
1148c2ecf20Sopenharmony_ci	select CRYPTO_ARCH_HAVE_LIB_POLY1305
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ciconfig CRYPTO_NHPOLY1305_NEON
1178c2ecf20Sopenharmony_ci	tristate "NHPoly1305 hash function using NEON instructions (for Adiantum)"
1188c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
1198c2ecf20Sopenharmony_ci	select CRYPTO_NHPOLY1305
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ciconfig CRYPTO_AES_ARM64_BS
1228c2ecf20Sopenharmony_ci	tristate "AES in ECB/CBC/CTR/XTS modes using bit-sliced NEON algorithm"
1238c2ecf20Sopenharmony_ci	depends on KERNEL_MODE_NEON
1248c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
1258c2ecf20Sopenharmony_ci	select CRYPTO_AES_ARM64_NEON_BLK
1268c2ecf20Sopenharmony_ci	select CRYPTO_AES_ARM64
1278c2ecf20Sopenharmony_ci	select CRYPTO_LIB_AES
1288c2ecf20Sopenharmony_ci	select CRYPTO_SIMD
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ciendif
131