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

THE HASH CHAIN hash a seed n times — spend the chain backwards, one link at a time

Hash a secret seed repeatedly — H(H(H(…))) — and publish only the last value as an anchor. Now you can reveal the chain in reverse: to authenticate once, show the pre-image one step back; anyone hashes it forward and checks it matches the anchor. Because the hash is one-way, no one can run the chain forward to guess your next reveal, but everyone can verify a reveal in a single hash. It is Lamport’s one-time-password idea (the ancestor of S/KEY and TOTP), and the same forward-only chaining that links each block to the last in a blockchain.

THE TECHNIQUE anchor = Hⁿ(seed); reveal Hⁿ⁻¹, verify H(reveal)=anchor

The demo builds a length-5 chain, publishes the anchor, then reveals the 4th link — hashing it once reproduces the anchor: live demo


HISTORY & CREDIT Leslie Lamport · 1981 (S/KEY)

“A one-time password needs a server secret per login.” — a hash chain lets you spend one anchor backwards, verifying each with a single hash. cited

build · anchor = Hⁿ(seed) — hash the seed n times, publish the last.
spend · reveal Hⁿ⁻¹(seed); verifier checks H(reveal) = anchor — then that becomes the new anchor.
1981 · Leslie Lamport — one-time passwords; the root of S/KEY and OTP.

A chain you climb down while no one can climb up — each link verified forward, none forgeable backward. one-way chain

RECOMMEND FOR I-13 verify a reveal, on the compiler

On the canonical compiler, a length-5 chain has anchor 33383; revealing the 4th link (3891) and hashing once reproduces the anchor:

$ i13 run zd_hashchain.i13 # anchor=H^5(seed), reveal H^4 RUN OK · 238 step(s) · peak stack 4 · call depth 6 anchor = 33383 -- H^5(7), public reveal4 = 3891 -- H^4(7) verify = 1 -- H(reveal4) == anchor
Recommend as a NULL — one-wayness again, in a chain. The hash chain rests entirely on the one-way function (dart 432): verify-forward is a recognizer (B41), and forge-backward is hard (B40/B41). The chaining is a clever use of one-wayness, not a new output-relation invariant. i13 grounds the verify step. NULL — the mechanism under one-time passwords and, extended, under blockchains’ block-linking.