From: Eric Biggers Date: Sat, 21 Mar 2026 04:09:25 +0000 (-0700) Subject: crypto: sm3 - Remove sm3_zero_message_hash and SM3_T[1-2] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77e4ca814c2824d7aa0c4170678bfbc6e3caa556;p=thirdparty%2Fkernel%2Fstable.git crypto: sm3 - Remove sm3_zero_message_hash and SM3_T[1-2] Remove these, since they are unused. Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20260321040935.410034-3-ebiggers@kernel.org Signed-off-by: Eric Biggers --- diff --git a/crypto/sm3_generic.c b/crypto/sm3_generic.c index 7529139fcc96..0c606f526347 100644 --- a/crypto/sm3_generic.c +++ b/crypto/sm3_generic.c @@ -14,14 +14,6 @@ #include #include -const u8 sm3_zero_message_hash[SM3_DIGEST_SIZE] = { - 0x1A, 0xB2, 0x1D, 0x83, 0x55, 0xCF, 0xA1, 0x7F, - 0x8e, 0x61, 0x19, 0x48, 0x31, 0xE8, 0x1A, 0x8F, - 0x22, 0xBE, 0xC8, 0xC7, 0x28, 0xFE, 0xFB, 0x74, - 0x7E, 0xD0, 0x35, 0xEB, 0x50, 0x82, 0xAA, 0x2B -}; -EXPORT_SYMBOL_GPL(sm3_zero_message_hash); - static int crypto_sm3_update(struct shash_desc *desc, const u8 *data, unsigned int len) { diff --git a/include/crypto/sm3.h b/include/crypto/sm3.h index c09f6bf4c0bf..918d318795ef 100644 --- a/include/crypto/sm3.h +++ b/include/crypto/sm3.h @@ -16,9 +16,6 @@ #define SM3_BLOCK_SIZE 64 #define SM3_STATE_SIZE 40 -#define SM3_T1 0x79CC4519 -#define SM3_T2 0x7A879D8A - #define SM3_IVA 0x7380166f #define SM3_IVB 0x4914b2b9 #define SM3_IVC 0x172442d7 @@ -28,8 +25,6 @@ #define SM3_IVG 0xe38dee4d #define SM3_IVH 0xb0fb0e4e -extern const u8 sm3_zero_message_hash[SM3_DIGEST_SIZE]; - struct sm3_state { u32 state[SM3_DIGEST_SIZE / 4]; u64 count;