xref: /linux/arch/powerpc/crypto/Kconfig (revision 2a6b6c9a226279b4f6668450ddb21ae655558087)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (powerpc)"
4
5config CRYPTO_CURVE25519_PPC64
6	tristate "Public key crypto: Curve25519 (PowerPC64)"
7	depends on PPC64 && CPU_LITTLE_ENDIAN
8	select CRYPTO_LIB_CURVE25519_GENERIC
9	select CRYPTO_ARCH_HAVE_LIB_CURVE25519
10	help
11	  Curve25519 algorithm
12
13	  Architecture: PowerPC64
14	  - Little-endian
15
16config CRYPTO_CRC32C_VPMSUM
17	tristate "CRC32c"
18	depends on PPC64 && ALTIVEC
19	select CRYPTO_HASH
20	select CRC32
21	help
22	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
23
24	  Architecture: powerpc64 using
25	  - AltiVec extensions
26
27	  Enable on POWER8 and newer processors for improved performance.
28
29config CRYPTO_CRCT10DIF_VPMSUM
30	tristate "CRC32T10DIF"
31	depends on PPC64 && ALTIVEC && CRC_T10DIF
32	select CRYPTO_HASH
33	help
34	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
35
36	  Architecture: powerpc64 using
37	  - AltiVec extensions
38
39	  Enable on POWER8 and newer processors for improved performance.
40
41config CRYPTO_VPMSUM_TESTER
42	tristate "CRC32c and CRC32T10DIF hardware acceleration tester"
43	depends on CRYPTO_CRCT10DIF_VPMSUM && CRYPTO_CRC32C_VPMSUM
44	help
45	  Stress test for CRC32c and CRCT10DIF algorithms implemented with
46	  powerpc64 AltiVec extensions (POWER8 vpmsum instructions).
47	  Unless you are testing these algorithms, you don't need this.
48
49config CRYPTO_MD5_PPC
50	tristate "Digests: MD5"
51	depends on PPC
52	select CRYPTO_HASH
53	help
54	  MD5 message digest algorithm (RFC1321)
55
56	  Architecture: powerpc
57
58config CRYPTO_SHA1_PPC
59	tristate "Hash functions: SHA-1"
60	depends on PPC
61	help
62	  SHA-1 secure hash algorithm (FIPS 180)
63
64	  Architecture: powerpc
65
66config CRYPTO_SHA1_PPC_SPE
67	tristate "Hash functions: SHA-1 (SPE)"
68	depends on PPC && SPE
69	help
70	  SHA-1 secure hash algorithm (FIPS 180)
71
72	  Architecture: powerpc using
73	  - SPE (Signal Processing Engine) extensions
74
75config CRYPTO_SHA256_PPC_SPE
76	tristate "Hash functions: SHA-224 and SHA-256 (SPE)"
77	depends on PPC && SPE
78	select CRYPTO_SHA256
79	select CRYPTO_HASH
80	help
81	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
82
83	  Architecture: powerpc using
84	  - SPE (Signal Processing Engine) extensions
85
86config CRYPTO_AES_PPC_SPE
87	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
88	depends on PPC && SPE
89	select CRYPTO_SKCIPHER
90	help
91	  Block ciphers: AES cipher algorithms (FIPS-197)
92	  Length-preserving ciphers: AES with ECB, CBC, CTR, and XTS modes
93
94	  Architecture: powerpc using:
95	  - SPE (Signal Processing Engine) extensions
96
97	  SPE is available for:
98	  - Processor Type: Freescale 8500
99	  - CPU selection: e500 (8540)
100
101	  This module should only be used for low power (router) devices
102	  without hardware AES acceleration (e.g. caam crypto). It reduces the
103	  size of the AES tables from 16KB to 8KB + 256 bytes and mitigates
104	  timining attacks. Nevertheless it might be not as secure as other
105	  architecture specific assembler implementations that work on 1KB
106	  tables or 256 bytes S-boxes.
107
108config CRYPTO_AES_GCM_P10
109	tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
110	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
111	select CRYPTO_LIB_AES
112	select CRYPTO_ALGAPI
113	select CRYPTO_AEAD
114	select CRYPTO_SKCIPHER
115	help
116	  AEAD cipher: AES cipher algorithms (FIPS-197)
117	  GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
118	  Architecture: powerpc64 using:
119	    - little-endian
120	    - Power10 or later features
121
122	  Support for cryptographic acceleration instructions on Power10 or
123	  later CPU. This module supports stitched acceleration for AES/GCM.
124
125config CRYPTO_CHACHA20_P10
126	tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P10 or later)"
127	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
128	select CRYPTO_SKCIPHER
129	select CRYPTO_LIB_CHACHA_GENERIC
130	select CRYPTO_ARCH_HAVE_LIB_CHACHA
131	help
132	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
133	  stream cipher algorithms
134
135	  Architecture: PowerPC64
136	  - Power10 or later
137	  - Little-endian
138
139config CRYPTO_POLY1305_P10
140	tristate "Hash functions: Poly1305 (P10 or later)"
141	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
142	select CRYPTO_HASH
143	select CRYPTO_LIB_POLY1305_GENERIC
144	help
145	  Poly1305 authenticator algorithm (RFC7539)
146
147	  Architecture: PowerPC64
148	  - Power10 or later
149	  - Little-endian
150
151config CRYPTO_DEV_VMX
152        bool "Support for VMX cryptographic acceleration instructions"
153        depends on PPC64 && VSX
154        help
155          Support for VMX cryptographic acceleration instructions.
156
157config CRYPTO_DEV_VMX_ENCRYPT
158	tristate "Encryption acceleration support on P8 CPU"
159	depends on CRYPTO_DEV_VMX
160	select CRYPTO_AES
161	select CRYPTO_CBC
162	select CRYPTO_CTR
163	select CRYPTO_GHASH
164	select CRYPTO_XTS
165	default m
166	help
167	  Support for VMX cryptographic acceleration instructions on Power8 CPU.
168	  This module supports acceleration for AES and GHASH in hardware. If you
169	  choose 'M' here, this module will be called vmx-crypto.
170
171endmenu
172