xref: /linux/arch/powerpc/crypto/Kconfig (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (powerpc)"
4
5config CRYPTO_CURVE25519_PPC64
6	tristate
7	depends on PPC64 && CPU_LITTLE_ENDIAN
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: PowerPC64
16	  - Little-endian
17
18config CRYPTO_MD5_PPC
19	tristate "Digests: MD5"
20	depends on PPC
21	select CRYPTO_HASH
22	help
23	  MD5 message digest algorithm (RFC1321)
24
25	  Architecture: powerpc
26
27config CRYPTO_SHA1_PPC
28	tristate "Hash functions: SHA-1"
29	depends on PPC
30	help
31	  SHA-1 secure hash algorithm (FIPS 180)
32
33	  Architecture: powerpc
34
35config CRYPTO_SHA1_PPC_SPE
36	tristate "Hash functions: SHA-1 (SPE)"
37	depends on PPC && SPE
38	help
39	  SHA-1 secure hash algorithm (FIPS 180)
40
41	  Architecture: powerpc using
42	  - SPE (Signal Processing Engine) extensions
43
44config CRYPTO_SHA256_PPC_SPE
45	tristate "Hash functions: SHA-224 and SHA-256 (SPE)"
46	depends on PPC && SPE
47	select CRYPTO_SHA256
48	select CRYPTO_HASH
49	help
50	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
51
52	  Architecture: powerpc using
53	  - SPE (Signal Processing Engine) extensions
54
55config CRYPTO_AES_PPC_SPE
56	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
57	depends on PPC && SPE
58	select CRYPTO_SKCIPHER
59	help
60	  Block ciphers: AES cipher algorithms (FIPS-197)
61	  Length-preserving ciphers: AES with ECB, CBC, CTR, and XTS modes
62
63	  Architecture: powerpc using:
64	  - SPE (Signal Processing Engine) extensions
65
66	  SPE is available for:
67	  - Processor Type: Freescale 8500
68	  - CPU selection: e500 (8540)
69
70	  This module should only be used for low power (router) devices
71	  without hardware AES acceleration (e.g. caam crypto). It reduces the
72	  size of the AES tables from 16KB to 8KB + 256 bytes and mitigates
73	  timining attacks. Nevertheless it might be not as secure as other
74	  architecture specific assembler implementations that work on 1KB
75	  tables or 256 bytes S-boxes.
76
77config CRYPTO_AES_GCM_P10
78	tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
79	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
80	select CRYPTO_LIB_AES
81	select CRYPTO_ALGAPI
82	select CRYPTO_AEAD
83	select CRYPTO_SKCIPHER
84	select CRYPTO_SIMD
85	help
86	  AEAD cipher: AES cipher algorithms (FIPS-197)
87	  GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
88	  Architecture: powerpc64 using:
89	    - little-endian
90	    - Power10 or later features
91
92	  Support for cryptographic acceleration instructions on Power10 or
93	  later CPU. This module supports stitched acceleration for AES/GCM.
94
95config CRYPTO_CHACHA20_P10
96	tristate
97	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
98	select CRYPTO_SKCIPHER
99	select CRYPTO_LIB_CHACHA_GENERIC
100	select CRYPTO_ARCH_HAVE_LIB_CHACHA
101	default CRYPTO_LIB_CHACHA_INTERNAL
102	help
103	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
104	  stream cipher algorithms
105
106	  Architecture: PowerPC64
107	  - Power10 or later
108	  - Little-endian
109
110config CRYPTO_POLY1305_P10
111	tristate "Hash functions: Poly1305 (P10 or later)"
112	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
113	select CRYPTO_HASH
114	select CRYPTO_LIB_POLY1305_GENERIC
115	help
116	  Poly1305 authenticator algorithm (RFC7539)
117
118	  Architecture: PowerPC64
119	  - Power10 or later
120	  - Little-endian
121
122config CRYPTO_DEV_VMX
123        bool "Support for VMX cryptographic acceleration instructions"
124        depends on PPC64 && VSX
125        help
126          Support for VMX cryptographic acceleration instructions.
127
128config CRYPTO_DEV_VMX_ENCRYPT
129	tristate "Encryption acceleration support on P8 CPU"
130	depends on CRYPTO_DEV_VMX
131	select CRYPTO_AES
132	select CRYPTO_CBC
133	select CRYPTO_CTR
134	select CRYPTO_GHASH
135	select CRYPTO_XTS
136	default m
137	help
138	  Support for VMX cryptographic acceleration instructions on Power8 CPU.
139	  This module supports acceleration for AES and GHASH in hardware. If you
140	  choose 'M' here, this module will be called vmx-crypto.
141
142endmenu
143