← Back to section · Foundations of Cryptography
The Sponge Construction and SHA-3: Why the New Generation Changed Course
SHA-3 does not reuse SHA-2's iterative compression skeleton. Keccak's sponge absorbs input and squeezes out output while most of its internal state never sees daylight — both a diversity hedge and a direct answer to structural lessons like length extension.
When NIST launched the SHA-3 competition in 2007, SHA-2 was nowhere near broken. The point of the exercise was less replacement than insurance: if the successive falls of MD5 and SHA-1 hinted at a systematic risk in iterated hashing, there had better be a spare with a completely different design philosophy. Keccak, the 2012 winner, is exactly that spare — it does not reuse the Merkle–Damgård compression pipeline, but introduces a paradigm that has since been borrowed widely: the sponge construction.
How a sponge works: absorb, then squeeze
The name describes the mechanics, which come in two phases. The internal state is a wide array of bits — 1600 bits in Keccak — logically divided into a rate () and a capacity (), which together make up the full state width.
In the absorbing phase, the message is cut into -bit blocks; each block is XORed into the rate portion of the state, after which a fixed public permutation (Keccak-f[1600], with 24 rounds) is applied to the whole state before the next block is absorbed. The capacity never touches input directly. In the squeezing phase, once the message is fully absorbed, output is read from the rate portion segment by segment, applying the permutation again after each segment, until enough output has been produced.
Against Merkle–Damgård, two differences matter. First, the output is only a slice of the state — the capacity stays hidden inside, so an attacker cannot recover the full state from the output, and length extension fails structurally. Second, security is cleanly parameterized: the sponge’s collision and preimage resistance are governed mainly by the capacity (providing roughly bits of security), while the rate determines throughput. SHA3-256 takes and , yielding a 256-bit output with the expected roughly 256-bit preimage and 128-bit collision security — matching its name.
Inside the permutation: how 1600 bits get scrambled
Keccak-f[1600] views its state as a 5×5 array of “lanes”, each 64 bits wide, and one round chains five simple steps: one step mixes each column’s parity into neighbouring columns, another rotates and rearranges within rows, another applies a non-linear mixing per row (the only non-linear part of the whole permutation, there so that analysis cannot follow through with linear equations), and a final step XORs a round constant into a fixed position to break symmetry. This round repeats 24 times. The design philosophy is the block-cipher one: no individual part is complicated, and security comes from iterated diffusion over many rounds — change any single input bit and, after enough rounds, the effect avalanches across the entire state. Notably, the permutation uses no S-box lookups at all; it consists entirely of logical operations and rotations, which makes it exceptionally clean in hardware and naturally avoids part of the cache-timing side-channel risk.
The SHA-3 family’s parameter choices state the “capacity decides security” rule plainly: SHAKE128 has a capacity of 256 bits, corresponding to a roughly 128-bit security target; SHAKE256 has a capacity of 512 bits, corresponding to roughly 256 bits. The four fixed-output members each pick rate and capacity so that preimage and collision security match the number in their name. Users do not need the permutation’s details, but they should understand this parameter logic — it means a sponge function’s security margin can be read straight off the parameter table instead of resting on trust in the designer.
One permutation, a family of tools
Keccak’s core component is not a compression function custom-built for hashing, but a keyless permutation — a fixed transformation that thoroughly scrambles the 1600-bit state. This buys an unusual kind of uniformity: one permutation, one sponge framework, and by adjusting the rate, capacity and output length you derive an entire family of primitives. Fixed-output members are SHA3-224/256/384/512. Arbitrary-length output gives SHAKE128 and SHAKE256, extendable-output functions (XOFs) that squeeze out as many bits as you ask for, like turning a tap — and it is SHAKE that the post-quantum standards ML-KEM and ML-DSA use heavily inside. Feed a key into the sponge differently and it becomes a message authentication code (KMAC), a pseudorandom generator, or authenticated encryption with associated data. Instead of inventing a new structure per application, designers reuse one thoroughly analyzed building block.
A different style of security argument
The sponge also brings a methodological benefit: its security can be characterized in an “indifferentiability” framework — roughly, as long as the underlying permutation behaves enough like a random permutation, sponge output is indistinguishable from truly random, with the security bound given directly by the capacity. Such proofs do not depend on tracking the permutation’s internal structure round by round, so their conclusions are clean and their bounds explicit. By contrast, security arguments for iterative compression constructions lean more on the compression function’s own properties and on concrete analytic technique, and their conclusions tend to be more empirical. This does not mean the sponge is “stronger”; it means its security story is told differently: trust is concentrated in the randomness of one large permutation, and a framework theorem then distributes that trust to every derived primitive. For standards bodies, this “one argument, applicable everywhere” structure is part of why the sponge could travel from hashing all the way into the internal components of post-quantum algorithms.
Why “different” is itself the value
Looking back at the competition’s evaluation, Keccak’s winning argument was not dominance on any single metric — in pure software speed it was not the fastest — but that it was sufficiently different from SHA-2. The SHA-2 family descends from MD5’s iterative compression lineage; if that lineage were one day found to harbour a systematic analytic weakness (SHA-1’s fate suggests this is no idle worry), every function in the family would fall together. Keccak’s permutation-based sponge is independent of it in mathematical structure, design team and analytic tradition. NIST accordingly positioned SHA-3 as a parallel route alongside SHA-2 rather than its replacement: both families stay, and if one fails, the other steps in.
This diversity-insurance thinking is even more visible in the post-quantum era: the internal hashing needs of ML-KEM and ML-DSA rest almost entirely on SHAKE, and the sponge has moved from “spare tyre” to a core component of the new standards. The alternative route chosen to hedge a risk now stands at centre stage.
Tags: SHA-3KeccakSponge Construction