Author

Topic: Is there any general explanation of this? (Read 1080 times)

legendary
Activity: 1652
Merit: 2301
Chief Scientist
February 26, 2011, 07:29:40 PM
#2
See:
  https://en.bitcoin.it/wiki/Block_hashing_algorithm

The exact hash done is double-sha256: sha256(sha256(block_header_data))
See:
 http://en.wikipedia.org/wiki/SHA-2

... for information about sha256
newbie
Activity: 39
Merit: 0
February 26, 2011, 07:25:59 PM
#1
Other than the source code, I have not been able to find any mention of how exactly bitcoin generates a sha256 hash? It seems like some simple "How things work" documentation might really help with adoption and understanding? I do know that it is written in the source, but I am awful at reading C++ code?

For instance, I am not even sure exactly what is being hashed? Is it the concatenation of the last winning hash message and a randomly generated message? What are the lengths of each of these messages (I would assume 256)?

Is it like this:
sha256(<256 bit original message> + <256 bit generated message)) ? Then check if it has the correct number of leading zero's?

Thank you.
Jump to: