From ea91c3a517eef38c0b957a4340d1e4e9c59a9634 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 3 Sep 2023 01:58:46 -0400 Subject: sha3.[hc]: add kmac128(), kmac_params_t, and stub test_kmac128() --- sha3.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sha3.h') diff --git a/sha3.h b/sha3.h index 99e15b5..aa75cd6 100644 --- a/sha3.h +++ b/sha3.h @@ -37,9 +37,9 @@ void shake256_xof_squeeze(sha3_xof_t * const xof, uint8_t * const dst, const siz void shake256_xof_once(const uint8_t * const src, const size_t src_len, uint8_t * const dst, const size_t dst_len); typedef struct { - const uint8_t * const name; // NIST function name + const uint8_t *name; // NIST function name const size_t name_len; // length of NIST function name, in bytes - const uint8_t * const custom; // customization string + const uint8_t *custom; // customization string const size_t custom_len; // length of customization string, in bytes } cshake_params_t; @@ -54,6 +54,13 @@ void cshake256_xof_init(sha3_xof_t * const xof, const cshake_params_t params); _Bool cshake256_xof_absorb(sha3_xof_t * const xof, const uint8_t * const msg, const size_t len); void cshake256_xof_squeeze(sha3_xof_t * const xof, uint8_t * const dst, const size_t len); +typedef struct { + const uint8_t *key; // key string + const size_t key_len; // length of key string, in bytes + const uint8_t *custom; // customization string + const size_t custom_len; // length of customization string, in bytes +} kmac_params_t; + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.3