Generate cSHAKE128 customizable XOF output with personalization strings and function naming per NIST SP 800-185.
About
cSHAKE128 is a customizable extendable-output function defined in NIST SP 800-185, extending SHAKE128 with optional function-name and personalization parameters for domain separation.
Specifications
Output SizeVariable
StandardNIST SP 800-185
Standard Year2016
Origin Keccak submission to NIST SHA-3 competition
Origin Year 2008
Use Cases
—Protocol-specific XOF requirements
—Domain-separated key derivation
—NIST-compliant randomness generation
—Customizable hash-based functions
—Specialized cryptographic protocols
Frequently Asked Questions
cSHAKE128 adds customization parameters (function name and personalization) to SHAKE128. This allows domain separation—different function names produce unrelated outputs even with the same input. Use cSHAKE when you need to derive multiple independent outputs from similar inputs.
Use cSHAKE128 when you need domain separation—deriving multiple keys or hashes from the same input where the outputs must be unrelated. Examples: deriving separate encryption and MAC keys from a master secret, or different protocol instances.
cSHAKE128 has negligible overhead compared to SHAKE128. The customization string is processed once during initialization. For most applications, the performance difference is insignificant compared to the benefits of domain separation.