Topic · How blockchains work

What is a hash function in crypto?

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

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.

Reviewed and sources

Written and reviewed by Joshua Baskin, founder. Last reviewed . How we check facts · Report an error

  1. NIST CSRC glossary: Hash function
  2. NIST FIPS 180-4: Secure Hash Standard (SHA-256)
  3. Bitcoin developer guide: Block chain

Education only. Not investment, tax or legal advice. We do not pick coins.

Start here

Start here. Learn first. Every lesson, tool and glossary page is free and open, with no card and no account. Want the free Scam-Spotting Cheat Sheet + a weekly lesson by email? That's free too.

Start with Lesson 1