xref: /linux/arch/powerpc/crypto/Kconfig (revision cbc9f5bcfa72d7e58cbace18c97e4df7e3a73058)
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_LIB_CHACHA_GENERIC
99	select CRYPTO_ARCH_HAVE_LIB_CHACHA
100	default CRYPTO_LIB_CHACHA_INTERNAL
101
102config CRYPTO_POLY1305_P10
103	tristate "Hash functions: Poly1305 (P10 or later)"
104	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
105	select CRYPTO_HASH
106	select CRYPTO_LIB_POLY1305_GENERIC
107	help
108	  Poly1305 authenticator algorithm (RFC7539)
109
110	  Architecture: PowerPC64
111	  - Power10 or later
112	  - Little-endian
113
114config CRYPTO_DEV_VMX
115        bool "Support for VMX cryptographic acceleration instructions"
116        depends on PPC64 && VSX
117        help
118          Support for VMX cryptographic acceleration instructions.
119
120config CRYPTO_DEV_VMX_ENCRYPT
121	tristate "Encryption acceleration support on P8 CPU"
122	depends on CRYPTO_DEV_VMX
123	select CRYPTO_AES
124	select CRYPTO_CBC
125	select CRYPTO_CTR
126	select CRYPTO_GHASH
127	select CRYPTO_XTS
128	default m
129	help
130	  Support for VMX cryptographic acceleration instructions on Power8 CPU.
131	  This module supports acceleration for AES and GHASH in hardware. If you
132	  choose 'M' here, this module will be called vmx-crypto.
133
134endmenu
135