⛓️ Blockchain Fundamentals
Hashing & Fingerprints
How one-way functions give each block a tamper-evident fingerprint.
5 min read
One-way fingerprints
A hash function takes any input - a word, a file, a whole block of transactions - and produces a fixed-length string that acts like a fingerprint. Feed in the same input, always get the same output. Change a single character and the output changes completely and unpredictably.
Crucially, hashing only runs one way. From the fingerprint you cannot work backwards to the original input. This one-way property is what lets a blockchain commit to data without revealing or being able to forge it.
Try the interactive hasher on the Tools tab: type anything and watch the SHA-256 fingerprint scramble with every keystroke.
How blocks use hashes
Each block hashes its own contents together with the previous block's hash. The result is stored in the next block. This is the mechanical link behind 'the chain'.
In Proof-of-Work chains, miners also race to find a hash of the block that starts with a certain number of zeros - a puzzle that's hard to solve but trivial to verify. That's the 'work' in Proof of Work.
Check your understanding
2 questions from this lesson, with the correct answer already marked.
1. If you change one character of a hashed input, the hash…
- Stays almost the same
- Changes completely and unpredictably
- Gets one character longer
- Cannot be recomputed
Good hash functions have the 'avalanche' property: a tiny input change flips the entire output.
2. Can you recover the original input from its hash?
- Yes, by reversing the function
- No - hashing is one-way
- Only with the private key
- Only if it's short
Hashing is a one-way function. There's no reverse operation; you can only guess-and-check.