Reviewed Aug 2026
DE
BA-02 · LESSON 03

Hash160 and Merkle trees

KEY DEFINITIONS

Terms used in this lesson

Hash160
SHA-256 followed by RIPEMD-160, producing the 20-byte hash used by several Bitcoin spending conditions.
SHA-256
A cryptographic hash function used throughout Bitcoin to produce fixed-size 256-bit digests.
RIPEMD-160
A 160-bit cryptographic hash function used in Bitcoin’s HASH160 construction.

Bitcoin combines two hash functions for some identifiers and arranges transaction hashes in a tree so one item can be proven part of a larger set.

55 min Difficulty 1/5 Not started

Loading lesson visuals...

01

Learn the idea

HASH160 means SHA-256 followed by RIPEMD-160, producing 20 bytes. A Merkle tree commits to many items by hashing leaves and then repeatedly hashing pairs until one Merkle root remains. A Merkle proof supplies the sibling hashes needed to recompute the root for one leaf.

GUIDED EXPLANATION1/5 ideas inspected
1

Build leaf hashes

Each item is serialized and hashed under the protocol's rule. In a Bitcoin block, transaction hashes become leaves of the transaction Merkle tree.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionA Merkle proof proves that the included transaction is valid.

It proves that a leaf is included under a particular root. Transaction validity and whether that root belongs to an accepted valid block require additional checks.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.