SHAKE128 Hash Generator
Generate SHAKE128 variable-length hashes online. SHAKE128 is an Extendable Output Function (XOF) from NIST FIPS 202, producing any desired number of output bits at 128-bit security level. Configure the output length below.
Share Link
Related Hash Tools
Frequently Asked Questions
What is SHAKE128?
Why would I use SHAKE128 instead of SHA-256?
What is the minimum output bits for SHAKE128?
Does SHAKE128 support HMAC?
About SHAKE128 Hash Generator
SHAKE128 (Secure Hash Algorithm and Keccak, 128-bit security) is one of two Extendable Output Functions (XOFs) standardized in NIST FIPS 202 (August 2015). Unlike traditional hash functions such as SHA-256 (fixed 256-bit output), SHAKE128 can produce an arbitrary number of output bits by continuing the sponge squeezing phase. This makes it a versatile primitive for key derivation, stream cipher construction, and protocol design.
How SHAKE128 Works
SHAKE128 uses the Keccak sponge with a 1344-bit rate and 256-bit capacity. Input is absorbed in 168-byte blocks. During squeezing, 168 bytes of output are produced per permutation call, and the process continues until the requested number of bits is generated. This allows SHAKE128 to serve as a pseudorandom generator seeded by the input.
Security Level
SHAKE128 provides 128-bit collision resistance and 128-bit preimage security. These security levels hold regardless of how many output bits are requested. If you need 256-bit security (e.g., collision resistance of 2^128), use SHAKE256 instead, which provides 256-bit collision resistance.
Applications
SHAKE128 is used in: post-quantum cryptography schemes (CRYSTALS-Kyber, CRYSTALS-Dilithium use SHAKE for key generation and hashing), key derivation functions (KDFs), masked implementations of cryptographic algorithms, and protocols where variable-length output is needed from a single primitive.
SHAKE128 vs cSHAKE128
cSHAKE128 (customizable SHAKE) is a generalization of SHAKE128 that accepts a function name (N) and customization string (S). When both N and S are empty strings, cSHAKE128 is identical to SHAKE128. For domain-separated usages, use cSHAKE128.