XOF family

cSHAKE

Customisable SHAKE from SP 800-185, adding function-name and customisation strings

standard 2 variants NIST SP 800-185

Overview

cSHAKE is a customisable variant of SHAKE defined in NIST SP 800-185. It adds two inputs, a function name and a customisation string, so that different applications obtain independent functions from the same Keccak sponge.

cSHAKE encodes the function name N and customisation string S with length prefixes, pads them to a multiple of the sponge rate, and absorbs this block before the message, using a different domain-separation suffix from SHAKE. When both N and S are empty, cSHAKE is defined to be identical to SHAKE. NIST reserves function names for its own derived functions such as KMAC, TupleHash and ParallelHash.

NextSSL includes cSHAKE128 and cSHAKE256, providing 128-bit and 256-bit security levels. Applications should choose a unique customisation string, such as a protocol name and version, so that outputs used in different contexts cannot be confused or substituted for one another. The function name parameter is reserved for NIST-defined functions. Strings are public.

History

2016–2016
  1. Specified in NIST SP 800-185

Security notes

cSHAKE inherits Keccak's security with no known weaknesses. Customisation strings provide domain separation only; they are not secret and do not act as keys.

Typical uses

Domain-separated hashingBuilding KMAC, TupleHash and ParallelHashProtocol-specific XOFs

Variants in NextSSL

2
AlgorithmTierSizes (bytes)StandardsAPI
Cshake128
cshake128
standard FIPS — NIST SP 800-185 safe
Cshake256
cshake256
standard FIPS — NIST SP 800-185 safe

Frequently asked questions

Which cSHAKE variants does NextSSL include?

NextSSL registers 2 cSHAKE variants: cshake128, cshake256.