LIBKECCAK_CSHAKE_INITIALISE(3)
Hey bestie, welcome to LIBKECCAK_..._INITIALISE(3) from the Library Functions Manual β¨ this one's all about getting your cSHAKE sponge ready to slay.
π NAME π
libkeccak_cshake_initialise β initialise a sponge for cSHAKE hashing
β¨ SYNOPSIS β¨
#include <libkeccak.h>
void libkeccak_cshake_initialise(struct libkeccak_state *restrict state,
const void *n_text, size_t n_len, size_t n_bits, const char *n_suffix,
const void *s_text, size_t s_len, size_t s_bits, const char *s_suffix);
Link with -lkeccak.
π§ DESCRIPTION π§
Okay so, plot twist: the DESCRIPTION says the libkeccak_cshake_suffix() function shall be called immediately after the libkeccak_state_initialise(3) function (before libkeccak_update(3) or libkeccak_digest(3), or any variant of those functions), to provide the initialisation blocks, containing customisation data, to the Keccak sponge. I'm just relaying the lore, bestie π
The value of the state parameter shall be an initialised state to feed the initialisation blocks to.
n_textβ shall be the function-name bit-string, represented in raw bytes.n_lenβ shall be value no greater than the number of whole bytes inn_text.n_bitsβ shall be the number of bits inn_textsans the bytes covered byn_len, that is, the number of bits inn_textminus(nlen_*8).n_suffixβ shall be eitherNULLor an appendix of bits ton_suffix(neithern_lennorn_bitsshall count these), stored as a NUL-terminated string of the ASCII digits1and0.
The value of the s_text parameter shall be the customisation bit-string, represented in raw bytes.
s_lenβ shall be value no greater than the number of whole bytes ins_text.s_bitsβ shall be the number of bits ins_textsans the bytes covered bys_len, that is, the number of bits ins_textminus(nles_*8).s_suffixβ shall be eitherNULLor an appendix of bits tos_suffix(neithers_lennors_bitsshall count these), stored as a NUL-terminated string of the ASCII digits1and0.
For the n_suffix and s_suffix parameters, NULL is treated as the empty string π«Ά
π RETURN VALUES π
The libkeccak_cshake_suffix() function does not return a value. No return value, periodt π
π ERRORS π
The libkeccak_cshake_suffix() function cannot fail. It's giving flawless, honestly β¨
π SEE ALSO π
libkeccak_spec_cshake(3)libkeccak_generalised_spec_initialise(3)libkeccak_state_initialise(3)libkeccak_cshake_initialise(3)libkeccak_fast_update(3)libkeccak_zerocopy_update(3)libkeccak_update(3)libkeccak_fast_digest(3)libkeccak_zerocopy_digest(3)libkeccak_digest(3)
xoxo, signing off from the LIBKECCAK manual π page LIBKECCAK_..._INITIALISE(3) β no date in the footer, so we're keeping it mysterious π
π¦ where this page comes from
- arch rolling: libkeccak 1.4.3-1 Β· custom:ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- opensuse-leap 16.0: libkeccak-devel 1.4-bp160.1.13 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms