SHAKE-128 Generator

Generate variable-length cryptographic hashes with SHAKE-128 and SHAKE-256, the extendable-output functions (XOF) from the SHA-3 family.

SHAKE-128: 128-bit security, SHAKE-256: 256-bit security
SHAKE-128 output will appear here...
What is SHAKE?

SHAKE (Secure Hash Algorithm KECCAK) is an Extendable-Output Function (XOF) from the SHA-3 family. Unlike traditional hash functions that produce fixed-length output, SHAKE can generate output of any desired length. This makes it incredibly flexible for applications requiring variable-length hash values, key derivation, or random number generation.

Extendable Output: Generate any length from 1 to unlimited bits
SHA-3 Foundation: Built on the secure Keccak sponge construction
Two Variants: SHAKE-128 (128-bit security) and SHAKE-256 (256-bit security)
NIST Standard: FIPS 202 compliant

Understanding SHAKE (Extendable-Output Functions)

SHAKE (Secure Hash Algorithm KECCAK) represents a new paradigm in cryptographic hashing: Extendable-Output Functions (XOFs). Unlike traditional hash functions that produce fixed-length outputs, SHAKE can generate hash values of any desired length while maintaining the same security level. This flexibility makes it invaluable for modern cryptographic applications.

The Sponge Construction

SHAKE is built on the same Keccak sponge construction as SHA-3. The sponge works in two phases: absorbing input data into the state, and then squeezing out output of arbitrary length. This elegant design allows SHAKE to function as both a hash function and a stream cipher, making it incredibly versatile.

SHAKE Variants

FunctionSecurity LevelOutput LengthBest For
SHAKE-128128-bit securityAny length (≤ 2^128 bits recommended)General purpose, KDFs, random oracles
SHAKE-256256-bit securityAny length (≤ 2^256 bits recommended)High-security applications, post-quantum crypto

Key Applications

Cryptography:

  • Key Derivation Functions (KDFs)
  • Mask Generation Functions (MGFs)
  • Random number generation
  • Digital signatures (e.g., Ed25519ctx)

Protocols & Standards:

  • Post-quantum cryptography
  • NIST SP 800-185 (SHA-3 derived functions)
  • cSHAKE (customizable SHAKE)
  • KMAC (Keccak Message Authentication Code)
XOF vs Traditional Hash: Think of SHAKE as a "random number generator" seeded by your input. You can request any amount of output, and it will keep producing cryptographically strong pseudorandom bits based on your input.

Quick Features

  • SHAKE-128 & SHAKE-256
  • Custom output length
  • Text & File Input
  • 3 Output Formats
  • Download as File
  • 100% Client-side

Why Choose SHAKE?

SHAKE represents the next generation of cryptographic hashing. Its ability to produce arbitrary-length output eliminates the need for multiple hash functions or complex constructions when you need non-standard hash sizes. It"s perfect for modern protocols that require variable-length outputs, such as key derivation, where you might need exactly 257 bits of key material. The security level remains consistent regardless of output length, and it"s standardized by NIST for government and commercial use.

Practical Applications of SHAKE

Key Derivation

Generate cryptographic keys of exact lengths needed for different algorithms. Need a 257-bit key for a custom cipher? SHAKE can produce it directly without truncation or padding.

Random Number Generation

Use SHAKE as a deterministic random bit generator (DRBG). Given a seed, it can produce an unlimited stream of cryptographically secure pseudorandom bits.

Post-Quantum Cryptography

Many post-quantum cryptographic algorithms rely on SHAKE for their security. Its flexibility makes it ideal for lattice-based and multivariate cryptography.

Frequently Asked Questions About SHAKE

Theoretically, yes - SHAKE can produce output of any length. However, practical implementations may have limits. Our tool allows up to 8192 bits (1024 bytes) of output. For most applications, this is more than sufficient. The security strength remains at 128 bits regardless of output length, though extremely long outputs (approaching 2^128 bits) would eventually exhaust the security margin.

The main difference is the security level. SHAKE-128 provides 128 bits of security (suitable for most applications up to "SECRET" level), while SHAKE-256 provides 256 bits of security (suitable for "TOP SECRET" and post-quantum applications). SHAKE-256 is also more conservative and may be preferred for long-term security or when extremely large outputs are needed.

SHAKE is neither - it's an Extendable-Output Function (XOF), which combines properties of both. Like a hash function, it's deterministic and one-way. Like a stream cipher, it can produce arbitrary amounts of output. This unique position makes it incredibly versatile for cryptographic applications.

Use SHAKE when you need output lengths that don't match SHA-3's standard sizes (224, 256, 384, 512 bits). Also use SHAKE when you need a deterministic random oracle, for key derivation where you need specific key lengths, or when implementing protocols that specifically call for an XOF. For standard hashing where fixed-length output is fine, SHA-3 is simpler and more widely supported.

SHAKE is believed to be quantum-resistant. The underlying Keccak construction is not vulnerable to Shor's algorithm, and Grover's algorithm only provides a quadratic speedup for brute-force searches. With 128 bits of security (SHAKE-128), a quantum computer would still need to perform about 2^64 operations, which is considered infeasible. SHAKE-256 with 256 bits of security provides an even larger margin against quantum attacks.

Related Cryptographic Tools

All SHAKE hash generation is performed client-side in your browser using cryptographic algorithms. Your text and files never leave your device. No data is stored or transmitted to any server.