Topic · How blockchains work
What is a hash function in crypto?
- Quick fact 1
NIST defines a hash function as one that maps a bit string of arbitrary length to a fixed-length bit string.
- Quick fact 2
SHA-256 is specified in NIST FIPS 180-4.
- Quick fact 3
Each bitcoin block header includes the hash of the previous block, chaining blocks together.
The short lesson
A hash function takes any input, a word, a file, a whole block of transactions, and produces a short, fixed-size output called a hash. Think of it as a fingerprint for data.
Good cryptographic hash functions have three properties that matter:
- Same input, same hash. Every time.
- Tiny change, totally different hash. Change one letter and the fingerprint looks unrelated.
- One way. You cannot work backward from the hash to the input, and you cannot practically find two inputs with the same hash.
Where blockchains use them
- Linking blocks. Each block stores the previous block’s hash. Change an old block and every later link breaks. See what is a block.
- Mining. Bitcoin miners hash block headers with SHA-256 over and over, looking for a result below a target. That is hash rate.
- Transaction IDs and addresses. Both are built from hashes.
Bitcoin uses SHA-256. Ethereum uses a different function, Keccak-256. The idea is the same: a fingerprint nobody can fake.
Lesson game · earn XP
Check yourself: 3 quick questions
Perfect score = combo bonus. Each question returns in your spaced-repetition review.
Memory · spaced repetition
Flashcards: lock it in
Flip each card, then say if you knew it. Missed cards come back sooner.
Related terms
Go deeper in Lesson 4: The shared list everyone can check
More in How blockchains work
Common questions
Is hashing the same as encryption?
No. Encryption can be reversed with a key. A hash is designed to be one-way.
What does “hash” mean in mining?
Miners compute hashes of block headers, trying many inputs until one meets the network’s target.
Can quantum computers break hash functions?
Researchers study this. Hash functions like SHA-256 are generally considered more resistant than some signature schemes. NIST tracks the work.
Get the free weekly brief + Scam-Spotting Cheat Sheet
Get the one-page Scam-Spotting Cheat Sheet now, then a short weekly brief by email: one plain-English lesson and the week’s crypto news. No coin picks. No price tips. Want the full guide too? Get the free Crypto Safety Starter Kit (PDF). Every lesson stays free to read without it. Unsubscribe anytime.
Reviewed and sources
Written and reviewed by Joshua Baskin, founder. Last reviewed . How we check facts · Report an error
Education only. Not investment, tax or legal advice. We do not pick coins.
