◄ WORLD V · SONNY 5DART 435 · a helldive at the net

THE SALT a pinch per password — identical secrets, different hashes

Hash passwords bare and two users with the same password get the same stored hash — and an attacker precomputes a giant table (a rainbow table) once and cracks everyone. A salt is a unique random value stored alongside each hash and mixed in before hashing: H(salt ‖ password). Now identical passwords produce different hashes, precomputation is worthless (the attacker must redo the work per salt), and identical-password users are no longer visibly identical. It is a relabeling of the hash input, cheap and mandatory — the difference between one break and a million separate ones.

THE TECHNIQUE H(salt ‖ password) — per-secret salt defeats precomputation

The demo hashes the same password bare (identical hashes) and then with two different salts (different hashes) — precomputation defeated: live demo


HISTORY & CREDIT password salting · Morris & Thompson 1979

“Hashing the password is enough.” — bare hashes collide across users and fall to one precomputed table; a salt makes each unique. cited

the flaw · bare H(pw) — same password → same hash → one rainbow table cracks all.
the salt · H(salt ‖ pw) with unique salt — identical passwords now differ; tables are useless.
1979 · Robert Morris & Ken Thompson — salting in Unix crypt.

A unique pinch per password — the same secret stored a million different ways, one table for none of them. encoding

RECOMMEND FOR I-13 same password, different hash, on the compiler

On the canonical compiler, the bare password hashes identically both times; two different salts give two different hashes:

$ i13 run zd_salt.i13 # H(pw,0) vs H(pw,salt) RUN OK · 79 step(s) · peak stack 3 · call depth 1 bare_a = 61658 bare_b = 61658 -- identical (rainbow-table bait) salted_a = 69193 salted_b = 73714 -- different salts, different hashes bare_collides = 1 salted_differ = 1
Recommend as a NULL — a change of encoding. A salt works by relabeling the hash input so identical secrets map to different codewords; the hash function and its guarantees are unchanged. That is squarely the encoding gate (B44): a property of the representation, not the value — different salts give different hashes of the same password. i13 grounds it (bare collides, salted differ). NULL — essential practice, but a relabeling, not an axis.