Hashes are everywhere in blockchain: transaction IDs are hashes, blocks are linked together by hashes, and Bitcoin mining involves calculating hashes over and over. What exactly is a hash, and why is it so important? This article explains it in plain language, with as little jargon as possible.

Price: $BTC 59,235.53 (24h -0.79%).

What is a hash?

A hash function can turn data of any length into an output of a fixed length. This output is called a hash value, or a digest. For example, SHA-256 always produces 256 bits, which are written as 64 hexadecimal characters.

You can think of a hash as a “fingerprint” of data: the same data always produces the same fingerprint; even changing just one character makes the fingerprint completely different.

What makes a good hash function:

First, one-way: it’s practically impossible to recover the original data from its hash. Second, collision-resistant: it’s practically impossible to find two different pieces of data that produce the same hash. Third, unpredictable: you can’t know the output without actually calculating it.

Keep in mind that hashing is not encryption. Encrypted data can be recovered with a key, but hashing is one-way—you can’t recover the original content from its hash.

Where hashes are used in blockchain:

Bitcoin uses SHA-256 to calculate block hashes and transaction IDs, and applies it twice. To generate common P2PKH and P2WPKH addresses, it first applies SHA-256 to the public key, then RIPEMD-160 (Taproot addresses use the public key directly). Ethereum uses Keccak-256, and an address is derived from the last 20 bytes of the public key’s Keccak-256 hash.

Each block header records the hash of the previous block. If any historical block is changed, its hash changes, and all subsequent blocks no longer match. This is one of the key reasons blockchains are difficult to tamper with. Bitcoin mining involves repeatedly trying different inputs until a hash that meets the difficulty requirement is found.

How is this useful to ordinary users?

To check a transfer, search for its transaction hash in a block explorer—it’s much more reliable than looking at a screenshot. After downloading wallet software, compare its SHA-256 checksum with the one published by the official source to confirm the installer hasn’t been tampered with.

Here’s the practical takeaway:

Remember this: a hash is a fingerprint of data. It can be shared publicly and compared, but you can’t use it to work backward. You can show anyone a transaction hash, but never share your private key or recovery phrase. Don’t mess with anything you’re unfamiliar with; try a small amount first.

What topic would you like to hear about next? DeFi or something else?

You’re responsible for your own risks; I’m just chatting.