aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2023-09-06 01:56:23 -0400
committerPaul Duncan <pabs@pablotron.org>2023-09-06 01:56:23 -0400
commit1f51b90f75b5898ff4a58f15e0f59c71e185b490 (patch)
tree963302deaa3e41c2dd5ef9b51341b35d4620551c
parent6b92290bcf82a946646892f909872fa17a63dbe2 (diff)
downloadsha3-1f51b90f75b5898ff4a58f15e0f59c71e185b490.tar.bz2
sha3-1f51b90f75b5898ff4a58f15e0f59c71e185b490.zip
./sha3.h: add kangarootwelve{,_custom}()
-rw-r--r--sha3.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/sha3.h b/sha3.h
index 51d5025..73fb7e2 100644
--- a/sha3.h
+++ b/sha3.h
@@ -1291,6 +1291,35 @@ _Bool turboshake256_absorb(turboshake_t *ts, const uint8_t *src, const size_t le
*/
void turboshake256_squeeze(turboshake_t *ts, uint8_t *dst, const size_t len);
+/**
+ * Initialize internal KangarooTwelve context, absorb `src_len` bytes of
+ * input from source buffer `src`, then squeeze `dst_len` bytes of
+ * output into destination buffer `dst`.
+ *
+ * @param[in] custom Custom string buffer.
+ * @param[in] custom_len Custom string length, in bytes.
+ * @param[in] src Source buffer.
+ * @param[in] src_len Source buffer length, in bytes.
+ * @param[out] dst Destination buffer.
+ * @param[in] dst_len Destination buffer length, in bytes.
+ */
+void kangarootwelve(const uint8_t *custom, const size_t custom_len, const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len);
+
+/**
+ * Initialize internal KangarooTwelve context with custom string
+ * `custom` of length `custom_len`, absorb `src_len` bytes of input from
+ * source buffer `src`, then squeeze `dst_len` bytes of output into
+ * destination buffer `dst`.
+ *
+ * @param[in] custom Custom string buffer.
+ * @param[in] custom_len Custom string length, in bytes.
+ * @param[in] src Source buffer.
+ * @param[in] src_len Source buffer length, in bytes.
+ * @param[out] dst Destination buffer.
+ * @param[in] dst_len Destination buffer length, in bytes.
+ */
+void kangarootwelve_custom(const uint8_t *custom, const size_t custom_len, const uint8_t *src, const size_t src_len, uint8_t *dst, const size_t dst_len);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */