liveBook · Manning

SHA-3

As explained in Real-World Cryptography

SHA-3 is a standardized family of cryptographic hash functions based on the Keccak sponge construction.

When a hash must resist collisions, pre-image attacks, and second pre-image attacks—and avoid length-extension attacks—SHA-3 offers a modern standardized choice. It is based on Keccak’s sponge construction rather than the Merkle–Damgård construction used by SHA-2. section 2.5.2 section 2.7

A high-level SHA-3 computation proceeds through these ideas:

  • Start with a reversible permutation, keccak-f, which maps a state to another state of the same size. section 2.5.2
  • Split the permutation state into a rate and a capacity, then absorb input by XORing blocks into the rate and permuting repeatedly. section 2.5.2
  • Squeeze the digest by repeatedly permuting the state and retrieving as much rate as the requested output requires. section 2.5.2

Choosing a SHA-3 variant

SHA-3-256 produces a 256-bit digest; the standardized family also includes SHA-3-224, SHA-3-384, and SHA-3-512. section 2.5.2

Figure 2.6 SHA-2 and SHA-3, the two most widely adopted hash functions. SHA-2 is based on the Merkle–Damgård construction, while SHA-3 is based on the sponge construction.

Use the comparison diagram to distinguish SHA-3’s sponge construction from SHA-2’s Merkle–Damgård construction. section 2.5

How Real-World Cryptography covers it

How deep it goes
Explains permutations, rate, capacity, absorption, and squeezing at a high level while deferring keccak-f internals.
Examples
Uses permutation diagrams, rate-and-capacity diagrams, XOR absorption examples, and SHA-3 output variants.
What it assumes
Assumes basic hash-function security properties while explaining the sponge construction from its permutation components.
What you can do after
Evaluate SHA-3 variants and understand how sponge absorption and squeezing produce a digest.
How it connects
Connects SHA-3 with SHA-2, Keccak, sponge construction, Merkle–Damgård construction, and length-extension attacks.

Also explained in

Compare how 3 books explain SHA-3 →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.