linux/arch/arm64/crypto
Eric Biggers 00d549bb89 lib/crypto: arm64/sha1: Migrate optimized code into library
Instead of exposing the arm64-optimized SHA-1 code via arm64-specific
crypto_shash algorithms, instead just implement the sha1_blocks()
library function.  This is much simpler, it makes the SHA-1 library
functions be arm64-optimized, and it fixes the longstanding issue where
the arm64-optimized SHA-1 code was disabled by default.  SHA-1 still
remains available through crypto_shash, but individual architectures no
longer need to handle it.

Remove support for SHA-1 finalization from assembly code, since the
library does not yet support architecture-specific overrides of the
finalization.  (Support for that has been omitted for now, for
simplicity and because usually it isn't performance-critical.)

To match sha1_blocks(), change the type of the nblocks parameter and the
return value of __sha1_ce_transform() from int to size_t.  Update the
assembly code accordingly.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250712232329.818226-9-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-07-14 11:11:48 -07:00
..
.gitignore SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
aes-ce-ccm-core.S crypto: arm64/aes-ccm - Merge finalization into en/decrypt asm helpers 2024-01-26 16:39:32 +08:00
aes-ce-ccm-glue.c crypto: scatterwalk - Change scatterwalk_next calling convention 2025-03-15 16:21:22 +08:00
aes-ce-core.S crypto: arm64 - Use modern annotations for assembly functions 2019-12-20 14:58:35 +08:00
aes-ce-glue.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
aes-ce-setkey.h
aes-ce.S crypto: arm64/aes-ce - Simplify round key load sequence 2024-04-26 17:26:09 +08:00
aes-cipher-core.S crypto: arm64 - Use modern annotations for assembly functions 2019-12-20 14:58:35 +08:00
aes-cipher-glue.c crypto: Prepare to move crypto_tfm_ctx 2022-12-02 18:12:40 +08:00
aes-glue-ce.c crypto: arm64/aes - remove Makefile hack 2023-08-11 19:19:27 +08:00
aes-glue-neon.c crypto: arm64/aes - remove Makefile hack 2023-08-11 19:19:27 +08:00
aes-glue.c crypto: arm64/aes - Use API partial block handling 2025-04-23 15:52:47 +08:00
aes-modes.S crypto: arm64/aes-modes - use frame_push/pop macros consistently 2022-12-09 18:45:00 +08:00
aes-neon.S crypto: arm64/aes-ce - Simplify round key load sequence 2024-04-26 17:26:09 +08:00
aes-neonbs-core.S crypto: arm64/aes-neonbs - fix crash with CFI enabled 2023-03-14 17:06:44 +08:00
aes-neonbs-glue.c crypto: skcipher - Make skcipher_walk src.virt.addr const 2025-03-15 16:21:22 +08:00
ghash-ce-core.S crypto: arm64/ghash-ce - use frame_push/pop macros consistently 2022-12-09 18:45:00 +08:00
ghash-ce-glue.c crypto: arm64/ghash - Use API partial block handling 2025-04-23 11:33:47 +08:00
Kconfig lib/crypto: arm64/sha1: Migrate optimized code into library 2025-07-14 11:11:48 -07:00
Makefile lib/crypto: arm64/sha1: Migrate optimized code into library 2025-07-14 11:11:48 -07:00
nh-neon-core.S crypto: arm64/nhpoly1305 - eliminate unnecessary CFI wrapper 2022-11-25 17:39:19 +08:00
nhpoly1305-neon-glue.c crypto: arm64/nhpoly1305 - implement ->digest 2023-10-20 13:39:25 +08:00
polyval-ce-core.S crypto: arm64/polyval - Add PMULL accelerated implementation of POLYVAL 2022-06-10 16:40:18 +08:00
polyval-ce-glue.c crypto: arm64/polyval - Use API partial block handling 2025-04-28 19:40:54 +08:00
sha3-ce-core.S arm64: fpsimd: run kernel mode NEON with softirqs disabled 2021-04-12 11:55:34 +01:00
sha3-ce-glue.c crypto: arm64/sha3-ce - Use API partial block handling 2025-04-23 15:52:46 +08:00
sm3-ce-core.S arm64: Add types to indirect called assembly functions 2022-09-26 10:13:13 -07:00
sm3-ce-glue.c crypto: arm64/sm3-ce - Use API partial block handling 2025-04-23 15:52:47 +08:00
sm3-neon-core.S crypto: arm64/sm3 - fix possible crash with CFI enabled 2022-11-25 17:39:19 +08:00
sm3-neon-glue.c crypto: arm64/sm3-neon - Use API partial block handling 2025-04-23 15:52:47 +08:00
sm4-ce-asm.h crypto: arm64/sm4 - refactor and simplify CE implementation 2022-11-04 17:34:31 +08:00
sm4-ce-ccm-core.S crypto: arm64/sm4 - fix possible crash with CFI enabled 2022-12-30 17:57:42 +08:00
sm4-ce-ccm-glue.c crypto: scatterwalk - Change scatterwalk_next calling convention 2025-03-15 16:21:22 +08:00
sm4-ce-cipher-core.S crypto: arm64/sm4-ce - rename to sm4-ce-cipher 2022-04-08 16:12:47 +08:00
sm4-ce-cipher-glue.c crypto: Prepare to move crypto_tfm_ctx 2022-12-02 18:12:40 +08:00
sm4-ce-core.S crypto: arm64/sm4 - Remove cfb(sm4) 2023-12-08 11:59:45 +08:00
sm4-ce-gcm-core.S crypto: arm64/sm4 - fix possible crash with CFI enabled 2022-12-30 17:57:42 +08:00
sm4-ce-gcm-glue.c crypto: scatterwalk - Change scatterwalk_next calling convention 2025-03-15 16:21:22 +08:00
sm4-ce-glue.c crypto: arm64/sm4 - Use API partial block handling 2025-04-23 15:52:47 +08:00
sm4-ce.h crypto: arm64/sm4 - Remove cfb(sm4) 2023-12-08 11:59:45 +08:00
sm4-neon-core.S crypto: arm64/sm4 - Remove cfb(sm4) 2023-12-08 11:59:45 +08:00
sm4-neon-glue.c crypto: arm64/sm4 - Remove cfb(sm4) 2023-12-08 11:59:45 +08:00