xref: /linux/arch/powerpc/crypto/Kconfig (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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 BROKEN
111	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
112	select CRYPTO_LIB_AES
113	select CRYPTO_ALGAPI
114	select CRYPTO_AEAD
115	select CRYPTO_SKCIPHER
116	help
117	  AEAD cipher: AES cipher algorithms (FIPS-197)
118	  GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
119	  Architecture: powerpc64 using:
120	    - little-endian
121	    - Power10 or later features
122
123	  Support for cryptographic acceleration instructions on Power10 or
124	  later CPU. This module supports stitched acceleration for AES/GCM.
125
126config CRYPTO_CHACHA20_P10
127	tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P10 or later)"
128	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
129	select CRYPTO_SKCIPHER
130	select CRYPTO_LIB_CHACHA_GENERIC
131	select CRYPTO_ARCH_HAVE_LIB_CHACHA
132	help
133	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
134	  stream cipher algorithms
135
136	  Architecture: PowerPC64
137	  - Power10 or later
138	  - Little-endian
139
140config CRYPTO_POLY1305_P10
141	tristate "Hash functions: Poly1305 (P10 or later)"
142	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
143	select CRYPTO_HASH
144	select CRYPTO_LIB_POLY1305_GENERIC
145	help
146	  Poly1305 authenticator algorithm (RFC7539)
147
148	  Architecture: PowerPC64
149	  - Power10 or later
150	  - Little-endian
151
152config CRYPTO_DEV_VMX
153        bool "Support for VMX cryptographic acceleration instructions"
154        depends on PPC64 && VSX
155        help
156          Support for VMX cryptographic acceleration instructions.
157
158config CRYPTO_DEV_VMX_ENCRYPT
159	tristate "Encryption acceleration support on P8 CPU"
160	depends on CRYPTO_DEV_VMX
161	select CRYPTO_AES
162	select CRYPTO_CBC
163	select CRYPTO_CTR
164	select CRYPTO_GHASH
165	select CRYPTO_XTS
166	default m
167	help
168	  Support for VMX cryptographic acceleration instructions on Power8 CPU.
169	  This module supports acceleration for AES and GHASH in hardware. If you
170	  choose 'M' here, this module will be called vmx-crypto.
171
172endmenu
173