xref: /linux/arch/powerpc/crypto/Kconfig (revision 161fca7e3e905d5e99dbd79ed55d9212e6d80eb0)
16a490a4eSRobert Elliott# SPDX-License-Identifier: GPL-2.0
26a490a4eSRobert Elliott
36a490a4eSRobert Elliottmenu "Accelerated Cryptographic Algorithms for CPU (powerpc)"
46a490a4eSRobert Elliott
56a490a4eSRobert Elliottconfig CRYPTO_CRC32C_VPMSUM
6ec84348dSRobert Elliott	tristate "CRC32c"
76a490a4eSRobert Elliott	depends on PPC64 && ALTIVEC
86a490a4eSRobert Elliott	select CRYPTO_HASH
96a490a4eSRobert Elliott	select CRC32
106a490a4eSRobert Elliott	help
11ec84348dSRobert Elliott	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
12ec84348dSRobert Elliott
13ec84348dSRobert Elliott	  Architecture: powerpc64 using
14ec84348dSRobert Elliott	  - AltiVec extensions
15ec84348dSRobert Elliott
16ec84348dSRobert Elliott	  Enable on POWER8 and newer processors for improved performance.
176a490a4eSRobert Elliott
186a490a4eSRobert Elliottconfig CRYPTO_CRCT10DIF_VPMSUM
19ec84348dSRobert Elliott	tristate "CRC32T10DIF"
206a490a4eSRobert Elliott	depends on PPC64 && ALTIVEC && CRC_T10DIF
216a490a4eSRobert Elliott	select CRYPTO_HASH
226a490a4eSRobert Elliott	help
23ec84348dSRobert Elliott	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
24ec84348dSRobert Elliott
25ec84348dSRobert Elliott	  Architecture: powerpc64 using
26ec84348dSRobert Elliott	  - AltiVec extensions
27ec84348dSRobert Elliott
28ec84348dSRobert Elliott	  Enable on POWER8 and newer processors for improved performance.
296a490a4eSRobert Elliott
306a490a4eSRobert Elliottconfig CRYPTO_VPMSUM_TESTER
31ec84348dSRobert Elliott	tristate "CRC32c and CRC32T10DIF hardware acceleration tester"
326a490a4eSRobert Elliott	depends on CRYPTO_CRCT10DIF_VPMSUM && CRYPTO_CRC32C_VPMSUM
336a490a4eSRobert Elliott	help
34ec84348dSRobert Elliott	  Stress test for CRC32c and CRCT10DIF algorithms implemented with
35ec84348dSRobert Elliott	  powerpc64 AltiVec extensions (POWER8 vpmsum instructions).
366a490a4eSRobert Elliott	  Unless you are testing these algorithms, you don't need this.
376a490a4eSRobert Elliott
386a490a4eSRobert Elliottconfig CRYPTO_MD5_PPC
393f342a23SRobert Elliott	tristate "Digests: MD5"
406a490a4eSRobert Elliott	depends on PPC
416a490a4eSRobert Elliott	select CRYPTO_HASH
426a490a4eSRobert Elliott	help
433f342a23SRobert Elliott	  MD5 message digest algorithm (RFC1321)
443f342a23SRobert Elliott
453f342a23SRobert Elliott	  Architecture: powerpc
466a490a4eSRobert Elliott
476a490a4eSRobert Elliottconfig CRYPTO_SHA1_PPC
483f342a23SRobert Elliott	tristate "Hash functions: SHA-1"
496a490a4eSRobert Elliott	depends on PPC
506a490a4eSRobert Elliott	help
513f342a23SRobert Elliott	  SHA-1 secure hash algorithm (FIPS 180)
523f342a23SRobert Elliott
533f342a23SRobert Elliott	  Architecture: powerpc
546a490a4eSRobert Elliott
556a490a4eSRobert Elliottconfig CRYPTO_SHA1_PPC_SPE
563f342a23SRobert Elliott	tristate "Hash functions: SHA-1 (SPE)"
576a490a4eSRobert Elliott	depends on PPC && SPE
586a490a4eSRobert Elliott	help
593f342a23SRobert Elliott	  SHA-1 secure hash algorithm (FIPS 180)
603f342a23SRobert Elliott
613f342a23SRobert Elliott	  Architecture: powerpc using
623f342a23SRobert Elliott	  - SPE (Signal Processing Engine) extensions
636a490a4eSRobert Elliott
646a490a4eSRobert Elliottconfig CRYPTO_SHA256_PPC_SPE
653f342a23SRobert Elliott	tristate "Hash functions: SHA-224 and SHA-256 (SPE)"
666a490a4eSRobert Elliott	depends on PPC && SPE
676a490a4eSRobert Elliott	select CRYPTO_SHA256
686a490a4eSRobert Elliott	select CRYPTO_HASH
696a490a4eSRobert Elliott	help
703f342a23SRobert Elliott	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
713f342a23SRobert Elliott
723f342a23SRobert Elliott	  Architecture: powerpc using
733f342a23SRobert Elliott	  - SPE (Signal Processing Engine) extensions
746a490a4eSRobert Elliott
756a490a4eSRobert Elliottconfig CRYPTO_AES_PPC_SPE
76cf514b2aSRobert Elliott	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
776a490a4eSRobert Elliott	depends on PPC && SPE
786a490a4eSRobert Elliott	select CRYPTO_SKCIPHER
796a490a4eSRobert Elliott	help
80cf514b2aSRobert Elliott	  Block ciphers: AES cipher algorithms (FIPS-197)
81cf514b2aSRobert Elliott	  Length-preserving ciphers: AES with ECB, CBC, CTR, and XTS modes
82cf514b2aSRobert Elliott
83cf514b2aSRobert Elliott	  Architecture: powerpc using:
84cf514b2aSRobert Elliott	  - SPE (Signal Processing Engine) extensions
85cf514b2aSRobert Elliott
86cf514b2aSRobert Elliott	  SPE is available for:
87cf514b2aSRobert Elliott	  - Processor Type: Freescale 8500
88cf514b2aSRobert Elliott	  - CPU selection: e500 (8540)
89cf514b2aSRobert Elliott
906a490a4eSRobert Elliott	  This module should only be used for low power (router) devices
916a490a4eSRobert Elliott	  without hardware AES acceleration (e.g. caam crypto). It reduces the
926a490a4eSRobert Elliott	  size of the AES tables from 16KB to 8KB + 256 bytes and mitigates
936a490a4eSRobert Elliott	  timining attacks. Nevertheless it might be not as secure as other
946a490a4eSRobert Elliott	  architecture specific assembler implementations that work on 1KB
956a490a4eSRobert Elliott	  tables or 256 bytes S-boxes.
966a490a4eSRobert Elliott
9745a4672bSDanny Tsenconfig CRYPTO_AES_GCM_P10
9845a4672bSDanny Tsen	tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
998133a3f0SMichael Ellerman	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
10045a4672bSDanny Tsen	select CRYPTO_LIB_AES
10145a4672bSDanny Tsen	select CRYPTO_ALGAPI
10245a4672bSDanny Tsen	select CRYPTO_AEAD
10345a4672bSDanny Tsen	default m
10445a4672bSDanny Tsen	help
10545a4672bSDanny Tsen	  AEAD cipher: AES cipher algorithms (FIPS-197)
10645a4672bSDanny Tsen	  GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
10745a4672bSDanny Tsen	  Architecture: powerpc64 using:
10845a4672bSDanny Tsen	    - little-endian
10945a4672bSDanny Tsen	    - Power10 or later features
11045a4672bSDanny Tsen
11145a4672bSDanny Tsen	  Support for cryptographic acceleration instructions on Power10 or
11245a4672bSDanny Tsen	  later CPU. This module supports stitched acceleration for AES/GCM.
11345a4672bSDanny Tsen
114*161fca7eSDanny Tsenconfig CRYPTO_CHACHA20_P10
115*161fca7eSDanny Tsen	tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P10 or later)"
116*161fca7eSDanny Tsen	depends on PPC64 && CPU_LITTLE_ENDIAN
117*161fca7eSDanny Tsen	select CRYPTO_SKCIPHER
118*161fca7eSDanny Tsen	select CRYPTO_LIB_CHACHA_GENERIC
119*161fca7eSDanny Tsen	select CRYPTO_ARCH_HAVE_LIB_CHACHA
120*161fca7eSDanny Tsen	help
121*161fca7eSDanny Tsen	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
122*161fca7eSDanny Tsen	  stream cipher algorithms
123*161fca7eSDanny Tsen
124*161fca7eSDanny Tsen	  Architecture: PowerPC64
125*161fca7eSDanny Tsen	  - Power10 or later
126*161fca7eSDanny Tsen	  - Little-endian
127*161fca7eSDanny Tsen
128*161fca7eSDanny Tsenconfig CRYPTO_POLY1305_P10
129*161fca7eSDanny Tsen	tristate "Hash functions: Poly1305 (P10 or later)"
130*161fca7eSDanny Tsen	depends on PPC64 && CPU_LITTLE_ENDIAN
131*161fca7eSDanny Tsen	select CRYPTO_HASH
132*161fca7eSDanny Tsen	select CRYPTO_LIB_POLY1305_GENERIC
133*161fca7eSDanny Tsen	help
134*161fca7eSDanny Tsen	  Poly1305 authenticator algorithm (RFC7539)
135*161fca7eSDanny Tsen
136*161fca7eSDanny Tsen	  Architecture: PowerPC64
137*161fca7eSDanny Tsen	  - Power10 or later
138*161fca7eSDanny Tsen	  - Little-endian
139*161fca7eSDanny Tsen
1406a490a4eSRobert Elliottendmenu
141