From 7518c4ccc56002ad4a74f0fef0392728ec79e692 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 29 Aug 2024 22:45:46 +0200 Subject: [PATCH] `encrypt` isn't the good verb here, since it's used for both Signed-off-by: Steffen Jaeckel --- src/ciphers/sm4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ciphers/sm4.c b/src/ciphers/sm4.c index 51a1e58e0..dc489c7c9 100644 --- a/src/ciphers/sm4.c +++ b/src/ciphers/sm4.c @@ -192,9 +192,9 @@ static LTC_INLINE void R(sm4_u32_t Y[4], sm4_u32_t X[32+4]) } /* - * defined in section 7.1 Encryption + * defined in section 7.1 (En)cryption */ -static LTC_INLINE void encrypt(sm4_u32_t Y[4], sm4_u32_t X[4+32], const sm4_u32_t rk[32]) +static LTC_INLINE void sm4_crypt(sm4_u32_t Y[4], sm4_u32_t X[4+32], const sm4_u32_t rk[32]) { int i; @@ -239,7 +239,7 @@ static LTC_INLINE void sm4_do(void *output, const void *input, const sm4_u32_t r LOAD32H(X[2], (sm4_u8_t *)input + 8); LOAD32H(X[3], (sm4_u8_t *)input + 12); - encrypt(Y, X, rk); + sm4_crypt(Y, X, rk); STORE32H(Y[0], (sm4_u8_t *)output ); STORE32H(Y[1], (sm4_u8_t *)output + 4);