mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 10:10:30 -05:00
Reorganize the Curve25519 library code: - Build a single libcurve25519 module, instead of up to three modules: libcurve25519, libcurve25519-generic, and an arch-specific module. - Move the arch-specific Curve25519 code from arch/$(SRCARCH)/crypto/ to lib/crypto/$(SRCARCH)/. Centralize the build rules into lib/crypto/Makefile and lib/crypto/Kconfig. - Include the arch-specific code directly in lib/crypto/curve25519.c via a header, rather than using a separate .c file. - Eliminate the entanglement with CRYPTO. CRYPTO_LIB_CURVE25519 no longer selects CRYPTO, and the arch-specific Curve25519 code no longer depends on CRYPTO. This brings Curve25519 in line with the latest conventions for lib/crypto/, used by other algorithms. The exception is that I kept the generic code in separate translation units for now. (Some of the function names collide between the x86 and generic Curve25519 code. And the Curve25519 functions are very long anyway, so inlining doesn't matter as much for Curve25519 as it does for some other algorithms.) Link: https://lore.kernel.org/r/20250906213523.84915-11-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
menu "Accelerated Cryptographic Algorithms for CPU (powerpc)"
|
|
|
|
config CRYPTO_AES_PPC_SPE
|
|
tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
|
|
depends on SPE
|
|
select CRYPTO_SKCIPHER
|
|
help
|
|
Block ciphers: AES cipher algorithms (FIPS-197)
|
|
Length-preserving ciphers: AES with ECB, CBC, CTR, and XTS modes
|
|
|
|
Architecture: powerpc using:
|
|
- SPE (Signal Processing Engine) extensions
|
|
|
|
SPE is available for:
|
|
- Processor Type: Freescale 8500
|
|
- CPU selection: e500 (8540)
|
|
|
|
This module should only be used for low power (router) devices
|
|
without hardware AES acceleration (e.g. caam crypto). It reduces the
|
|
size of the AES tables from 16KB to 8KB + 256 bytes and mitigates
|
|
timining attacks. Nevertheless it might be not as secure as other
|
|
architecture specific assembler implementations that work on 1KB
|
|
tables or 256 bytes S-boxes.
|
|
|
|
config CRYPTO_AES_GCM_P10
|
|
tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
|
|
depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
|
|
select CRYPTO_LIB_AES
|
|
select CRYPTO_ALGAPI
|
|
select CRYPTO_AEAD
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_SIMD
|
|
help
|
|
AEAD cipher: AES cipher algorithms (FIPS-197)
|
|
GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
|
|
Architecture: powerpc64 using:
|
|
- little-endian
|
|
- Power10 or later features
|
|
|
|
Support for cryptographic acceleration instructions on Power10 or
|
|
later CPU. This module supports stitched acceleration for AES/GCM.
|
|
|
|
config CRYPTO_DEV_VMX
|
|
bool "Support for VMX cryptographic acceleration instructions"
|
|
depends on PPC64 && VSX
|
|
help
|
|
Support for VMX cryptographic acceleration instructions.
|
|
|
|
config CRYPTO_DEV_VMX_ENCRYPT
|
|
tristate "Encryption acceleration support on P8 CPU"
|
|
depends on CRYPTO_DEV_VMX
|
|
select CRYPTO_AES
|
|
select CRYPTO_CBC
|
|
select CRYPTO_CTR
|
|
select CRYPTO_GHASH
|
|
select CRYPTO_XTS
|
|
default m
|
|
help
|
|
Support for VMX cryptographic acceleration instructions on Power8 CPU.
|
|
This module supports acceleration for AES and GHASH in hardware. If you
|
|
choose 'M' here, this module will be called vmx-crypto.
|
|
|
|
endmenu
|