Bitcoin Forum
November 07, 2024, 05:52:48 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What thing exactly being hashed?  (Read 553 times)
Bannedseller (OP)
Sr. Member
****
Offline Offline

Activity: 581
Merit: 250


View Profile
October 20, 2015, 09:07:54 AM
 #1

I have seen this page: https://en.bitcoin.it/wiki/Block_hashing_algorithm and seen bitcoin is hashing a 80 byte block header. However, when I gather information for block 379726, then I got a hex string of 00000003000000000000000004174cb956530251b08d70ae38fb0c028c73a2c7a859a676d9b8780 c956fa5af44815a35c2067b3b4d9639a8796faa770182dd76ed70366d5625fd4218120f14c3ef30 f4 with hash of 9fd1d6cbabefb73bfc51568c3d5eac394f6b1c3b04377e51684a88aa3951ef6b. This mustn't be what bitcoin is hashing (bitcoin hashes have many leading zeros). Then what exactly bitcoin is hashing?

Sorry if being in wrong section.
Velkro
Legendary
*
Offline Offline

Activity: 2296
Merit: 1014



View Profile
October 20, 2015, 07:56:15 PM
 #2

Its very complicated technical question. I think its not good for  Beginners & Help, maybe try Development & Technical Discussion
Bifta
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
October 20, 2015, 08:32:59 PM
 #3

That is the data that is being hashed. But what you are probably hashing is the ascii text, not the data as hex bytes. You need to hash it has hex bytes, so in most command line hashers, there should be something like a binary option which will read that hex string as hex bytes.

Here is a site that I use that can hash the hex bytes as binary and it returns multiple hashes. http://www.fileformat.info/tool/hash.htm
Bannedseller (OP)
Sr. Member
****
Offline Offline

Activity: 581
Merit: 250


View Profile
October 21, 2015, 01:45:26 AM
 #4

Its very complicated technical question. I think its not good for  Beginners & Help, maybe try Development & Technical Discussion
I posted that to Mining board previously, so a moderator moved it here and it should be the most suitable board.
That is the data that is being hashed. But what you are probably hashing is the ascii text, not the data as hex bytes. You need to hash it has hex bytes, so in most command line hashers, there should be something like a binary option which will read that hex string as hex bytes.

Here is a site that I use that can hash the hex bytes as binary and it returns multiple hashes. http://www.fileformat.info/tool/hash.htm
I have used that site before I posted here and got that hash.
Bifta
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
October 21, 2015, 01:58:58 AM
 #5

Its very complicated technical question. I think its not good for  Beginners & Help, maybe try Development & Technical Discussion
I posted that to Mining board previously, so a moderator moved it here and it should be the most suitable board.
That is the data that is being hashed. But what you are probably hashing is the ascii text, not the data as hex bytes. You need to hash it has hex bytes, so in most command line hashers, there should be something like a binary option which will read that hex string as hex bytes.

Here is a site that I use that can hash the hex bytes as binary and it returns multiple hashes. http://www.fileformat.info/tool/hash.htm
I have used that site before I posted here and got that hash.
Bitcoin uses little endian. So the data you actually want to hash is 0300000076a659a8c7a2738c020cfb38ae708db051025356b94c170400000000000000006d3670e d76dd820177aa6f79a839964d3b7b06c2355a8144afa56f950c78b8d942fd2556140f1218f430ef c3. The resulting hash will also be little endian so it will need to be byte swapped in order to get the block hash.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!