Bitcoin Forum
June 27, 2017, 11:02:58 PM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Is there any general explanation of this?  (Read 905 times)
samedhi
Newbie
*
Offline Offline

Activity: 1


View Profile
February 27, 2011, 12:25:59 AM
 #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.
1498604578
Hero Member
*
Offline Offline

Posts: 1498604578

View Profile Personal Message (Offline)

Ignore
1498604578
Reply with quote  #2

1498604578
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1498604578
Hero Member
*
Offline Offline

Posts: 1498604578

View Profile Personal Message (Offline)

Ignore
1498604578
Reply with quote  #2

1498604578
Report to moderator
1498604578
Hero Member
*
Offline Offline

Posts: 1498604578

View Profile Personal Message (Offline)

Ignore
1498604578
Reply with quote  #2

1498604578
Report to moderator
1498604578
Hero Member
*
Offline Offline

Posts: 1498604578

View Profile Personal Message (Offline)

Ignore
1498604578
Reply with quote  #2

1498604578
Report to moderator
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
February 27, 2011, 12:29:40 AM
 #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

How often do you get the chance to work on a potentially world-changing project?
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!