cSHAKE explained in plain terms means understanding the customisable SHAKE that lets every protocol have its own hash, a design from 2016 that adds a function name and a customization string to the SHAKE sponge. The central question is why a hash would carry labels when plain SHAKE already hashes anything, and the answer is that labels stop different protocols from colliding, so cSHAKE keeps each use separate, and that separation is the whole point of the design.
cSHAKE is a customisable extendable-output function defined in NIST SP 800-185, available as cSHAKE128 and cSHAKE256. It turns a message into as many output bytes as the caller asks for, and it is built on the idea that a hash should know what it is being used for, which means the design encodes the purpose into the hash itself, and that purpose-binding is what makes it unlike the hashes of its era.
This article makes the case for cSHAKE, explains what it is, how it works, and where its ideas still earn their keep.
Key takeaways
- cSHAKE is a customisable hash from NIST SP 800-185, 2016.
- It comes as cSHAKE128 and cSHAKE256.
- It takes a function name N and a customization string S.
- It degenerates to plain SHAKE when N and S are empty.
- It is the basis for KMAC, TupleHash and ParallelHash.
What cSHAKE is
cSHAKE is a hash that turns a message into as many bytes as you ask for, and that flexibility is what makes it unusual among hashes. A fixed hash returns one size, but cSHAKE squeezes out any length, which means the same function serves fingerprints, keys and streams, and because the output is prefix-consistent, a short result is just the start of a longer one.
Its signature feature is the customization string. Most hashes hash only the message, but cSHAKE hashes the message together with a label, which means the same input gives different outputs under different labels, and because the label is part of the hash, two protocols can never collide by accident.
The design was a reaction to the cost of running separate hashes. Protocols that needed different hashes for different jobs had to maintain several functions, so NIST added customization to SHAKE, because one function with labels can serve every job, and that practicality is what made cSHAKE worth standardising.
It became one of the best-known customisable hashes in the world, and it is named in every discussion of the field. cSHAKE is the basis for KMAC, TupleHash and ParallelHash, it is defined in NIST SP 800-185, and it is still the first example engineers meet when they learn that a hash can carry a label, which means the design survives as a tool even though plain SHAKE is simpler.
Its most famous property is that it degenerates to plain SHAKE. When both the function name and the customization string are empty, cSHAKE is exactly SHAKE, which means the customization costs nothing when it is not used, and because that fallback is built in, the design never punishes the simple case.
Our guide to SHA-3 explains the sponge hash that became the standard, and our guide to SPONGENT explains the tiny sponge hash built for hardware.
How cSHAKE works
Everything starts with the function name and the customization string, which are encoded together. cSHAKE takes its N and S and encodes them with bytepad, which means the starting string depends on both, and because the encoding includes their lengths, two labels can never collide by accident.
Each step begins with the message, which is absorbed into the sponge. cSHAKE feeds the encoded label and then the message into the Keccak state, which means fresh data arrives at every step, and because the label comes first, it colours everything that follows.
The domain suffix is what makes the design work as a whole. cSHAKE uses the suffix 0x04, while plain SHAKE uses 0x1F, which means the two functions can never produce the same output for the same input, and because the suffix is a single byte, the separation costs almost nothing.
The sponge spreads the effect further. After absorbing, the state is permuted by Keccak-f with 24 rounds, which means the value is scrambled thoroughly, and because the permutation runs on the whole state, a small change in the label changes the whole output.
The squeezing is what turns the state into output. After absorbing, cSHAKE squeezes out as many bytes as the caller asked for, which means the result is any length whatever the input, and because the squeezing uses the same sponge, the design needs no extra machinery.
The output comes from the sponge, read out a block at a time. cSHAKE128 squeezes 168 bytes per permutation call and cSHAKE256 squeezes 136, which means long outputs stream out steadily, and that rate is exactly what a key-derivation function needs for its output.

