freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #4 of 90

cryptography · the foundation

BlockyVSDouble-Spend Dan
Blocky saysCryptography is the foundation — hashing and digital signatures make a blockchain possible.

Two primitives do the heavy lifting. Hash functions fingerprint data (any change flips the fingerprint), chaining blocks tamper-evidently. Public-key signatures prove who authorized a transaction without revealing a password. Everything else — addresses, blocks, consensus — is built on these. You don't need to implement them, but you must understand what they guarantee.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleState what a hash guarantees and what a signature guarantees.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>hash:      data → fixed fingerprint (tamper-evident)
signature: private key signs → anyone verifies with public key</pre></body></html>
▶ Open the interactive comic issue
‹ Distributed Systems · Cap Theorem RefresherHashing · Sha-256 · Keccak · Collision Resistance ›