Hashes are everywhere in blockchain: transaction IDs are hashes, blocks are linked together by hashes, and Bitcoin mining consists of constantly calculating hashes. What exactly are they, and why are they so important? This article explains it with as little jargon as possible.

Mining $BTC essentially involves repeatedly calculating SHA-256 hashes to find a result that meets the difficulty requirement. Currently 83,037.2 (24h +0.3%).

— What is a hash? —

A hash function takes data of any length and converts it into a fixed-length output. This output is called a hash value, or digest. For example, SHA-256 always produces a 256-bit output, which is 64 characters when written in hexadecimal.

You can think of a hash as a data “fingerprint”: the same data will always produce the same fingerprint; change even a single character, and the fingerprint will be completely different.

— What makes a good hash function? —

First, one-way: it’s virtually impossible to recover the original data from its hash. Second, collision-resistant: it’s virtually impossible to find two different sets 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; hashing is one-way, so you can’t recover the original content from the hash.

— Where is hashing used in blockchain? —

Bitcoin uses SHA-256 to calculate block hashes and transaction IDs, applying 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; its addresses are 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 the blocks that follow 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 meeting the difficulty requirements is found.

— What does this mean for everyday 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 make sure the installation file hasn’t been tampered with.

— A few final words —

Remember this: a hash is a data fingerprint. It can be shared and compared, but not reversed. You can show your transaction hash to anyone, but never share your private key or recovery phrase. Only invest what you can afford, and leave yourself enough room to step back.

Have you ever misunderstood this before?

It’s up to you how you proceed; I’m just sharing this.