← Hall of Foundations Exhibit 154 · the perfect hash
The Assumption Beneath Fiat–Shamir

The oracle that
can't be predicted

Much of cryptography leans on a fiction so useful it's treated as bedrock: a hash function that behaves like a perfectly random one. Feed it anything, get back noise you could never have guessed — and the same input always returns the same noise. From that single idea, signatures are built.

A model, held on purpose. No real function is a true random oracle. A random-oracle proof studies a complete scheme with access to an ideal random function. Replacing that oracle with a real hash is an additional design step, not an automatic transfer of the proof. The visible avalanche effect below is a much weaker property.
§1

Two demands on a hash

Preimage resistance asks that finding an input for a specified digest be infeasible; collision resistance asks that finding any two distinct inputs with one digest be infeasible. Neither property follows merely from outputs looking unrelated to their inputs.

pre-image: given h, find m with H(m)=h  ·  collision: find m₁ ≠ m₂ with H(m₁)=H(m₂)
§2

The avalanche

Here's the property you can see. Flip a single input bit and, in a good hash, roughly half the output bits flip — with no pattern linking which. Toggle any input bit below and watch the change cascade through the mixing rounds. A one-bit nudge should scramble the whole output.

—
Click any input bit (top row) to toggle it. The vermilion output bits are the ones that changed versus the previous output. A good mixer changes about half, unpredictably — that's the avalanche.
Not a security test. A broken hash can still show an avalanche effect. Even a deliberately weak function can pass this visual check while remaining easy to invert or collide. The toy mixer here is one of them. Seeing the scramble is not evidence of one-wayness; it only tells you the output isn't obviously tracking the input.
Keyboard alternative: enter a bit position 0 to 15 to toggle, then apply.
§3

From random oracle to signature

The Fiat–Shamir transform replaces the verifier's challenge with a hash of the commitment, public statement and required application context; a signature also binds its message. A proof in the random-oracle model treats that hash as an ideal random function. Correct transcript binding and the proof's assumptions matter, and substituting a real hash does not automatically transfer the proof.

A Fiat–Shamir signature binds the message and required transcript context into a hash-derived challenge. Unforgeability belongs to the complete construction under its stated assumptions; it is not a property of the challenge alone.
§4

Why abort a signature attempt?

ML-DSA forms a response shaped like z = y + c·s: a random mask plus a secret-dependent shift. Unlike uniform masking around a finite group, a mask drawn from a bounded interval has edges. Publishing a response near an edge can reveal information about that shift.

A scalar example. Choose the integer mask y uniformly from −4 through 4, and let the shift t be −1, 0 or 1. The response is z = y + t. These are inclusive integer ranges:

  • For t = −1, responses range from −5 through 3.
  • For t = 0, responses range from −4 through 4.
  • For t = 1, responses range from −3 through 5.

Seeing z = 5 identifies t = 1. Instead, discard the attempt unless −3 ≤ z ≤ 3, then resample the mask. For every allowed shift, exactly seven of the nine masks survive. Conditional on acceptance, each of the seven responses has probability 1/7, independent of the shift. The common interior removes this edge information.

This illustrates one reason for Fiat–Shamir with aborts. Actual ML-DSA operates on polynomial vectors, imposes a strict response-norm bound and performs further rejection checks. The scalar example is not its signing algorithm or a security proof. Compare the Schnorr identification example, where masking uses modular arithmetic.

Explore the existing Dilithium Reject lab: “Why Each Check Exists” explains the bounds, and “Watch the Loop” shows signing attempts. Retry histograms alone do not demonstrate exploitable secret leakage.

Where this touches your keys

Used by several signature families

Schnorr-style signatures and ML-DSA use Fiat–Shamir ideas. ML-DSA uses SHAKE-based hashing and a construction often described as Fiat–Shamir with aborts. SLH-DSA belongs to a hash-based signature family with different assumptions and tradeoffs. These are distinct constructions, not one security argument applied to every signature.

Related: One-Way Functions (pre-image resistance in general), Reduction & Proof (what a proof in this model claims).

Sources and scope: Alfred Menezes, A Gentle Introduction to Lattice-Based Cryptography, version 3.3, September 16, 2026, §7.1.4, Issue #5, pp.73–74; RFC 8235 (2017); NIST FIPS 204, Algorithm 7, and FIPS 205 (2024). The interval example is conceptual; the interactive 16-bit mixer is an illustration, not a cryptographic hash.