mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
Migrate the arm64 implementation of POLYVAL into lib/crypto/, wiring it up to the POLYVAL library interface. This makes the POLYVAL library be properly optimized on arm64. This drops the arm64 optimizations of polyval in the crypto_shash API. That's fine, since polyval will be removed from crypto_shash entirely since it is unneeded there. But even if it comes back, the crypto_shash API could just be implemented on top of the library API, as usual. Adjust the names and prototypes of the assembly functions to align more closely with the rest of the library code. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20251109234726.638437-5-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
224 lines
6.5 KiB
Plaintext
224 lines
6.5 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
menu "Accelerated Cryptographic Algorithms for CPU (arm64)"
|
|
|
|
config CRYPTO_GHASH_ARM64_CE
|
|
tristate "Hash functions: GHASH (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_HASH
|
|
select CRYPTO_LIB_AES
|
|
select CRYPTO_LIB_GF128MUL
|
|
select CRYPTO_AEAD
|
|
help
|
|
GCM GHASH function (NIST SP800-38D)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
|
|
config CRYPTO_NHPOLY1305_NEON
|
|
tristate "Hash functions: NHPoly1305 (NEON)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_NHPOLY1305
|
|
help
|
|
NHPoly1305 hash function (Adiantum)
|
|
|
|
Architecture: arm64 using:
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM3_NEON
|
|
tristate "Hash functions: SM3 (NEON)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_HASH
|
|
select CRYPTO_LIB_SM3
|
|
help
|
|
SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012)
|
|
|
|
Architecture: arm64 using:
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM3_ARM64_CE
|
|
tristate "Hash functions: SM3 (ARMv8.2 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_HASH
|
|
select CRYPTO_LIB_SM3
|
|
help
|
|
SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8.2 Crypto Extensions
|
|
|
|
config CRYPTO_AES_ARM64
|
|
tristate "Ciphers: AES, modes: ECB, CBC, CTR, CTS, XCTR, XTS"
|
|
select CRYPTO_AES
|
|
select CRYPTO_LIB_SHA256
|
|
help
|
|
Block ciphers: AES cipher algorithms (FIPS-197)
|
|
Length-preserving ciphers: AES with ECB, CBC, CTR, CTS,
|
|
XCTR, and XTS modes
|
|
AEAD cipher: AES with CBC, ESSIV, and SHA-256
|
|
for fscrypt and dm-crypt
|
|
|
|
Architecture: arm64
|
|
|
|
config CRYPTO_AES_ARM64_CE
|
|
tristate "Ciphers: AES (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_ALGAPI
|
|
select CRYPTO_LIB_AES
|
|
help
|
|
Block ciphers: AES cipher algorithms (FIPS-197)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
|
|
config CRYPTO_AES_ARM64_CE_BLK
|
|
tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_AES_ARM64_CE
|
|
help
|
|
Length-preserving ciphers: AES cipher algorithms (FIPS-197)
|
|
with block cipher modes:
|
|
- ECB (Electronic Codebook) mode (NIST SP800-38A)
|
|
- CBC (Cipher Block Chaining) mode (NIST SP800-38A)
|
|
- CTR (Counter) mode (NIST SP800-38A)
|
|
- XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
|
|
and IEEE 1619)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
|
|
config CRYPTO_AES_ARM64_NEON_BLK
|
|
tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (NEON)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_LIB_AES
|
|
help
|
|
Length-preserving ciphers: AES cipher algorithms (FIPS-197)
|
|
with block cipher modes:
|
|
- ECB (Electronic Codebook) mode (NIST SP800-38A)
|
|
- CBC (Cipher Block Chaining) mode (NIST SP800-38A)
|
|
- CTR (Counter) mode (NIST SP800-38A)
|
|
- XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
|
|
and IEEE 1619)
|
|
|
|
Architecture: arm64 using:
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_AES_ARM64_BS
|
|
tristate "Ciphers: AES, modes: ECB/CBC/CTR/XCTR/XTS modes (bit-sliced NEON)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_AES_ARM64_NEON_BLK
|
|
select CRYPTO_LIB_AES
|
|
help
|
|
Length-preserving ciphers: AES cipher algorithms (FIPS-197)
|
|
with block cipher modes:
|
|
- ECB (Electronic Codebook) mode (NIST SP800-38A)
|
|
- CBC (Cipher Block Chaining) mode (NIST SP800-38A)
|
|
- CTR (Counter) mode (NIST SP800-38A)
|
|
- XCTR mode for HCTR2
|
|
- XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
|
|
and IEEE 1619)
|
|
|
|
Architecture: arm64 using:
|
|
- bit-sliced algorithm
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM4_ARM64_CE
|
|
tristate "Ciphers: SM4 (ARMv8.2 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_ALGAPI
|
|
select CRYPTO_SM4
|
|
help
|
|
Block ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8.2 Crypto Extensions
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM4_ARM64_CE_BLK
|
|
tristate "Ciphers: SM4, modes: ECB/CBC/CTR/XTS (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_SM4
|
|
help
|
|
Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
|
|
with block cipher modes:
|
|
- ECB (Electronic Codebook) mode (NIST SP800-38A)
|
|
- CBC (Cipher Block Chaining) mode (NIST SP800-38A)
|
|
- CTR (Counter) mode (NIST SP800-38A)
|
|
- XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
|
|
and IEEE 1619)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM4_ARM64_NEON_BLK
|
|
tristate "Ciphers: SM4, modes: ECB/CBC/CTR (NEON)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_SM4
|
|
help
|
|
Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
|
|
with block cipher modes:
|
|
- ECB (Electronic Codebook) mode (NIST SP800-38A)
|
|
- CBC (Cipher Block Chaining) mode (NIST SP800-38A)
|
|
- CTR (Counter) mode (NIST SP800-38A)
|
|
|
|
Architecture: arm64 using:
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_AES_ARM64_CE_CCM
|
|
tristate "AEAD cipher: AES in CCM mode (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_ALGAPI
|
|
select CRYPTO_AES_ARM64_CE
|
|
select CRYPTO_AES_ARM64_CE_BLK
|
|
select CRYPTO_AEAD
|
|
select CRYPTO_LIB_AES
|
|
help
|
|
AEAD cipher: AES cipher algorithms (FIPS-197) with
|
|
CCM (Counter with Cipher Block Chaining-Message Authentication Code)
|
|
authenticated encryption mode (NIST SP800-38C)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM4_ARM64_CE_CCM
|
|
tristate "AEAD cipher: SM4 in CCM mode (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_ALGAPI
|
|
select CRYPTO_AEAD
|
|
select CRYPTO_SM4
|
|
select CRYPTO_SM4_ARM64_CE_BLK
|
|
help
|
|
AEAD cipher: SM4 cipher algorithms (OSCCA GB/T 32907-2016) with
|
|
CCM (Counter with Cipher Block Chaining-Message Authentication Code)
|
|
authenticated encryption mode (NIST SP800-38C)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
config CRYPTO_SM4_ARM64_CE_GCM
|
|
tristate "AEAD cipher: SM4 in GCM mode (ARMv8 Crypto Extensions)"
|
|
depends on KERNEL_MODE_NEON
|
|
select CRYPTO_ALGAPI
|
|
select CRYPTO_AEAD
|
|
select CRYPTO_SM4
|
|
select CRYPTO_SM4_ARM64_CE_BLK
|
|
help
|
|
AEAD cipher: SM4 cipher algorithms (OSCCA GB/T 32907-2016) with
|
|
GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
|
|
|
|
Architecture: arm64 using:
|
|
- ARMv8 Crypto Extensions
|
|
- PMULL (Polynomial Multiply Long) instructions
|
|
- NEON (Advanced SIMD) extensions
|
|
|
|
endmenu
|
|
|