linux/arch/arm/crypto
Eric Biggers 71e59795c9 lib/crypto: arm/ghash: Migrate optimized code into library
Remove the "ghash-neon" crypto_shash algorithm.  Move the corresponding
assembly code into lib/crypto/, and wire it up to the GHASH library.

This makes the GHASH library be optimized on arm (though only with NEON,
not PMULL; for now the goal is just parity with crypto_shash).  It
greatly reduces the amount of arm-specific glue code that is needed, and
it fixes the issue where this optimization was disabled by default.

To integrate the assembly code correctly with the library, make the
following tweaks:

- Change the type of 'blocks' from int to size_t.
- Change the types of 'dg' and 'h' to polyval_elem.  Note that this
  simply reflects the format that the code was already using, at least
  on little endian CPUs.  For big endian CPUs, add byte-swaps.
- Remove the 'head' argument, which is no longer needed.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260319061723.1140720-8-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-03-23 15:24:54 -07:00
..
.gitignore SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
aes-ce-core.S crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata 2020-12-04 18:13:14 +11:00
aes-ce-glue.c crypto: arm/aes-ce - stop using the SIMD helper 2025-04-07 13:22:27 +08:00
aes-neonbs-core.S crypto: arm/aes-neonbs-ctr - deal with non-multiples of AES block size 2022-02-05 15:10:51 +11:00
aes-neonbs-glue.c crypto: arm/aes-neonbs - Use AES library for single blocks 2026-01-12 11:39:58 -08:00
ghash-ce-core.S crypto: arm/ghash - Move NEON GHASH assembly into its own file 2026-03-23 14:56:32 -07:00
ghash-ce-glue.c lib/crypto: arm/ghash: Migrate optimized code into library 2026-03-23 15:24:54 -07:00
Kconfig lib/crypto: arm/ghash: Migrate optimized code into library 2026-03-23 15:24:54 -07:00
Makefile lib/crypto: arm/ghash: Migrate optimized code into library 2026-03-23 15:24:54 -07:00