diff options
author | Paul Duncan <pabs@pablotron.org> | 2023-09-02 23:34:55 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2023-09-02 23:34:55 -0400 |
commit | abc6db76520b4675f3fe1bba9c8d57f6d44b6015 (patch) | |
tree | 2393fcdf5a9934a9a1a8f4cdbd802aedd5f5414d /sha3.h | |
parent | 3d77edddab4447049ccd3d1e8f5b9f8f3023c037 (diff) | |
download | sha3-abc6db76520b4675f3fe1bba9c8d57f6d44b6015.tar.bz2 sha3-abc6db76520b4675f3fe1bba9c8d57f6d44b6015.zip |
sha3.[hc]: add cshake128 functions
Diffstat (limited to 'sha3.h')
-rw-r--r-- | sha3.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -36,6 +36,18 @@ _Bool shake256_xof_absorb(sha3_xof_t * const xof, const uint8_t * const m, const void shake256_xof_squeeze(sha3_xof_t * const xof, uint8_t * const dst, const size_t dst_len); 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 size_t name_len; // length of NIST function name, in bytes + const uint8_t * const custom; // customization string + const size_t custom_len; // length of customization string, in bytes +} cshake_params_t; + +void cshake128_xof_init(sha3_xof_t * const xof, const cshake_params_t params); +_Bool cshake128_xof_absorb(sha3_xof_t * const xof, const uint8_t * const msg, const size_t len); +void cshake128_xof_squeeze(sha3_xof_t * const xof, uint8_t * const dst, const size_t len); +void cshake128(const cshake_params_t params, const uint8_t * const msg, const size_t msg_len, uint8_t * const dst, const size_t dst_len); + #ifdef __cplusplus } #endif /* __cplusplus */ |