<p>No, not at all.
The hash of every block depends on the previous block. And it also depends on all the transactions included in the block. That's the whole point :-)</p>

CC BY-SA 3.0
2014-04-18T20:48:01.040Z
2014-04-18T20:48:01.040Z
knaperek
<p>Bitcoin uses two rounds of SHA256 on the entire contents of each block (which includes a reference to the previous block) as well as a randomly varied nonce. When the result of those calculations are below a network-determined threshold it is considered to be a valid solution. These solutions are published along with the block as it is distributed to the network so finding the hash of old blocks is trivially easy, you just look them up. Verifying that the math was done correctly and that the result meets the criteria requires only a single iteration of sha256(sha256(block+nonce)) while finding the appropriate nonce the first time takes an absolutely insane number of attempts.</p>

<p>The insane number of attempts is necessarily because the output of sha256 is, effectively, pseudorandom and covers a huge space. The algorithm is deterministic, so sha256(x) will always have the same result, but the result is entirely unpredictable and minor changes in the value of x will dramatically alter the results.</p>

<p>The only way to predict the output of a cryptographically secure hash algorithm like sha256 is a pre-image attack: You would have to pre-generate the contents of all possible blocks, hash them and store the results. At that point solving a block would be as trivial as a database lookup, assuming you could store all 2^256 possible outcomes, which you can't, and that you could generate all 2^256 possible outcomes before the heat death of the universe, which you can't.</p>

CC BY-SA 3.0
2014-04-18T21:20:38.763Z
2014-04-18T21:25:52.427Z
2014-04-18T21:25:52.427Z
David Perry
<p>to create the block chain, the Bitcoin network runs hashing algorithms for each block, is it mathematically possible to predict the hash value of say, the 100th block from the last block currently in the chain?</p>

<hash><cryptography><sha256>
Are Bitcoin Block Hashes Predictable
254code_rep
# Are Bitcoin Block Hashes Predictable

(Asked by: username_0 on 2014-04-18)

to create the block chain, the Bitcoin network runs hashing algorithms for each block, is it mathematically possible to predict the hash value of say, the 100th block from the last block currently in the chain?

**Tags:** hash, cryptography, sha256


---

## 2 answers

### Answer by username_2 on 2014-04-18. Score: 4 | Accepted answer

Bitcoin uses two rounds of SHA256 on the entire contents of each block (which includes a reference to the previous block) as well as a randomly varied nonce. When the result of those calculations are below a network-determined threshold it is considered to be a valid solution. These solutions are published along with the block as it is distributed to the network so finding the hash of old blocks is trivially easy, you just look them up. Verifying that the math was done correctly and that the result meets the criteria requires only a single iteration of sha256(sha256(block+nonce)) while finding the appropriate nonce the first time takes an absolutely insane number of attempts.

The insane number of attempts is necessarily because the output of sha256 is, effectively, pseudorandom and covers a huge space. The algorithm is deterministic, so sha256(x) will always have the same result, but the result is entirely unpredictable and minor changes in the value of x will dramatically alter the results.

The only way to predict the output of a cryptographically secure hash algorithm like sha256 is a pre-image attack: You would have to pre-generate the contents of all possible blocks, hash them and store the results. At that point solving a block would be as trivial as a database lookup, assuming you could store all 2^256 possible outcomes, which you can't, and that you could generate all 2^256 possible outcomes before the heat death of the universe, which you can't.


---

### Answer by username_1 on 2014-04-18. Score: 1

No, not at all.
The hash of every block depends on the previous block. And it also depends on all the transactions included in the block. That's the whole point :-)


---

