Skip to content
uencoder

Sponge Construction

The sponge construction is the underlying framework of Keccak/SHA-3: the state is split into a rate r and a capacity c, absorbing and squeezing to handle arbitrary-length input and output.

Purpose

Uniformly handles hashing, stream ciphers, pseudo-random generation and more; resists length-extension attacks and supports variable output length.

Mechanism

State of b=r+c bits. Absorb: each block is XORed into the rate part, then permutation f is applied. Squeeze: the digest is read from the rate part; if more is needed, apply f again and read. The capacity c provides the security.

Use cases

  • Foundation of SHA-3/Keccak
  • Variable-length digests
  • Length-extension-resistant hashing

Related tools

References