If you keep hearing about hashes and wonder what is a hash function, here is the short answer: it turns any data into a fixed-length fingerprint that is practically impossible to reverse. Blockchains rely on that to link blocks and secure addresses.
For the wider picture, see our explainer on how does blockchain work, which places hashing among the other building blocks.
| Item | Value |
|---|---|
| SHA-256 output length | 256 bits (32 bytes) |
| RIPEMD-160 output length | 160 bits (20 bytes) |
| Properties that make hashes useful for Bitcoin, as listed by one source | Six properties |
| Target gap between new Bitcoin blocks | Roughly 10 minutes |
| Speed-up reported by the draft BIP 98 Merkle tree design | Approximately 55% decrease in construction and validation times |
These figures come from Coldcard’s Bitcoin hash functions page and the Bitcoin.org mirror of BIP 98. They can change, so check the sources before you rely on them.
What is a hash function in plain terms?
A hash function is a mathematical procedure that takes any input and produces a fixed-length output called a hash. Feed it a word, a file or a whole list of transactions and it returns a short fingerprint of that data. The same input always gives the same fingerprint, and any slight change gives a completely different one, according to Coldcard’s educational page, reviewed June 5, 2026.
Length never changes. For SHA-256, Bitcoin’s primary hash function, the output is always 256 bits (32 bytes), whether the input is two characters or two gigabytes, per the same Coldcard page.
Hashing is not encryption. Encryption can be reversed with the right key, while hashing is a one-way algorithm designed to be irreversible. The only way back to the input is brute-force guessing, which stays computationally infeasible for modern hash functions at practical scale.
Six properties that make hashes useful
The Coldcard page lists six properties that make hash functions suited to Bitcoin:
- Variable input, fixed output: any amount of data gives a hash of one set length.
- Deterministic: the same input gives the same output on any machine, so anyone can recompute and compare.
- One-way: given a hash, there is no efficient way to find the input that made it.
- Avalanche effect: change one letter and the output looks nothing like the original.
- Collision resistant: finding two different inputs with the same output is computationally infeasible.
- Asymmetric difficulty: finding an output with a chosen pattern takes trial and error, but checking an answer is quick.
On collisions, that source says SHA-256’s collision resistance had not been broken as of its June 5, 2026 review. It also notes that SHA-256 is the same algorithm used in TLS, the protocol behind HTTPS, so it is not a Bitcoin-specific invention.
How Bitcoin uses hashes to build addresses
Bitcoin chains two hash functions to turn a public key into the core of an address. Coldcard’s page describes these steps, starting from a compressed public key of 33 bytes:
- SHA-256 turns the public key into a 32-byte hash.
- RIPEMD-160, which always outputs 160 bits (20 bytes), processes that hash.
- The 20-byte result is called Hash160, the core of the address before version bytes, checksums and encoding are added.
The two functions have different internal designs, so a weakness found in one would not automatically break the other. Each stage is one-way, so an address does not reveal the public key behind it, only its hash.
Bitcoin also uses double-SHA-256, which applies SHA-256 twice in a row. According to Coldcard, it appears in block header hashing, transaction IDs and the checksums inside Base58Check encoding.
How hashes link blocks and power proof of work
Mining is a hashing contest. Miners work to produce a hash of the block header that falls below a numerical target, and the network adjusts that target to keep new blocks arriving roughly every 10 minutes, according to Coldcard. Because finding a qualifying hash is trial and error while checking it is quick, the work is hard to produce but easy to verify.
The BSV Hub wiki describes what goes into that header: a version field, the hash of the previous block, the root hash of the Merkle tree of all transactions, the current time and the target. Including the previous block’s hash is what chains the blocks together.
The nonce is a counter field of only 32 bits, so miners also change an extraNonce field in the coinbase transaction. Doing so forces the Merkle root to be recomputed, per the same BSV Hub page.
BSV Hub’s worked example uses Block 550204 and an 80-byte header. The first hash was far above the target, so the attempt failed. The nonce was then increased by one, and the second attempt produced a valid proof-of-work solution.

If you want to see what changes when one party controls most of the hashing power, read about what is a 51 percent attack.
Why Merkle trees matter
A Merkle tree labels each inner node with the hash of its children. As BIP 98 explains, this lets you prove that a data element belongs to a set without revealing the whole set. Bitcoin uses this structure to commit a block’s transactions into the block header.
BIP 98 also shows that the details of combining hashes matter. It says the original Bitcoin construction has a flaw related to duplicate entries, recorded as CVE-2012-2459, and it proposes a design with an approximate 55% decrease in construction and validation times.
BIP 98 is only a proposal. Its status label reads Draft on the Bitcoin.org mirror, with an assigned date of 2017-08-24, and the mirror says publication does not imply adoption. If you are curious how scaling designs build on a base chain, see what is a layer 2 blockchain.
Where hashing stops: limits and risks
A strong hash function protects one narrow job: it gives data a fingerprint that is hard to forge or reverse. It does not make a crypto asset safe, stable or valuable.
- Security claims are dated. The collision-resistance statement above reflects one source as of June 5, 2026.
- Design flaws can sit around a sound hash function, as CVE-2012-2459 shows for the way hashes were combined in a tree.
- Volatility, scams and rug pulls, smart-contract bugs, loss of funds and regulation are separate risks that hashing does not remove.
Frequently asked questions
Is hashing the same as encryption?
Show answer
No. Encryption is reversible with the right key, while hashing is a one-way process designed to be irreversible, according to Coldcard.
Does a bigger file produce a longer hash?
Show answer
No. SHA-256 always outputs 256 bits (32 bytes) whatever the input size, per Coldcard.
Why does Bitcoin hash data twice in some places?
Show answer
Double-SHA-256 is used for block header hashing, transaction IDs and checksums, per Coldcard. BIP 98 describes the second pass over a leaf hash as protection against length-extension attacks.
Can two different inputs share the same hash?
Show answer
In theory yes, but finding such a pair is computationally infeasible for SHA-256. Coldcard said its collision resistance had not been broken as of the June 5, 2026 review.
This page is for general information and education only and is not financial, investment, tax or legal advice.



