xref: /openbmc/linux/arch/arm/crypto/Kconfig (revision 3f342a23)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (arm)"
4
5config CRYPTO_CURVE25519_NEON
6	tristate "Public key crypto: Curve25519 (NEON)"
7	depends on KERNEL_MODE_NEON
8	select CRYPTO_LIB_CURVE25519_GENERIC
9	select CRYPTO_ARCH_HAVE_LIB_CURVE25519
10	help
11	  Curve25519 algorithm
12
13	  Architecture: arm with
14	  - NEON (Advanced SIMD) extensions
15
16config CRYPTO_GHASH_ARM_CE
17	tristate "Hash functions: GHASH (PMULL/NEON/ARMv8 Crypto Extensions)"
18	depends on KERNEL_MODE_NEON
19	select CRYPTO_HASH
20	select CRYPTO_CRYPTD
21	select CRYPTO_GF128MUL
22	help
23	  GCM GHASH function (NIST SP800-38D)
24
25	  Architecture: arm using
26	  - PMULL (Polynomial Multiply Long) instructions
27	  - NEON (Advanced SIMD) extensions
28	  - ARMv8 Crypto Extensions
29
30	  Use an implementation of GHASH (used by the GCM AEAD chaining mode)
31	  that uses the 64x64 to 128 bit polynomial multiplication (vmull.p64)
32	  that is part of the ARMv8 Crypto Extensions, or a slower variant that
33	  uses the vmull.p8 instruction that is part of the basic NEON ISA.
34
35config CRYPTO_NHPOLY1305_NEON
36	tristate "Hash functions: NHPoly1305 (NEON)"
37	depends on KERNEL_MODE_NEON
38	select CRYPTO_NHPOLY1305
39	help
40	  NHPoly1305 hash function (Adiantum)
41
42	  Architecture: arm using:
43	  - NEON (Advanced SIMD) extensions
44
45config CRYPTO_POLY1305_ARM
46	tristate "Hash functions: Poly1305 (NEON)"
47	select CRYPTO_HASH
48	select CRYPTO_ARCH_HAVE_LIB_POLY1305
49	help
50	  Poly1305 authenticator algorithm (RFC7539)
51
52	  Architecture: arm optionally using
53	  - NEON (Advanced SIMD) extensions
54
55config CRYPTO_BLAKE2S_ARM
56	bool "Hash functions: BLAKE2s"
57	select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
58	help
59	  BLAKE2s cryptographic hash function (RFC 7693)
60
61	  Architecture: arm
62
63	  This is faster than the generic implementations of BLAKE2s and
64	  BLAKE2b, but slower than the NEON implementation of BLAKE2b.
65	  There is no NEON implementation of BLAKE2s, since NEON doesn't
66	  really help with it.
67
68config CRYPTO_BLAKE2B_NEON
69	tristate "Hash functions: BLAKE2b (NEON)"
70	depends on KERNEL_MODE_NEON
71	select CRYPTO_BLAKE2B
72	help
73	  BLAKE2b cryptographic hash function (RFC 7693)
74
75	  Architecture: arm using
76	  - NEON (Advanced SIMD) extensions
77
78	  BLAKE2b digest algorithm optimized with ARM NEON instructions.
79	  On ARM processors that have NEON support but not the ARMv8
80	  Crypto Extensions, typically this BLAKE2b implementation is
81	  much faster than the SHA-2 family and slightly faster than
82	  SHA-1.
83
84config CRYPTO_SHA1_ARM
85	tristate "Hash functions: SHA-1"
86	select CRYPTO_SHA1
87	select CRYPTO_HASH
88	help
89	  SHA-1 secure hash algorithm (FIPS 180)
90
91	  Architecture: arm
92
93config CRYPTO_SHA1_ARM_NEON
94	tristate "Hash functions: SHA-1 (NEON)"
95	depends on KERNEL_MODE_NEON
96	select CRYPTO_SHA1_ARM
97	select CRYPTO_SHA1
98	select CRYPTO_HASH
99	help
100	  SHA-1 secure hash algorithm (FIPS 180)
101
102	  Architecture: arm using
103	  - NEON (Advanced SIMD) extensions
104
105config CRYPTO_SHA1_ARM_CE
106	tristate "Hash functions: SHA-1 (ARMv8 Crypto Extensions)"
107	depends on KERNEL_MODE_NEON
108	select CRYPTO_SHA1_ARM
109	select CRYPTO_HASH
110	help
111	  SHA-1 secure hash algorithm (FIPS 180)
112
113	  Architecture: arm using ARMv8 Crypto Extensions
114
115config CRYPTO_SHA2_ARM_CE
116	tristate "Hash functions: SHA-224 and SHA-256 (ARMv8 Crypto Extensions)"
117	depends on KERNEL_MODE_NEON
118	select CRYPTO_SHA256_ARM
119	select CRYPTO_HASH
120	help
121	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
122
123	  Architecture: arm using
124	  - ARMv8 Crypto Extensions
125
126config CRYPTO_SHA256_ARM
127	tristate "Hash functions: SHA-224 and SHA-256 (NEON)"
128	select CRYPTO_HASH
129	depends on !CPU_V7M
130	help
131	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
132
133	  Architecture: arm using
134	  - NEON (Advanced SIMD) extensions
135
136config CRYPTO_SHA512_ARM
137	tristate "Hash functions: SHA-384 and SHA-512 (NEON)"
138	select CRYPTO_HASH
139	depends on !CPU_V7M
140	help
141	  SHA-384 and SHA-512 secure hash algorithms (FIPS 180)
142
143	  Architecture: arm using
144	  - NEON (Advanced SIMD) extensions
145
146config CRYPTO_AES_ARM
147	tristate "Scalar AES cipher for ARM"
148	select CRYPTO_ALGAPI
149	select CRYPTO_AES
150	help
151	  Use optimized AES assembler routines for ARM platforms.
152
153	  On ARM processors without the Crypto Extensions, this is the
154	  fastest AES implementation for single blocks.  For multiple
155	  blocks, the NEON bit-sliced implementation is usually faster.
156
157	  This implementation may be vulnerable to cache timing attacks,
158	  since it uses lookup tables.  However, as countermeasures it
159	  disables IRQs and preloads the tables; it is hoped this makes
160	  such attacks very difficult.
161
162config CRYPTO_AES_ARM_BS
163	tristate "Bit sliced AES using NEON instructions"
164	depends on KERNEL_MODE_NEON
165	select CRYPTO_SKCIPHER
166	select CRYPTO_LIB_AES
167	select CRYPTO_AES
168	select CRYPTO_CBC
169	select CRYPTO_SIMD
170	help
171	  Use a faster and more secure NEON based implementation of AES in CBC,
172	  CTR and XTS modes
173
174	  Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
175	  and for XTS mode encryption, CBC and XTS mode decryption speedup is
176	  around 25%. (CBC encryption speed is not affected by this driver.)
177	  This implementation does not rely on any lookup tables so it is
178	  believed to be invulnerable to cache timing attacks.
179
180config CRYPTO_AES_ARM_CE
181	tristate "Accelerated AES using ARMv8 Crypto Extensions"
182	depends on KERNEL_MODE_NEON
183	select CRYPTO_SKCIPHER
184	select CRYPTO_LIB_AES
185	select CRYPTO_SIMD
186	help
187	  Use an implementation of AES in CBC, CTR and XTS modes that uses
188	  ARMv8 Crypto Extensions
189
190config CRYPTO_CHACHA20_NEON
191	tristate "NEON and scalar accelerated ChaCha stream cipher algorithms"
192	select CRYPTO_SKCIPHER
193	select CRYPTO_ARCH_HAVE_LIB_CHACHA
194
195config CRYPTO_CRC32_ARM_CE
196	tristate "CRC32C and CRC32"
197	depends on KERNEL_MODE_NEON
198	depends on CRC32
199	select CRYPTO_HASH
200	help
201	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
202	  and CRC32 CRC algorithm (IEEE 802.3)
203
204	  Architecture: arm using:
205	  - CRC and/or PMULL instructions
206
207	  Drivers: crc32-arm-ce and crc32c-arm-ce
208
209config CRYPTO_CRCT10DIF_ARM_CE
210	tristate "CRCT10DIF"
211	depends on KERNEL_MODE_NEON
212	depends on CRC_T10DIF
213	select CRYPTO_HASH
214	help
215	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
216
217	  Architecture: arm using:
218	  - PMULL (Polynomial Multiply Long) instructions
219
220endmenu
221
222