Skip to content
Hexncoin
Track 1: Blockchain FundamentalsLesson 2 of 3·5 min

Hashing & Fingerprints

How one-way functions give each block a tamper-evident fingerprint.

01

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.

TermsHash
02

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.

2 questions
01

If you change one character of a hashed input, the hash…

  1. A.Stays almost the same
  2. B.Changes completely and unpredictably
  3. C.Gets one character longer
  4. 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.

02

Can you recover the original input from its hash?

  1. A.Yes, by reversing the function
  2. B.No - hashing is one-way
  3. C.Only with the private key
  4. 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