162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_cimenu "Accelerated Cryptographic Algorithms for CPU (powerpc)"
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciconfig CRYPTO_CRC32C_VPMSUM
662306a36Sopenharmony_ci	tristate "CRC32c"
762306a36Sopenharmony_ci	depends on PPC64 && ALTIVEC
862306a36Sopenharmony_ci	select CRYPTO_HASH
962306a36Sopenharmony_ci	select CRC32
1062306a36Sopenharmony_ci	help
1162306a36Sopenharmony_ci	  CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci	  Architecture: powerpc64 using
1462306a36Sopenharmony_ci	  - AltiVec extensions
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	  Enable on POWER8 and newer processors for improved performance.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciconfig CRYPTO_CRCT10DIF_VPMSUM
1962306a36Sopenharmony_ci	tristate "CRC32T10DIF"
2062306a36Sopenharmony_ci	depends on PPC64 && ALTIVEC && CRC_T10DIF
2162306a36Sopenharmony_ci	select CRYPTO_HASH
2262306a36Sopenharmony_ci	help
2362306a36Sopenharmony_ci	  CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci	  Architecture: powerpc64 using
2662306a36Sopenharmony_ci	  - AltiVec extensions
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci	  Enable on POWER8 and newer processors for improved performance.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciconfig CRYPTO_VPMSUM_TESTER
3162306a36Sopenharmony_ci	tristate "CRC32c and CRC32T10DIF hardware acceleration tester"
3262306a36Sopenharmony_ci	depends on CRYPTO_CRCT10DIF_VPMSUM && CRYPTO_CRC32C_VPMSUM
3362306a36Sopenharmony_ci	help
3462306a36Sopenharmony_ci	  Stress test for CRC32c and CRCT10DIF algorithms implemented with
3562306a36Sopenharmony_ci	  powerpc64 AltiVec extensions (POWER8 vpmsum instructions).
3662306a36Sopenharmony_ci	  Unless you are testing these algorithms, you don't need this.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciconfig CRYPTO_MD5_PPC
3962306a36Sopenharmony_ci	tristate "Digests: MD5"
4062306a36Sopenharmony_ci	depends on PPC
4162306a36Sopenharmony_ci	select CRYPTO_HASH
4262306a36Sopenharmony_ci	help
4362306a36Sopenharmony_ci	  MD5 message digest algorithm (RFC1321)
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci	  Architecture: powerpc
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciconfig CRYPTO_SHA1_PPC
4862306a36Sopenharmony_ci	tristate "Hash functions: SHA-1"
4962306a36Sopenharmony_ci	depends on PPC
5062306a36Sopenharmony_ci	help
5162306a36Sopenharmony_ci	  SHA-1 secure hash algorithm (FIPS 180)
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci	  Architecture: powerpc
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciconfig CRYPTO_SHA1_PPC_SPE
5662306a36Sopenharmony_ci	tristate "Hash functions: SHA-1 (SPE)"
5762306a36Sopenharmony_ci	depends on PPC && SPE
5862306a36Sopenharmony_ci	help
5962306a36Sopenharmony_ci	  SHA-1 secure hash algorithm (FIPS 180)
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci	  Architecture: powerpc using
6262306a36Sopenharmony_ci	  - SPE (Signal Processing Engine) extensions
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ciconfig CRYPTO_SHA256_PPC_SPE
6562306a36Sopenharmony_ci	tristate "Hash functions: SHA-224 and SHA-256 (SPE)"
6662306a36Sopenharmony_ci	depends on PPC && SPE
6762306a36Sopenharmony_ci	select CRYPTO_SHA256
6862306a36Sopenharmony_ci	select CRYPTO_HASH
6962306a36Sopenharmony_ci	help
7062306a36Sopenharmony_ci	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	  Architecture: powerpc using
7362306a36Sopenharmony_ci	  - SPE (Signal Processing Engine) extensions
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ciconfig CRYPTO_AES_PPC_SPE
7662306a36Sopenharmony_ci	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
7762306a36Sopenharmony_ci	depends on PPC && SPE
7862306a36Sopenharmony_ci	select CRYPTO_SKCIPHER
7962306a36Sopenharmony_ci	help
8062306a36Sopenharmony_ci	  Block ciphers: AES cipher algorithms (FIPS-197)
8162306a36Sopenharmony_ci	  Length-preserving ciphers: AES with ECB, CBC, CTR, and XTS modes
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci	  Architecture: powerpc using:
8462306a36Sopenharmony_ci	  - SPE (Signal Processing Engine) extensions
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci	  SPE is available for:
8762306a36Sopenharmony_ci	  - Processor Type: Freescale 8500
8862306a36Sopenharmony_ci	  - CPU selection: e500 (8540)
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci	  This module should only be used for low power (router) devices
9162306a36Sopenharmony_ci	  without hardware AES acceleration (e.g. caam crypto). It reduces the
9262306a36Sopenharmony_ci	  size of the AES tables from 16KB to 8KB + 256 bytes and mitigates
9362306a36Sopenharmony_ci	  timining attacks. Nevertheless it might be not as secure as other
9462306a36Sopenharmony_ci	  architecture specific assembler implementations that work on 1KB
9562306a36Sopenharmony_ci	  tables or 256 bytes S-boxes.
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ciconfig CRYPTO_AES_GCM_P10
9862306a36Sopenharmony_ci	tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
9962306a36Sopenharmony_ci	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
10062306a36Sopenharmony_ci	select CRYPTO_LIB_AES
10162306a36Sopenharmony_ci	select CRYPTO_ALGAPI
10262306a36Sopenharmony_ci	select CRYPTO_AEAD
10362306a36Sopenharmony_ci	select CRYPTO_SKCIPHER
10462306a36Sopenharmony_ci	help
10562306a36Sopenharmony_ci	  AEAD cipher: AES cipher algorithms (FIPS-197)
10662306a36Sopenharmony_ci	  GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
10762306a36Sopenharmony_ci	  Architecture: powerpc64 using:
10862306a36Sopenharmony_ci	    - little-endian
10962306a36Sopenharmony_ci	    - Power10 or later features
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci	  Support for cryptographic acceleration instructions on Power10 or
11262306a36Sopenharmony_ci	  later CPU. This module supports stitched acceleration for AES/GCM.
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ciconfig CRYPTO_CHACHA20_P10
11562306a36Sopenharmony_ci	tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P10 or later)"
11662306a36Sopenharmony_ci	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
11762306a36Sopenharmony_ci	select CRYPTO_SKCIPHER
11862306a36Sopenharmony_ci	select CRYPTO_LIB_CHACHA_GENERIC
11962306a36Sopenharmony_ci	select CRYPTO_ARCH_HAVE_LIB_CHACHA
12062306a36Sopenharmony_ci	help
12162306a36Sopenharmony_ci	  Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
12262306a36Sopenharmony_ci	  stream cipher algorithms
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci	  Architecture: PowerPC64
12562306a36Sopenharmony_ci	  - Power10 or later
12662306a36Sopenharmony_ci	  - Little-endian
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciconfig CRYPTO_POLY1305_P10
12962306a36Sopenharmony_ci	tristate "Hash functions: Poly1305 (P10 or later)"
13062306a36Sopenharmony_ci	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
13162306a36Sopenharmony_ci	select CRYPTO_HASH
13262306a36Sopenharmony_ci	select CRYPTO_LIB_POLY1305_GENERIC
13362306a36Sopenharmony_ci	help
13462306a36Sopenharmony_ci	  Poly1305 authenticator algorithm (RFC7539)
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ci	  Architecture: PowerPC64
13762306a36Sopenharmony_ci	  - Power10 or later
13862306a36Sopenharmony_ci	  - Little-endian
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ciendmenu
141