---
name: "libkeccak_cshake_initialise"
section: "3"
platform: "linux"
package: "libkeccak"
version: "1.4.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libkeccak_cshake_initialise"
---

# libkeccak\_cshake\_initialise(3)

Initialise a sponge for cSHAKE hashing

## 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

The **libkeccak\_cshake\_suffix**() function shall be called immediately after the [**libkeccak\_state\_initialise**(3)](/libkeccak_state_initialise/3.md) function (before [**libkeccak\_update**(3)](/libkeccak_update/3.md) or [**libkeccak\_digest**(3)](/libkeccak_digest/3.md), or any variant of those functions), to provide the initialisation blocks, containing customisation data, to the Keccak sponge.

The value of the *state* parameter shall be an initialised state to feed the initialisation blocks to.

The value of the *n\_text* parameter shall be the function-name bit-string, represented in raw bytes; *n\_len* shall be value no greater than the number of whole bytes in *n\_text* and *n\_bits* shall be the number of bits in *n\_text* sans the bytes covered by *n\_len*, that is, the number of bits in *n\_text* minus *(nlen\_\*8)*. *n\_suffix* shall be either *NULL* or an appendix of bits to *n\_suffix* (neither *n\_len* nor *n\_bits* shall count these), stored as a NUL-terminated string of the ASCII digits **1** and **0**.

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 in *s\_text* and *s\_bits* shall be the number of bits in *s\_text* sans the bytes covered by *s\_len*, that is, the number of bits in *s\_text* minus *(nles\_\*8)*. *s\_suffix* shall be either *NULL* or an appendix of bits to *s\_suffix* (neither *s\_len* nor *s\_bits* shall count these), stored as a NUL-terminated string of the ASCII digits **1** and **0**.

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.

## ERRORS

The **libkeccak\_cshake\_suffix**() function cannot fail.

## SEE ALSO

[**libkeccak\_spec\_cshake**(3)](/libkeccak_spec_cshake/3.md), [**libkeccak\_generalised\_spec\_initialise**(3)](/libkeccak_generalised_spec_initialise/3.md), [**libkeccak\_state\_initialise**(3)](/libkeccak_state_initialise/3.md), [**libkeccak\_cshake\_initialise**(3)](/libkeccak_cshake_initialise/3.md), [**libkeccak\_fast\_update**(3)](/libkeccak_fast_update/3.md), [**libkeccak\_zerocopy\_update**(3)](/libkeccak_zerocopy_update/3.md), [**libkeccak\_update**(3)](/libkeccak_update/3.md), [**libkeccak\_fast\_digest**(3)](/libkeccak_fast_digest/3.md), [**libkeccak\_zerocopy\_digest**(3)](/libkeccak_zerocopy_digest/3.md), [**libkeccak\_digest**(3)](/libkeccak_digest/3.md)