Comparing cSHAKE with other sponge hashes
cSHAKE is one of several sponge hashes built on Keccak, and each was built with a different emphasis. SHA-3 is the sponge hash that became the standard, SPONGENT is the tiny sponge built for hardware, and cSHAKE is the one built for customization, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | cSHAKE | SHA-3 | SPONGENT |
|---|---|---|---|
| Output size | Arbitrary | 224 to 512 bits | 88 to 256 bits |
| Construction | Sponge, Keccak-f | Sponge, Keccak-f | Sponge, PRESENT-like |
| Customization | Yes, N and S | No | No |
| Year | 2016 | 2008 | 2011 |
| Best for | Labelled protocols | General hashing | Tiny hardware hashing |
The practical result is that cSHAKE is the right choice for labelled protocols, SHA-3 suits general hashing, and SPONGENT fits tiny hardware hashing instead.
Where cSHAKE is used
KMAC uses it as its core. The keyed hash built on cSHAKE takes its name and customization from the protocol, because a MAC needs domain separation, and that separation is the reason cSHAKE earns its keep in authentication.
TupleHash uses it to hash ordered lists. A system that hashes tuples needs each element kept separate, because a plain hash would let boundaries blur, and that separation is the reason cSHAKE appears in data structures.
ParallelHash uses it to hash in parallel. A tool that hashes large inputs wants a hash that uses every core, because a single-threaded hash wastes the machine, and that parallelism is the reason cSHAKE appears in data systems.
Standards use it as the customisable option. NIST SP 800-185 defines cSHAKE for protocols that need labels, because it is the standard way to bind a purpose, and that listing is the reason it appears in real specifications rather than only in papers.
Teaching uses it as the customization example. Courses introduce cSHAKE when they explain that a hash can carry a label, because it is the clearest case of the idea in a real design, and a student who understands cSHAKE understands why domain separation matters in protocol design.
Strengths and limits
The greatest strength of cSHAKE is its domain separation. A hash that binds a label to every output keeps protocols apart for free, and that strength is real, measured in the standards that adopted it and confirmed by the functions built on it.
It is also a strength that the design is a strict extension of SHAKE. A function that degenerates to plain SHAKE when the labels are empty needs no new code, and that compatibility is worth more than cleverness in a field where a hash that breaks old code is a hash nobody adopts.
The limits are real, though, and the biggest is that the labels are only as good as their users. A protocol that reuses one label for two jobs loses the separation, which means the safety depends on discipline, and a system that cannot keep its labels straight must use separate hashes instead.
cSHAKE checklist
- Use cSHAKE for labelled hashing, never without a clear label.
- Remember it takes a function name N and a string S.
- Note the domain suffix is 0x04, unlike SHAKE’s 0x1F.
- Compare it with SHAKE to see two kinds of sponge.
- Study bytepad, which is what encodes the labels.
- Check the rates, since 128 and 256 differ.
- Keep real secrets behind standard hashes for signatures.
- Read NIST SP 800-185 to see how the function is specified.
- Choose separate hashes when labels cannot be kept apart.
Frequently asked questions
What is cSHAKE in simple terms?
It is a 2016 customisable hash that turns any input into any length of output, with a function name and a customization string bound in.
Who defined cSHAKE?
NIST, in Special Publication 800-185, as part of the SHA-3 derived functions.
How is cSHAKE different from SHAKE?
Both are Keccak XOFs, but cSHAKE adds a function name and a customization string and uses the domain suffix 0x04 instead of 0x1F.
Is cSHAKE still secure?
Yes, it offers the same security as SHAKE with the same rates, and no practical attack is known.
Where is cSHAKE used?
In KMAC, in TupleHash, in ParallelHash, in NIST standards, and in teaching about domain separation.
When should I use cSHAKE?
When you need a labelled hash, when you build on KMAC or TupleHash, or when you study customisable hash design.
The bottom line
cSHAKE explained in one line is this: the customisable SHAKE, a 2016 design that bound a name and a label into the sponge and taught the field that a hash can know its purpose.
It is proof that a label is a security feature, and the reason it still matters is that every customisable hash designed since has been judged partly by the lesson cSHAKE taught.
This article is general information about how cSHAKE works, not advice about choosing encryption for a particular device or system.







