xref: /linux/arch/arm/crypto/Kconfig (revision ec84348da449d96ce5be47f7d00221cb8374f462)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2652ccae5SArd Biesheuvel
34a329fecSRobert Elliottmenu "Accelerated Cryptographic Algorithms for CPU (arm)"
4652ccae5SArd Biesheuvel
54a95d4aeSRobert Elliottconfig CRYPTO_CURVE25519_NEON
605b37465SRobert Elliott	tristate "Public key crypto: Curve25519 (NEON)"
74a95d4aeSRobert Elliott	depends on KERNEL_MODE_NEON
84a95d4aeSRobert Elliott	select CRYPTO_LIB_CURVE25519_GENERIC
94a95d4aeSRobert Elliott	select CRYPTO_ARCH_HAVE_LIB_CURVE25519
1005b37465SRobert Elliott	help
1105b37465SRobert Elliott	  Curve25519 algorithm
1205b37465SRobert Elliott
1305b37465SRobert Elliott	  Architecture: arm with
1405b37465SRobert Elliott	  - NEON (Advanced SIMD) extensions
154a95d4aeSRobert Elliott
164a95d4aeSRobert Elliottconfig CRYPTO_GHASH_ARM_CE
174a95d4aeSRobert Elliott	tristate "PMULL-accelerated GHASH using NEON/ARMv8 Crypto Extensions"
184a95d4aeSRobert Elliott	depends on KERNEL_MODE_NEON
194a95d4aeSRobert Elliott	select CRYPTO_HASH
204a95d4aeSRobert Elliott	select CRYPTO_CRYPTD
214a95d4aeSRobert Elliott	select CRYPTO_GF128MUL
224a95d4aeSRobert Elliott	help
234a95d4aeSRobert Elliott	  Use an implementation of GHASH (used by the GCM AEAD chaining mode)
244a95d4aeSRobert Elliott	  that uses the 64x64 to 128 bit polynomial multiplication (vmull.p64)
254a95d4aeSRobert Elliott	  that is part of the ARMv8 Crypto Extensions, or a slower variant that
264a95d4aeSRobert Elliott	  uses the vmull.p8 instruction that is part of the basic NEON ISA.
274a95d4aeSRobert Elliott
284a95d4aeSRobert Elliottconfig CRYPTO_NHPOLY1305_NEON
294a95d4aeSRobert Elliott	tristate "NEON accelerated NHPoly1305 hash function (for Adiantum)"
304a95d4aeSRobert Elliott	depends on KERNEL_MODE_NEON
314a95d4aeSRobert Elliott	select CRYPTO_NHPOLY1305
324a95d4aeSRobert Elliott
334a95d4aeSRobert Elliottconfig CRYPTO_POLY1305_ARM
344a95d4aeSRobert Elliott	tristate "Accelerated scalar and SIMD Poly1305 hash implementations"
354a95d4aeSRobert Elliott	select CRYPTO_HASH
364a95d4aeSRobert Elliott	select CRYPTO_ARCH_HAVE_LIB_POLY1305
374a95d4aeSRobert Elliott
384a95d4aeSRobert Elliottconfig CRYPTO_BLAKE2S_ARM
394a95d4aeSRobert Elliott	bool "BLAKE2s digest algorithm (ARM)"
404a95d4aeSRobert Elliott	select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
414a95d4aeSRobert Elliott	help
424a95d4aeSRobert Elliott	  BLAKE2s digest algorithm optimized with ARM scalar instructions.  This
434a95d4aeSRobert Elliott	  is faster than the generic implementations of BLAKE2s and BLAKE2b, but
444a95d4aeSRobert Elliott	  slower than the NEON implementation of BLAKE2b.  (There is no NEON
454a95d4aeSRobert Elliott	  implementation of BLAKE2s, since NEON doesn't really help with it.)
464a95d4aeSRobert Elliott
474a95d4aeSRobert Elliottconfig CRYPTO_BLAKE2B_NEON
484a95d4aeSRobert Elliott	tristate "BLAKE2b digest algorithm (ARM NEON)"
494a95d4aeSRobert Elliott	depends on KERNEL_MODE_NEON
504a95d4aeSRobert Elliott	select CRYPTO_BLAKE2B
514a95d4aeSRobert Elliott	help
524a95d4aeSRobert Elliott	  BLAKE2b digest algorithm optimized with ARM NEON instructions.
534a95d4aeSRobert Elliott	  On ARM processors that have NEON support but not the ARMv8
544a95d4aeSRobert Elliott	  Crypto Extensions, typically this BLAKE2b implementation is
554a95d4aeSRobert Elliott	  much faster than SHA-2 and slightly faster than SHA-1.
564a95d4aeSRobert Elliott
57652ccae5SArd Biesheuvelconfig CRYPTO_SHA1_ARM
58652ccae5SArd Biesheuvel	tristate "SHA1 digest algorithm (ARM-asm)"
59652ccae5SArd Biesheuvel	select CRYPTO_SHA1
60652ccae5SArd Biesheuvel	select CRYPTO_HASH
61652ccae5SArd Biesheuvel	help
62652ccae5SArd Biesheuvel	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
63652ccae5SArd Biesheuvel	  using optimized ARM assembler.
64652ccae5SArd Biesheuvel
65652ccae5SArd Biesheuvelconfig CRYPTO_SHA1_ARM_NEON
66652ccae5SArd Biesheuvel	tristate "SHA1 digest algorithm (ARM NEON)"
67652ccae5SArd Biesheuvel	depends on KERNEL_MODE_NEON
68652ccae5SArd Biesheuvel	select CRYPTO_SHA1_ARM
69652ccae5SArd Biesheuvel	select CRYPTO_SHA1
70652ccae5SArd Biesheuvel	select CRYPTO_HASH
71652ccae5SArd Biesheuvel	help
72652ccae5SArd Biesheuvel	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
73652ccae5SArd Biesheuvel	  using optimized ARM NEON assembly, when NEON instructions are
74652ccae5SArd Biesheuvel	  available.
75652ccae5SArd Biesheuvel
76864cbeedSArd Biesheuvelconfig CRYPTO_SHA1_ARM_CE
77864cbeedSArd Biesheuvel	tristate "SHA1 digest algorithm (ARM v8 Crypto Extensions)"
785429ef62SWill Deacon	depends on KERNEL_MODE_NEON
79864cbeedSArd Biesheuvel	select CRYPTO_SHA1_ARM
80864cbeedSArd Biesheuvel	select CRYPTO_HASH
81864cbeedSArd Biesheuvel	help
82864cbeedSArd Biesheuvel	  SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
83864cbeedSArd Biesheuvel	  using special ARMv8 Crypto Extensions.
84864cbeedSArd Biesheuvel
85006d0624SArd Biesheuvelconfig CRYPTO_SHA2_ARM_CE
86006d0624SArd Biesheuvel	tristate "SHA-224/256 digest algorithm (ARM v8 Crypto Extensions)"
875429ef62SWill Deacon	depends on KERNEL_MODE_NEON
889205b949SArd Biesheuvel	select CRYPTO_SHA256_ARM
89006d0624SArd Biesheuvel	select CRYPTO_HASH
90006d0624SArd Biesheuvel	help
91006d0624SArd Biesheuvel	  SHA-256 secure hash standard (DFIPS 180-2) implemented
92006d0624SArd Biesheuvel	  using special ARMv8 Crypto Extensions.
93006d0624SArd Biesheuvel
94f2f770d7SSami Tolvanenconfig CRYPTO_SHA256_ARM
95f2f770d7SSami Tolvanen	tristate "SHA-224/256 digest algorithm (ARM-asm and NEON)"
96f2f770d7SSami Tolvanen	select CRYPTO_HASH
97b48321deSArnd Bergmann	depends on !CPU_V7M
98f2f770d7SSami Tolvanen	help
99f2f770d7SSami Tolvanen	  SHA-256 secure hash standard (DFIPS 180-2) implemented
100f2f770d7SSami Tolvanen	  using optimized ARM assembler and NEON, when available.
101f2f770d7SSami Tolvanen
102c80ae7caSArd Biesheuvelconfig CRYPTO_SHA512_ARM
103c80ae7caSArd Biesheuvel	tristate "SHA-384/512 digest algorithm (ARM-asm and NEON)"
104652ccae5SArd Biesheuvel	select CRYPTO_HASH
105c80ae7caSArd Biesheuvel	depends on !CPU_V7M
106652ccae5SArd Biesheuvel	help
107652ccae5SArd Biesheuvel	  SHA-512 secure hash standard (DFIPS 180-2) implemented
108c80ae7caSArd Biesheuvel	  using optimized ARM assembler and NEON, when available.
109652ccae5SArd Biesheuvel
110652ccae5SArd Biesheuvelconfig CRYPTO_AES_ARM
11181edb426SArd Biesheuvel	tristate "Scalar AES cipher for ARM"
112652ccae5SArd Biesheuvel	select CRYPTO_ALGAPI
113652ccae5SArd Biesheuvel	select CRYPTO_AES
114652ccae5SArd Biesheuvel	help
115652ccae5SArd Biesheuvel	  Use optimized AES assembler routines for ARM platforms.
116652ccae5SArd Biesheuvel
117913a3aa0SEric Biggers	  On ARM processors without the Crypto Extensions, this is the
118913a3aa0SEric Biggers	  fastest AES implementation for single blocks.  For multiple
119913a3aa0SEric Biggers	  blocks, the NEON bit-sliced implementation is usually faster.
120913a3aa0SEric Biggers
121913a3aa0SEric Biggers	  This implementation may be vulnerable to cache timing attacks,
122913a3aa0SEric Biggers	  since it uses lookup tables.  However, as countermeasures it
123913a3aa0SEric Biggers	  disables IRQs and preloads the tables; it is hoped this makes
124913a3aa0SEric Biggers	  such attacks very difficult.
125913a3aa0SEric Biggers
126652ccae5SArd Biesheuvelconfig CRYPTO_AES_ARM_BS
127652ccae5SArd Biesheuvel	tristate "Bit sliced AES using NEON instructions"
128652ccae5SArd Biesheuvel	depends on KERNEL_MODE_NEON
129b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
130aa6e2d2bSArd Biesheuvel	select CRYPTO_LIB_AES
131c8bd296cSHerbert Xu	select CRYPTO_AES
132c8bd296cSHerbert Xu	select CRYPTO_CBC
1336fdf436fSHerbert Xu	select CRYPTO_SIMD
134652ccae5SArd Biesheuvel	help
135652ccae5SArd Biesheuvel	  Use a faster and more secure NEON based implementation of AES in CBC,
136652ccae5SArd Biesheuvel	  CTR and XTS modes
137652ccae5SArd Biesheuvel
138652ccae5SArd Biesheuvel	  Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
139652ccae5SArd Biesheuvel	  and for XTS mode encryption, CBC and XTS mode decryption speedup is
140652ccae5SArd Biesheuvel	  around 25%. (CBC encryption speed is not affected by this driver.)
141652ccae5SArd Biesheuvel	  This implementation does not rely on any lookup tables so it is
142652ccae5SArd Biesheuvel	  believed to be invulnerable to cache timing attacks.
143652ccae5SArd Biesheuvel
14486464859SArd Biesheuvelconfig CRYPTO_AES_ARM_CE
14586464859SArd Biesheuvel	tristate "Accelerated AES using ARMv8 Crypto Extensions"
1465429ef62SWill Deacon	depends on KERNEL_MODE_NEON
147b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
148f703964fSArd Biesheuvel	select CRYPTO_LIB_AES
149585b5fa6SHerbert Xu	select CRYPTO_SIMD
15086464859SArd Biesheuvel	help
15186464859SArd Biesheuvel	  Use an implementation of AES in CBC, CTR and XTS modes that uses
15286464859SArd Biesheuvel	  ARMv8 Crypto Extensions
15386464859SArd Biesheuvel
1544a95d4aeSRobert Elliottconfig CRYPTO_CHACHA20_NEON
1554a95d4aeSRobert Elliott	tristate "NEON and scalar accelerated ChaCha stream cipher algorithms"
1564a95d4aeSRobert Elliott	select CRYPTO_SKCIPHER
1574a95d4aeSRobert Elliott	select CRYPTO_ARCH_HAVE_LIB_CHACHA
1581d481f1cSArd Biesheuvel
159d0a3431aSArd Biesheuvelconfig CRYPTO_CRC32_ARM_CE
160*ec84348dSRobert Elliott	tristate "CRC32C and CRC32"
1615429ef62SWill Deacon	depends on KERNEL_MODE_NEON
162b4d0c0aaSArd Biesheuvel	depends on CRC32
163d0a3431aSArd Biesheuvel	select CRYPTO_HASH
164*ec84348dSRobert Elliott	help
165*ec84348dSRobert Elliott	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
166*ec84348dSRobert Elliott	  and CRC32 CRC algorithm (IEEE 802.3)
167*ec84348dSRobert Elliott
168*ec84348dSRobert Elliott	  Architecture: arm using:
169*ec84348dSRobert Elliott	  - CRC and/or PMULL instructions
170*ec84348dSRobert Elliott
171*ec84348dSRobert Elliott	  Drivers: crc32-arm-ce and crc32c-arm-ce
172d0a3431aSArd Biesheuvel
1734a95d4aeSRobert Elliottconfig CRYPTO_CRCT10DIF_ARM_CE
174*ec84348dSRobert Elliott	tristate "CRCT10DIF"
1754a95d4aeSRobert Elliott	depends on KERNEL_MODE_NEON
1764a95d4aeSRobert Elliott	depends on CRC_T10DIF
177a6b803b3SArd Biesheuvel	select CRYPTO_HASH
178*ec84348dSRobert Elliott	help
179*ec84348dSRobert Elliott	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
180*ec84348dSRobert Elliott
181*ec84348dSRobert Elliott	  Architecture: arm using:
182*ec84348dSRobert Elliott	  - PMULL (Polynomial Multiply Long) instructions
183d8f1308aSJason A. Donenfeld
1844a329fecSRobert Elliottendmenu
1854a95d4aeSRobert Elliott
186