Hashing & Fingerprints
How one-way functions give each block a tamper-evident fingerprint.
You’ll cover
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.
Remember
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.
Self-check
Check your understanding
Try each question before opening the answer.
If you change one character of a hashed input, the hash…
- A.Stays almost the same
- B.Changes completely and unpredictably
- C.Gets one character longer
- D.Cannot be recomputed
Reveal answer
B. Changes completely and unpredictably
Good hash functions have the 'avalanche' property: a tiny input change flips the entire output.
Can you recover the original input from its hash?
- A.Yes, by reversing the function
- B.No - hashing is one-way
- C.Only with the private key
- D.Only if it's short
Reveal answer
B. No - hashing is one-way
Hashing is a one-way function. There's no reverse operation; you can only guess-and-check.
Continue this track