Illustration of blockchain hashing techniques
In this field note
  1. What makes a hash useful?
  2. What Bitcoin miners actually hash
  3. Why transactions lead to a Merkle root
  4. Reading hashrate without losing the units
  5. Does more hashing mean more bitcoin?

A cryptographic hash turns data into a fixed-length result called a digest. Bitcoin uses hashes to link blocks, commit to transaction data and check proof of work. Calling a hash a digital fingerprint is useful, provided you remember that it is computed from the data and is not a signature from a person.

For SHA-256, the result is 256 bits, usually displayed as 64 hexadecimal characters. The input could be a short message or a much larger file; the output length stays the same. The algorithm is defined in NIST’s Secure Hash Standard.

What makes a hash useful?

The same bytes always produce the same digest. Change a letter, a space or a single bit and the result will generally look unrelated. That sensitivity lets software detect a changed input by computing its hash again and comparing the results.

Imagine downloading a document whose publisher also supplies a SHA-256 digest through a trusted channel. If the file’s digest differs, the bytes differ. If it matches, that supports the integrity check; it does not establish that the publisher is honest or that the document’s contents are true. Downloading both the file and its advertised digest from the same compromised source would miss that distinction.

Hashing is also not encryption. There is no decryption key for recovering the original message. However, an attacker can hash guesses: a short, predictable input is not protected simply because someone publishes only its hash. Nor are hashes mathematically unique. With a fixed-size output and a larger space of possible inputs, collisions must exist; a secure design makes useful collisions computationally impractical to find. NIST summarizes these hash-function security properties.

What Bitcoin miners actually hash

Bitcoin proof of work hashes an 80-byte block header, using SHA-256 twice. The header contains a version, the previous block’s hash, a Merkle root, a time value, the encoded target and a nonce. That format is specified in the Bitcoin block-header reference.

The target is a number. A candidate succeeds when its hash, interpreted as a number, is no greater than that target. Miners are not solving transaction equations or decrypting other people’s keys. They change allowed data and try again. Descriptions about finding enough leading zeros are a visual shortcut for this numerical comparison.

The nonce is not an unlimited counter. Once its possible values are exhausted, mining software can change additional data in the coinbase transaction and rebuild the Merkle root, producing a fresh header to search. A receiving node can check a successful header without repeating the miner’s search. The mining developer guide describes this work cycle.

Why transactions lead to a Merkle root

A Merkle tree combines transaction identifiers in successive hashing layers until one root remains. That root appears in the header. Altering transaction data changes the commitment, which means a miner cannot casually substitute a different transaction list after finding proof of work.

The tree also supports compact evidence that a transaction was included in a block: a verifier can follow the relevant branch instead of downloading every transaction. Such an inclusion proof does not, on its own, validate every rule of the whole block. The Bitcoin block-chain guide explains the structure and its verification limits.

Reading hashrate without losing the units

Hashrate measures attempts per second. Decimal prefixes describe scale:

Unit Equivalent rate
TH/s 1,000,000,000,000
PH/s 1,000 TH/s
EH/s 1,000,000 TH/s

Suppose two Bitcoin machines each produce 100 TH/s. One draws 3,000 watts at the wall and the other 2,000 watts. Their respective efficiencies are 30 and 20 joules per terahash. Running continuously for 24 hours, they use 72 and 48 kWh. At an illustrative $0.10/kWh, that is $7.20 versus $4.80 per day, before other costs.

Equal hashrate therefore does not mean equal operating cost. Check the algorithm, measured power, uptime and test conditions before comparing specifications. A TH/s figure for a different mining algorithm is not a directly interchangeable Bitcoin input. See mining hardware for the equipment side and energy costs for the bill.

Does more hashing mean more bitcoin?

More valid attempts improve expected results if difficulty and the other conditions stay fixed. They do not guarantee a block within a particular hour. A machine’s advertised maximum also differs from its sustained, accepted work after outages and rejected submissions.

The mining calculator connects TH/s to difficulty, a reward assumption and operating costs. Start there to test a specification, then read proof of work for why the network requires this computation at all.

Frequently asked questions

What does a Bitcoin miner hash?

Mining hardware repeatedly hashes the candidate block's 80-byte header with SHA-256 twice. The header commits to earlier blocks and the candidate transaction set through its previous hash and Merkle root.

Is hashing the same as encryption?

No. Hashing produces a fixed-length digest without a decryption key. It can help check whether data changed, but a digest alone does not prove who published that data.

Does twice the hashrate guarantee twice the bitcoin?

No. At unchanged difficulty and uptime it doubles expected work and expected reward over many trials, but individual block discoveries remain uncertain and operating costs may also change.

Does a matching file hash prove who published it?

No. Matching a trusted digest supports a byte-for-byte integrity check. If the file and advertised digest both came from a compromised source, the hash alone cannot establish honest provenance.

Put it to work

Mining calculator

Sources are listed above. This guide explains the mechanics; it is educational information, not a recommendation to invest or buy mining equipment.