xref: /openbmc/linux/arch/arm/crypto/Kconfig (revision f59a3ee6)
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 "Ciphers: AES"
148	select CRYPTO_ALGAPI
149	select CRYPTO_AES
150	help
151	  Block ciphers: AES cipher algorithms (FIPS-197)
152
153	  Architecture: arm
154
155	  On ARM processors without the Crypto Extensions, this is the
156	  fastest AES implementation for single blocks.  For multiple
157	  blocks, the NEON bit-sliced implementation is usually faster.
158
159	  This implementation may be vulnerable to cache timing attacks,
160	  since it uses lookup tables.  However, as countermeasures it
161	  disables IRQs and preloads the tables; it is hoped this makes
162	  such attacks very difficult.
163
164config CRYPTO_AES_ARM_BS
165	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (bit-sliced NEON)"
166	depends on KERNEL_MODE_NEON
167	select CRYPTO_SKCIPHER
168	select CRYPTO_LIB_AES
169	select CRYPTO_AES
170	select CRYPTO_CBC
171	select CRYPTO_SIMD
172	help
173	  Length-preserving ciphers: AES cipher algorithms (FIPS-197)
174	  with block cipher modes:
175	   - ECB (Electronic Codebook) mode (NIST SP800-38A)
176	   - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
177	   - CTR (Counter) mode (NIST SP800-38A)
178	   - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
179	     and IEEE 1619)
180
181	  Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
182	  and for XTS mode encryption, CBC and XTS mode decryption speedup is
183	  around 25%. (CBC encryption speed is not affected by this driver.)
184	  This implementation does not rely on any lookup tables so it is
185	  believed to be invulnerable to cache timing attacks.
186
187config CRYPTO_AES_ARM_CE
188	tristate "Ciphers: AES, modes: ECB/CBC/CTS/CTR/XTS (ARMv8 Crypto Extensions)"
189	depends on KERNEL_MODE_NEON
190	select CRYPTO_SKCIPHER
191	select CRYPTO_LIB_AES
192	select CRYPTO_SIMD
193	help
194	  Length-preserving ciphers: AES cipher algorithms (FIPS-197)
195	   with block cipher modes:
196	   - ECB (Electronic Codebook) mode (NIST SP800-38A)
197	   - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
198	   - CTR (Counter) mode (NIST SP800-38A)
199	   - CTS (Cipher Text Stealing) mode (NIST SP800-38A)
200	   - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
201	     and IEEE 1619)
202
203	  Architecture: arm using:
204	  - ARMv8 Crypto Extensions
205
206config CRYPTO_CHACHA20_NEON
207	tristate "Ciphers: ChaCha20, XChaCha20, XChaCha12 (NEON)"
208	select CRYPTO_SKCIPHER
209	select CRYPTO_ARCH_HAVE_LIB_CHACHA
210	help
211	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
212	  stream cipher algorithms
213
214	  Architecture: arm using:
215	  - NEON (Advanced SIMD) extensions
216
217config CRYPTO_CRC32_ARM_CE
218	tristate "CRC32C and CRC32"
219	depends on KERNEL_MODE_NEON
220	depends on CRC32
221	select CRYPTO_HASH
222	help
223	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
224	  and CRC32 CRC algorithm (IEEE 802.3)
225
226	  Architecture: arm using:
227	  - CRC and/or PMULL instructions
228
229	  Drivers: crc32-arm-ce and crc32c-arm-ce
230
231config CRYPTO_CRCT10DIF_ARM_CE
232	tristate "CRCT10DIF"
233	depends on KERNEL_MODE_NEON
234	depends on CRC_T10DIF
235	select CRYPTO_HASH
236	help
237	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
238
239	  Architecture: arm using:
240	  - PMULL (Polynomial Multiply Long) instructions
241
242endmenu
243
244