Author

Topic: Wallet Address hash generation (Read 1075 times)

newbie
Activity: 2
Merit: 0
July 11, 2014, 02:43:24 AM
#6
Thanks you so much for your help guys!
donator
Activity: 1218
Merit: 1080
Gerald Davis
July 11, 2014, 12:17:54 AM
#5
In fact for the last 3 years I've wondered why nobody made an online SHA256 hashing tool that has the option to convert the HEX to actual binary and then hash it.

The tool I linked does (and it outputs RIPEMD-160 was well).
legendary
Activity: 1862
Merit: 1014
Reverse engineer from time to time
July 11, 2014, 12:12:45 AM
#4
This is a common mistake. I admit when I first did this I was baffled by the different results. The problem is indeed the online tool. In fact for the last 3 years I've wondered why nobody made an online SHA256 hashing tool that has the option to convert the HEX to actual binary and then hash it.
legendary
Activity: 1162
Merit: 1010
July 11, 2014, 12:00:38 AM
#3
Damn, Gerald, you keep beating me by a few minutes!

donator
Activity: 1218
Merit: 1080
Gerald Davis
July 10, 2014, 11:50:39 PM
#2
The problem is your tool.   The tool you are using is hashing the input as "text".  Bitcoin public keys are byte arrays.  We may represent them as a hex values but you need to be hashing the actual bytes (i.e "0x77" is the value 119 not two numeric digits seven and seven).

You need a tool which hashes the bytes.  Here is one.   It supports RIPEMD160 as well so you can walk through the example from the beginning.
http://www.fileformat.info/tool/hash.htm?hex=445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094

newbie
Activity: 2
Merit: 0
July 10, 2014, 11:24:22 PM
#1
Hi, im using this tutorial https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses#How_to_create_Bitcoin_Address to understand how to creat bitcoin wallet addresses.

But, for example, if u start from step 5 and hash this string 445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094 with sha 256 again the result is:

7760845DCFD8C366AE89620BE2F368D255D710BC7493628CA0DCDED9CA476E5A and not D61967F63C7DD183914A4AE452C9F6AD5D462CE3D277798075B107615C1A8A30 like the step 6 shows.

Where is my error? I cant' figure this out.


To hash with sha 256 im using: http://www.xorbin.com/tools/sha256-hash-calculator
or

NodeJS: var hash = crypto.createHash('sha256').update(p).digest('hex');

(same results)

Thanks in advance!
Jump to: