linux/lib/crypto/arm
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
aes-cipher-core.S lib/crypto: arm/aes: Migrate optimized code into library 2026-01-12 11:39:58 -08:00
aes.h lib/crypto: arm/aes: Migrate optimized code into library 2026-01-12 11:39:58 -08:00
blake2b-neon-core.S lib/crypto: arm/blake2b: Migrate optimized code into library 2025-10-29 22:04:24 -07:00
blake2b.h lib/crypto: arm/blake2b: Move to scoped ksimd API 2025-11-12 09:57:52 -08:00
blake2s-core.S lib/crypto: arm/blake2s: Fix some comments 2025-11-05 20:30:51 -08:00
blake2s.h lib/crypto: blake2s: Drop excessive const & rename block => data 2025-10-29 22:04:24 -07:00
chacha-neon-core.S
chacha-scalar-core.S
chacha.h lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API 2025-11-12 09:51:13 +01:00
curve25519-core.S lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
curve25519.h lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API 2025-11-12 09:51:13 +01:00
gf128hash.h lib/crypto: arm/ghash: Migrate optimized code into library 2026-03-23 15:24:54 -07:00
ghash-neon-core.S lib/crypto: arm/ghash: Migrate optimized code into library 2026-03-23 15:24:54 -07:00
nh-neon-core.S lib/crypto: arm/nh: Migrate optimized code into library 2026-01-12 11:07:49 -08:00
nh.h lib/crypto: arm/nh: Migrate optimized code into library 2026-01-12 11:07:49 -08:00
poly1305-armv4.pl lib/crypto: poly1305: Consolidate into single module 2025-08-29 09:49:18 -07:00
poly1305.h lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API 2025-11-12 09:51:13 +01:00
sha1-armv4-large.S lib/crypto: arm/sha1: Migrate optimized code into library 2025-07-14 11:11:29 -07:00
sha1-armv7-neon.S lib/crypto: arm, arm64: Drop filenames from file comments 2025-11-05 20:30:51 -08:00
sha1-ce-core.S lib/crypto: arm, arm64: Drop filenames from file comments 2025-11-05 20:30:51 -08:00
sha1.h lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API 2025-11-12 09:51:13 +01:00
sha256-armv4.pl lib/crypto: sha256: Remove sha256_blocks_simd() 2025-07-04 10:18:53 -07:00
sha256-ce.S lib/crypto: arm, arm64: Drop filenames from file comments 2025-11-05 20:30:51 -08:00
sha256.h lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API 2025-11-12 09:51:13 +01:00
sha512-armv4.pl
sha512.h lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API 2025-11-12 09:51:13 +01:00