linux/lib/crypto/x86
Eric Biggers 17ba6108d3 lib/crypto: x86/sm3: Migrate optimized code into library
Instead of exposing the x86-optimized SM3 code via an x86-specific
crypto_shash algorithm, instead just implement the sm3_blocks() library
function.  This is much simpler, it makes the SM3 library functions be
x86-optimized, and it fixes the longstanding issue where the
x86-optimized SM3 code was disabled by default.  SM3 still remains
available through crypto_shash, but individual architectures no longer
need to handle it.

Tweak the prototype of sm3_transform_avx() to match what the library
expects, including changing the block count to size_t.  Note that the
assembly code actually already treated this argument as size_t.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260321040935.410034-10-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-03-23 17:50:59 -07:00
..
.gitignore lib/crypto: x86: Move arch/x86/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
aes-aesni.S lib/crypto: x86/aes: Add AES-NI optimization 2026-01-15 14:09:07 -08:00
aes.h lib/crypto: x86/aes: Add AES-NI optimization 2026-01-15 14:09:07 -08: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
gf128hash.h lib/crypto: x86/ghash: Migrate optimized code into library 2026-03-23 16:44:29 -07:00
ghash-pclmul.S lib/crypto: x86/ghash: Migrate optimized code into library 2026-03-23 16:44:29 -07:00
nh-avx2.S lib/crypto: x86/nh: Migrate optimized code into library 2026-01-12 11:07:50 -08:00
nh-sse2.S lib/crypto: x86/nh: Migrate optimized code into library 2026-01-12 11:07:50 -08:00
nh.h lib/crypto: x86/nh: Migrate optimized code into library 2026-01-12 11:07:50 -08: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
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 lib/crypto: x86/sha256: PHE Extensions optimized SHA256 transform function 2026-03-14 11:44:18 -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
sm3-avx-asm_64.S lib/crypto: x86/sm3: Migrate optimized code into library 2026-03-23 17:50:59 -07:00
sm3.h lib/crypto: x86/sm3: Migrate optimized code into library 2026-03-23 17:50:59 -07:00