xref: /linux/arch/arm/crypto/Kconfig (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (arm)"
4
5config CRYPTO_CURVE25519_NEON
6	tristate
7	depends on KERNEL_MODE_NEON
8	select CRYPTO_KPP
9	select CRYPTO_LIB_CURVE25519_GENERIC
10	select CRYPTO_ARCH_HAVE_LIB_CURVE25519
11	default CRYPTO_LIB_CURVE25519_INTERNAL
12	help
13	  Curve25519 algorithm
14
15	  Architecture: arm with
16	  - NEON (Advanced SIMD) extensions
17
18config CRYPTO_GHASH_ARM_CE
19	tristate "Hash functions: GHASH (PMULL/NEON/ARMv8 Crypto Extensions)"
20	depends on KERNEL_MODE_NEON
21	select CRYPTO_AEAD
22	select CRYPTO_HASH
23	select CRYPTO_CRYPTD
24	select CRYPTO_LIB_AES
25	select CRYPTO_LIB_GF128MUL
26	help
27	  GCM GHASH function (NIST SP800-38D)
28
29	  Architecture: arm using
30	  - PMULL (Polynomial Multiply Long) instructions
31	  - NEON (Advanced SIMD) extensions
32	  - ARMv8 Crypto Extensions
33
34	  Use an implementation of GHASH (used by the GCM AEAD chaining mode)
35	  that uses the 64x64 to 128 bit polynomial multiplication (vmull.p64)
36	  that is part of the ARMv8 Crypto Extensions, or a slower variant that
37	  uses the vmull.p8 instruction that is part of the basic NEON ISA.
38
39config CRYPTO_NHPOLY1305_NEON
40	tristate "Hash functions: NHPoly1305 (NEON)"
41	depends on KERNEL_MODE_NEON
42	select CRYPTO_NHPOLY1305
43	help
44	  NHPoly1305 hash function (Adiantum)
45
46	  Architecture: arm using:
47	  - NEON (Advanced SIMD) extensions
48
49config CRYPTO_BLAKE2B_NEON
50	tristate "Hash functions: BLAKE2b (NEON)"
51	depends on KERNEL_MODE_NEON
52	select CRYPTO_BLAKE2B
53	help
54	  BLAKE2b cryptographic hash function (RFC 7693)
55
56	  Architecture: arm using
57	  - NEON (Advanced SIMD) extensions
58
59	  BLAKE2b digest algorithm optimized with ARM NEON instructions.
60	  On ARM processors that have NEON support but not the ARMv8
61	  Crypto Extensions, typically this BLAKE2b implementation is
62	  much faster than the SHA-2 family and slightly faster than
63	  SHA-1.
64
65config CRYPTO_AES_ARM
66	tristate "Ciphers: AES"
67	select CRYPTO_ALGAPI
68	select CRYPTO_AES
69	help
70	  Block ciphers: AES cipher algorithms (FIPS-197)
71
72	  Architecture: arm
73
74	  On ARM processors without the Crypto Extensions, this is the
75	  fastest AES implementation for single blocks.  For multiple
76	  blocks, the NEON bit-sliced implementation is usually faster.
77
78	  This implementation may be vulnerable to cache timing attacks,
79	  since it uses lookup tables.  However, as countermeasures it
80	  disables IRQs and preloads the tables; it is hoped this makes
81	  such attacks very difficult.
82
83config CRYPTO_AES_ARM_BS
84	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (bit-sliced NEON)"
85	depends on KERNEL_MODE_NEON
86	select CRYPTO_AES_ARM
87	select CRYPTO_SKCIPHER
88	select CRYPTO_LIB_AES
89	help
90	  Length-preserving ciphers: AES cipher algorithms (FIPS-197)
91	  with block cipher modes:
92	   - ECB (Electronic Codebook) mode (NIST SP800-38A)
93	   - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
94	   - CTR (Counter) mode (NIST SP800-38A)
95	   - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
96	     and IEEE 1619)
97
98	  Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
99	  and for XTS mode encryption, CBC and XTS mode decryption speedup is
100	  around 25%. (CBC encryption speed is not affected by this driver.)
101
102	  The bit sliced AES code does not use lookup tables, so it is believed
103	  to be invulnerable to cache timing attacks. However, since the bit
104	  sliced AES code cannot process single blocks efficiently, in certain
105	  cases table-based code with some countermeasures against cache timing
106	  attacks will still be used as a fallback method; specifically CBC
107	  encryption (not CBC decryption), the encryption of XTS tweaks, XTS
108	  ciphertext stealing when the message isn't a multiple of 16 bytes, and
109	  CTR when invoked in a context in which NEON instructions are unusable.
110
111config CRYPTO_AES_ARM_CE
112	tristate "Ciphers: AES, modes: ECB/CBC/CTS/CTR/XTS (ARMv8 Crypto Extensions)"
113	depends on KERNEL_MODE_NEON
114	select CRYPTO_SKCIPHER
115	select CRYPTO_LIB_AES
116	help
117	  Length-preserving ciphers: AES cipher algorithms (FIPS-197)
118	   with block cipher modes:
119	   - ECB (Electronic Codebook) mode (NIST SP800-38A)
120	   - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
121	   - CTR (Counter) mode (NIST SP800-38A)
122	   - CTS (Cipher Text Stealing) mode (NIST SP800-38A)
123	   - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
124	     and IEEE 1619)
125
126	  Architecture: arm using:
127	  - ARMv8 Crypto Extensions
128
129endmenu
130
131