linux/lib/crypto/x86
Eric Biggers 4d8da35579 lib/crypto: x86/polyval: Migrate optimized code into library
Migrate the x86_64 implementation of POLYVAL into lib/crypto/, wiring it
up to the POLYVAL library interface.  This makes the POLYVAL library be
properly optimized on x86_64.

This drops the x86_64 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.

Also replace a movaps instruction with movups to remove the assumption
that the key struct is 16-byte aligned.  Users can still align the key
if they want (and at least in this case, movups is just as fast as
movaps), but it's inconvenient to require it.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251109234726.638437-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-11-11 11:03:38 -08:00
..
.gitignore lib/crypto: x86: Move arch/x86/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
blake2s-core.S lib/crypto: x86/blake2s: Use vpternlogd for 3-input XORs 2025-11-05 20:30:52 -08:00
blake2s.h lib/crypto: blake2s: Drop excessive const & rename block => data 2025-10-29 22:04:24 -07:00
chacha-avx2-x86_64.S lib/crypto: x86: Move arch/x86/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
chacha-avx512vl-x86_64.S lib/crypto: x86: Move arch/x86/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
chacha-ssse3-x86_64.S lib/crypto: x86: Move arch/x86/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
chacha.h lib/crypto: chacha: Consolidate into single module 2025-08-29 09:50:19 -07:00
curve25519.h lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
poly1305-x86_64-cryptogams.pl lib/crypto: poly1305: Consolidate into single module 2025-08-29 09:49:18 -07:00
poly1305.h lib/crypto: poly1305: Consolidate into single module 2025-08-29 09:49:18 -07:00
polyval-pclmul-avx.S lib/crypto: x86/polyval: Migrate optimized code into library 2025-11-11 11:03:38 -08:00
polyval.h lib/crypto: x86/polyval: Migrate optimized code into library 2025-11-11 11:03:38 -08:00
sha1-avx2-asm.S lib/crypto: x86/sha1: Migrate optimized code into library 2025-07-14 11:28:35 -07:00
sha1-ni-asm.S lib/crypto: x86/sha1-ni: Convert to use rounds macros 2025-07-20 21:42:42 -07:00
sha1-ssse3-and-avx.S lib/crypto: x86/sha1: Migrate optimized code into library 2025-07-14 11:28:35 -07:00
sha1.h lib/crypto: Drop inline from all *_mod_init_arch() functions 2025-08-27 08:15:35 -07:00
sha256-avx-asm.S lib/crypto: x86/sha256: Remove unnecessary checks for nblocks==0 2025-07-04 10:23:56 -07:00
sha256-avx2-asm.S lib/crypto: x86/sha256: Remove unnecessary checks for nblocks==0 2025-07-04 10:23:56 -07:00
sha256-ni-asm.S lib/crypto: x86/sha256: Add support for 2-way interleaved hashing 2025-09-17 13:09:40 -05:00
sha256-ssse3-asm.S lib/crypto: x86/sha256: Remove unnecessary checks for nblocks==0 2025-07-04 10:23:56 -07:00
sha256.h Optimize fsverity with 2-way interleaved hashing 2025-09-29 15:55:20 -07:00
sha512-avx-asm.S
sha512-avx2-asm.S
sha512-ssse3-asm.S
sha512.h lib/crypto: Drop inline from all *_mod_init_arch() functions 2025-08-27 08:15:35 -07:00