diff options
author | Paul Duncan <pabs@pablotron.org> | 2023-09-06 01:56:23 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2023-09-06 01:56:23 -0400 |
commit | 1f51b90f75b5898ff4a58f15e0f59c71e185b490 (patch) | |
tree | 963302deaa3e41c2dd5ef9b51341b35d4620551c /sha3.h | |
parent | 6b92290bcf82a946646892f909872fa17a63dbe2 (diff) | |
download | sha3-1f51b90f75b5898ff4a58f15e0f59c71e185b490.tar.bz2 sha3-1f51b90f75b5898ff4a58f15e0f59c71e185b490.zip |
./sha3.h: add kangarootwelve{,_custom}()
Diffstat (limited to 'sha3.h')
-rw-r--r-- | sha3.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -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 */ |