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