From 83d59102b2bb5bd5d697d4a001a1ae72ea657070 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 24 Feb 2024 02:49:57 -0500 Subject: sha3.c: remove unused shake() function --- sha3.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'sha3.c') diff --git a/sha3.c b/sha3.c index 9d0d385..ee58d50 100644 --- a/sha3.c +++ b/sha3.c @@ -853,28 +853,6 @@ void hmac_sha3_512(const uint8_t * const k, const size_t k_len, const uint8_t * hmac_sha3_512_final(&hmac, dst); } -static inline void shake(const uint8_t *m, size_t m_len, uint8_t * const dst, const size_t dst_len) { - // in the sha3 xof functions, the capacity is always 2 times the - // destination length, and the rate is the total state size minus the - // capacity - const size_t rate = 200 - 2 * dst_len; - - sha3_state_t a = { .u64 = { 0 } }; - - const size_t len = keccak(&a, m, m_len, rate); - - // append suffix (s6.2) and padding - // (note: suffix and padding are ambiguous in spec) - a.u8[len] ^= 0x1f; - a.u8[rate-1] ^= 0x80; - - // permute - permute(a.u64, SHA3_NUM_ROUNDS); - - // copy to destination - memcpy(dst, a.u8, dst_len); -} - static inline void xof_init(sha3_xof_t * const xof) { memset(xof, 0, sizeof(sha3_xof_t)); } -- cgit v1.2.3