// learn · episode 01

What is a hash?

A hash is a fingerprint for data. Feed anything in — a word, a contract, a whole hard drive — and out comes a short, fixed-length code that identifies it. It's the single most load-bearing idea in blockchain, and you're about to use one, not just read about it. Everything on this page runs in your browser; nothing you type leaves the page.

01 · try it

Text in, fingerprint out

This is MD5 — one of the classic hash functions. Type below and watch the fingerprint react to every keystroke. Then try the two presets that differ by a single capital letter.

md5 fingerprint

5d41402abc4b2a76b9719d911017c592

input: 5 characters → output: always 32 hex characters (128 bits).

Deterministic

The same input always gives the same hash. Type it again next year, on another machine — identical fingerprint.

Fixed length

One letter or a whole book: the MD5 output is always 32 hex characters (128 bits). Even empty text has a hash.

Avalanche effect

Change one character and roughly half the output flips. Nothing about the new hash hints it was a small edit.

02 · one-way street

You can't run it backwards

Given a hash, there is no formula that recovers the text. The only move an attacker has is guessing inputs and comparing fingerprints. Watch how differently that plays out for a short secret versus a long one.

Crack this PIN

search space: 10,000

Behind this hash hides a 4-digit PIN. You can't reverse the hash — but you can guess forwards. Try a guess, or let your machine try all 10,000.

4a7d1ed414474e4033ac29ccb8653d9b

Now try this one

search space: 94¹² ≈ 4.8 × 10²³

This hash hides a full sentence. Same attack, same machine — completely different outcome.

8e6883fb18963b2d27e84e6dad47a065

03 · the birthday attack

Two texts, one hash

A hash is only trustworthy if nobody can find two different inputs with the same fingerprint — a collision. Attackers don't need to match your document's hash; they just need any pair that collides. Probability is heavily on their side.

Hunt for a collision

mini-hash = first 6 hex chars (24 bits)

We shrink MD5 to 24 bits so you can watch — in seconds — what took researchers years on the full 128. Guessing a specific 24-bit hash takes ~16.7M tries. But finding any two texts that share one? Only about √2²⁴ ≈ 4,096 tries — the same math that makes two people in a room of 23 share a birthday half the time.

04 · proof of work

Mining is hashing with a target

Bitcoin miners aren't solving equations — they're doing exactly what you did above: hashing, over and over, hunting for a lucky output. The rule: combine your block with a counter (the nonce) until the SHA-256 hash starts with enough zeros. This time you're using the real thing — SHA-256, Bitcoin's actual hash function.

difficulty:

target: hash starts with “0000” — expected ~65,536 tries. Each extra zero ≈ 16× harder.

05 · not all hashes age well

MD5, SHA-1, SHA-2, SHA-3

There isn't one hash function — there's a lineage, and it has casualties. The MD5 you played with today is a museum piece.

  1. 1992

    MD5

    Broken

    Collisions demonstrated in 2004 — the birthday attack you just watched, done for real. Still fine for checksums and classrooms; never for security.

  2. 1995

    SHA-1

    Retired

    Google's SHAttered collision (2017) ended it. Browsers and certificate authorities have dropped it.

  3. 2001

    SHA-2 (SHA-256)

    Today's standard

    What your bank's TLS session and Bitcoin's proof-of-work both run on. The mining you just did? SHA-256.

  4. 2015

    SHA-3

    The spare tire

    A structurally different backup, standardized so the world has somewhere to go if SHA-2 ever cracks.

Hash functions age. The lesson isn't “MD5 bad” — it's that security has a shelf life, and serious systems are built to migrate before the math catches up with them. That's why banking and blockchain run on SHA-256 today, and why SHA-3 is already waiting on the bench.

next up

Episode 02 — Blocks & chains play now →

You now hold the atom. Next: how chaining hashed blocks makes history tamper-evident.

Building something that needs this to be right? →