In this track: Cryptography with intuition
advanced · 4 MIN READ

Hash preimages and collisions

Finding an input for a digest differs from finding two matching digests.

LET’S PICTURE IT

Finding the owner of one fingerprint differs from finding any two people with the same fingerprint.

SEE IT FOR YOURSELF
From exact bytes to a Keccak-256 fingerprintStep 1 / 4
From exact bytes to a Keccak-256 fingerprintUTF-8 texthelloExact spelling mattersA hash commits to bytes, not a visual interpretationFive input bytes68656c6c6fLiteral text 0x68656c6c6f would be a different text inputInput bytes68 65 6c 6c 6f5 bytesKeccak-256Deterministic calculation32-byte resultUse Keccak-256, not an interchangeable SHA3-256 assumption0x1c8aff95…36deac8Fixed output: 32 bytesSame input bytes → same outputA fingerprint does not prove that the input is truthful or safe

The text hello is a particular sequence of characters. Case or text normalization can change the encoded bytes.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Define a preimage problem

Given a particular digest, a preimage search tries to find an input producing it. A hash is not ordinary reversible encryption with a decryption key.

Define a collision problem

A collision consists of two different inputs sharing one digest. Fixed-length outputs imply collisions exist over an unlimited input space, but finding useful ones can be infeasible.

Separate short-input guessing

Hashing a small set of predictable choices does not hide which choice was used. An observer can hash every candidate and compare the results.

Use commitments with context

A secret commitment often needs unpredictable salt and a precise encoding. Digest length alone does not make a predictable value private.

Inspect the distinction

preimage task: given H(x), find a suitable x
collision task: find x ≠ y with H(x) = H(y)
small-domain guessing: hash each known candidate

These are local teaching values, not a signature request or a live-chain lookup.

TURN UNDERSTANDING INTO PRACTICEOpen the Keccak-256 →
QUICK CHECK · NO PRESSURE

Does hashing one of ten known choices make guessing infeasible?

Your progress stays in this browser.
Keep exploring the original referencekeccak.team ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.