Hash Lab

Tool · Animator

Sponge Animator (SHA3-256)

SHA-3 is built on a sponge: absorb input by XOR-ing it into part of a 1600-bit state, apply the Keccak permutation, repeat. When done, squeeze out the digest from the same state.

11 bytes · 1 absorb block(s) of 136 bytes each

Step 1 of 2 · before absorb
Absorb block 1 (136 bytes = rate; XOR-ed into the top 17 lanes)
68656c6c6f20776f726c640600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080

Keccak state · 5×5 lanes of 64 bits = 1600-bit state

0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000

Top-left to bottom-right reading order. The first 17 lanes (white) form the rate , absorbed input XORs into them. The remaining 8 lanes (amber) are the capacity, never directly touched by input or output, the source of the sponge’s security.

Reading guide

  • Rate (top 17 lanes, white): where input XORs in and where output bits emerge. 1088 bits for SHA3-256.
  • Capacity (bottom 8 lanes, amber): never touched directly by input or output. 512 bits for SHA3-256, twice the security level.
  • Absorb step: XOR a rate-sized block into the rate, apply Keccak-f[1600] (24 rounds, here grouped as a single “after-permute” phase).
  • Padding: SHA-3 appends 0x06, zeros, then a final 0x80 at the last byte of the rate , the multi-rate (10*1) padding with a domain-separator byte.
  • Squeeze: take 32 bytes from the rate to form the SHA3-256 digest. Longer outputs (SHAKE) would apply Keccak-f again and squeeze more rate bits.
  • No length-extension: the capacity is in the state at output time but is never disclosed, so knowing the digest does not give an attacker enough to continue the hash. Compare with the Merkle-Damgård animator.

FAQ

Frequently asked questions