summaryrefslogtreecommitdiff
path: root/sha3.h
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2023-09-03 01:58:46 -0400
committerPaul Duncan <pabs@pablotron.org>2023-09-03 01:58:46 -0400
commitea91c3a517eef38c0b957a4340d1e4e9c59a9634 (patch)
tree8adb9b44f2dc4323dc6e25b39d07083a06e5d9cf /sha3.h
parentef04848edb6c6b15ade37095d5c9731b1aced982 (diff)
downloadsha3-ea91c3a517eef38c0b957a4340d1e4e9c59a9634.tar.bz2
sha3-ea91c3a517eef38c0b957a4340d1e4e9c59a9634.zip
sha3.[hc]: add kmac128(), kmac_params_t, and stub test_kmac128()
Diffstat (limited to 'sha3.h')
-rw-r--r--sha3.h11
1 files changed, 9 insertions, 2 deletions
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 */