Definition
SHA-256 (Secure Hash Algorithm, 256-bit) is the one-way cryptographic hash function at the heart of Bitcoin. It takes any input and produces a fixed 256-bit output, and Bitcoin’s Proof of Work runs it twice in a row — SHA-256(SHA-256(block header)) — in a construction commonly written as SHA256d, or Double SHA-256.
SHA-256 belongs to the SHA-2 family, designed by the NSA and published as a standard by NIST. As a hash function it is deterministic (the same input always yields the same output), it is computationally infeasible to reverse, and even a one-bit change to the input scrambles the entire output. Those properties are exactly what Bitcoin needs: a verifier can confirm that a given block header hashes below the network target almost instantly, while the miner has no shortcut to finding such a header beyond brute-forcing candidates.
How SHA-256 drives ASIC mining
When a miner works on a block, it assembles a block header from the version field, the previous block hash, the merkle root (built from the coinbase transaction and the merkle branches the pool sends), the timestamp (ntime), the difficulty bits (nbits), and a 32-bit nonce. The miner then computes the double SHA-256 of that header and checks whether the result is less than or equal to the target. If it is, the share — or the block — is valid. If not, the nonce is incremented and the header is hashed again. A modern machine repeats this loop trillions of times per second.
A practical optimization sits inside this loop: the first 64 bytes of the 80-byte header rarely change between hashing attempts, so the SHA-256 compression of that first chunk can be pre-computed once and cached as a midstate. The ASIC only finishes the remaining work for each new nonce, which is why mining hardware and firmware pass midstates rather than full headers down to the chips.
Because each attempt is independent and the math is fixed bitwise logic, modular addition, and rotation, SHA-256 maps beautifully onto custom silicon. That is the reason Bitcoin ASICs exist at all: a chip can lay down thousands of hardwired hashing cores that do nothing but SHA-256, far faster and per-watt cheaper than any CPU or GPU. The trade-off is total specialization — an SHA-256 ASIC can mine Bitcoin and little else.
SHA-256 cores in real Bitmain chips
You can see SHA-256 silicon directly in the chips D-Central works on every day. The BM1366 (used in the S19 XP, S19k Pro, and the single-chip Bitaxe boards we support) packs roughly 894 small hashing cores on a TSMC 5nm die. The BM1370 in the S21 Pro carries about 1,280 cores, while the BM1362 in the S19j Pro family uses a smaller number of larger cores. The architecture differs, but the workload is identical: every one of those cores is a SHA-256 engine grinding nonces.
SHA-256 also shapes how miners talk to pools. The 32-bit nonce field gives only about 4.3 billion candidates per header, which a fast machine exhausts in well under a second. To keep the chips fed, the protocol stack supplies fresh work through the merkle root and through version-rolling, expanding the search space so hashboards never sit idle. This is why understanding the algorithm matters when diagnosing a miner reporting far below its rated hashrate — the bottleneck is often work delivery, not the silicon.
- Deterministic and one-way — trivial to verify a winning header, infeasible to reverse one.
- Double-hashed — Bitcoin applies SHA-256 twice (SHA256d) for its Proof of Work.
- Midstate caching — firmware pre-computes the static first half of the header to speed each attempt.
- Hardwired in silicon — modern chips dedicate hundreds to thousands of cores purely to SHA-256.
For anyone running hardware at home or in a Proof of Work operation, SHA-256 is the constant beneath every metric you watch. Hashrate is just how many double-SHA-256 evaluations your gear completes each second; difficulty sets how low the resulting hash must fall; and a healthy nonce stream is the sign that your boards are hashing as designed.
If you want to put SHA-256 to work yourself — whether that means a Bitaxe-class learning board or a full data-floor deployment — explore the hardware and repair services at the D-Central shop, or dig into the open-source mining devices in our Bitaxe hub.
In Simple Terms
The cryptographic algorithm Bitcoin uses for mining. ASIC chips are designed specifically to compute SHA-256 at high speed.
SHA-256 (Secure Hash Algorithm, 256-bit) is the one-way cryptographic hash function at the heart of Bitcoin. It takes any input and produces a fixed 256-bit output, and Bitcoin’s Proof of Work runs it twice in a row — SHA-256(SHA-256(block header)) — in a construction commonly written as SHA256d, or Double SHA-256.
SHA-256 belongs to the SHA-2 family, designed by the NSA and published as a standard by NIST. As a hash function it is deterministic (the same input always yields the same output), it is computationally infeasible to reverse, and even a one-bit change to the input scrambles the entire output. Those properties are exactly what Bitcoin needs: a verifier can confirm that a given block header hashes below the network target almost instantly, while the miner has no shortcut to finding such a header beyond brute-forcing candidates.
How SHA-256 drives ASIC mining
When a miner works on a block, it assembles a block header from the version field, the previous block hash, the merkle root (built from the coinbase transaction and the merkle branches the pool sends), the timestamp (ntime), the difficulty bits (nbits), and a 32-bit nonce. The miner then computes the double SHA-256 of that header and checks whether the result is less than or equal to the target. If it is, the share — or the block — is valid. If not, the nonce is incremented and the header is hashed again. A modern machine repeats this loop trillions of times per second.
A practical optimization sits inside this loop: the first 64 bytes of the 80-byte header rarely change between hashing attempts, so the SHA-256 compression of that first chunk can be pre-computed once and cached as a midstate. The ASIC only finishes the remaining work for each new nonce, which is why mining hardware and firmware pass midstates rather than full headers down to the chips.
Because each attempt is independent and the math is fixed bitwise logic, modular addition, and rotation, SHA-256 maps beautifully onto custom silicon. That is the reason Bitcoin ASICs exist at all: a chip can lay down thousands of hardwired hashing cores that do nothing but SHA-256, far faster and per-watt cheaper than any CPU or GPU. The trade-off is total specialization — an SHA-256 ASIC can mine Bitcoin and little else.
SHA-256 cores in real Bitmain chips
You can see SHA-256 silicon directly in the chips D-Central works on every day. The BM1366 (used in the S19 XP, S19k Pro, and the single-chip Bitaxe boards we support) packs roughly 894 small hashing cores on a TSMC 5nm die. The BM1370 in the S21 Pro carries about 1,280 cores, while the BM1362 in the S19j Pro family uses a smaller number of larger cores. The architecture differs, but the workload is identical: every one of those cores is a SHA-256 engine grinding nonces.
SHA-256 also shapes how miners talk to pools. The 32-bit nonce field gives only about 4.3 billion candidates per header, which a fast machine exhausts in well under a second. To keep the chips fed, the protocol stack supplies fresh work through the merkle root and through version-rolling, expanding the search space so hashboards never sit idle. This is why understanding the algorithm matters when diagnosing a miner reporting far below its rated hashrate — the bottleneck is often work delivery, not the silicon.
- Deterministic and one-way — trivial to verify a winning header, infeasible to reverse one.
- Double-hashed — Bitcoin applies SHA-256 twice (SHA256d) for its Proof of Work.
- Midstate caching — firmware pre-computes the static first half of the header to speed each attempt.
- Hardwired in silicon — modern chips dedicate hundreds to thousands of cores purely to SHA-256.
For anyone running hardware at home or in a Proof of Work operation, SHA-256 is the constant beneath every metric you watch. Hashrate is just how many double-SHA-256 evaluations your gear completes each second; difficulty sets how low the resulting hash must fall; and a healthy nonce stream is the sign that your boards are hashing as designed.
If you want to put SHA-256 to work yourself — whether that means a Bitaxe-class learning board or a full data-floor deployment — explore the hardware and repair services at the D-Central shop, or dig into the open-source mining devices in our Bitaxe hub.
