arch/arm64/configs/defconfig | 2 +-
arch/arm64/crypto/Kconfig | 22 --
arch/arm64/crypto/Makefile | 6 -
arch/arm64/crypto/sm3-ce-glue.c | 70 ------
arch/arm64/crypto/sm3-neon-glue.c | 67 -----
arch/loongarch/configs/loongson32_defconfig | 2 +-
arch/loongarch/configs/loongson64_defconfig | 2 +-
arch/m68k/configs/amiga_defconfig | 2 +-
arch/m68k/configs/apollo_defconfig | 2 +-
arch/m68k/configs/atari_defconfig | 2 +-
arch/m68k/configs/bvme6000_defconfig | 2 +-
arch/m68k/configs/hp300_defconfig | 2 +-
arch/m68k/configs/mac_defconfig | 2 +-
arch/m68k/configs/multi_defconfig | 2 +-
arch/m68k/configs/mvme147_defconfig | 2 +-
arch/m68k/configs/mvme16x_defconfig | 2 +-
arch/m68k/configs/q40_defconfig | 2 +-
arch/m68k/configs/sun3_defconfig | 2 +-
arch/m68k/configs/sun3x_defconfig | 2 +-
arch/riscv/crypto/Kconfig | 13 -
arch/riscv/crypto/Makefile | 3 -
arch/s390/configs/debug_defconfig | 2 +-
arch/s390/configs/defconfig | 2 +-
arch/x86/crypto/Kconfig | 13 -
arch/x86/crypto/Makefile | 3 -
arch/x86/crypto/sm3_avx_glue.c | 100 --------
crypto/Kconfig | 2 +-
crypto/Makefile | 2 +-
crypto/{sm3_generic.c => sm3.c} | 89 ++++---
crypto/testmgr.c | 2 +
drivers/crypto/Kconfig | 2 +-
drivers/crypto/starfive/Kconfig | 2 +-
drivers/crypto/starfive/jh7110-hash.c | 8 +-
include/crypto/sm3.h | 85 ++++---
include/crypto/sm3_base.h | 82 -------
lib/crypto/.kunitconfig | 1 +
lib/crypto/Kconfig | 11 +
lib/crypto/Makefile | 15 +-
.../crypto => lib/crypto/arm64}/sm3-ce-core.S | 11 +-
.../crypto/arm64}/sm3-neon-core.S | 9 +-
lib/crypto/arm64/sm3.h | 41 ++++
.../crypto/riscv}/sm3-riscv64-zvksh-zvkb.S | 3 +-
.../crypto/riscv/sm3.h | 84 +------
lib/crypto/sm3.c | 148 +++++++++--
lib/crypto/tests/Kconfig | 9 +
lib/crypto/tests/Makefile | 1 +
lib/crypto/tests/sm3-testvecs.h | 231 ++++++++++++++++++
lib/crypto/tests/sm3_kunit.c | 31 +++
.../crypto/x86}/sm3-avx-asm_64.S | 13 +-
lib/crypto/x86/sm3.h | 39 +++
scripts/crypto/gen-hash-testvecs.py | 3 +
security/integrity/ima/Kconfig | 2 +-
52 files changed, 670 insertions(+), 587 deletions(-)
delete mode 100644 arch/arm64/crypto/sm3-ce-glue.c
delete mode 100644 arch/arm64/crypto/sm3-neon-glue.c
delete mode 100644 arch/x86/crypto/sm3_avx_glue.c
rename crypto/{sm3_generic.c => sm3.c} (30%)
delete mode 100644 include/crypto/sm3_base.h
rename {arch/arm64/crypto => lib/crypto/arm64}/sm3-ce-core.S (93%)
rename {arch/arm64/crypto => lib/crypto/arm64}/sm3-neon-core.S (98%)
create mode 100644 lib/crypto/arm64/sm3.h
rename {arch/riscv/crypto => lib/crypto/riscv}/sm3-riscv64-zvksh-zvkb.S (97%)
rename arch/riscv/crypto/sm3-riscv64-glue.c => lib/crypto/riscv/sm3.h (18%)
create mode 100644 lib/crypto/tests/sm3-testvecs.h
create mode 100644 lib/crypto/tests/sm3_kunit.c
rename {arch/x86/crypto => lib/crypto/x86}/sm3-avx-asm_64.S (98%)
create mode 100644 lib/crypto/x86/sm3.h