Author

Topic: Problem when I try to create an address from zero (Read 188 times)

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Thank you, it works properly.

Are there any libraries that allow me to convert hex to ripemd160 with javascript? I'm trying to build something.
legendary
Activity: 2268
Merit: 18711
Here, use this site instead: https://www.pelock.com/products/hash-calculator

As pooya87 says, the output of the SHA256 needs to be inputted in to the RIPEMD160 function as hexadecimal bytes, and not as a plain text string. If you take the result of your SHA256 hash:
Code:
0B7C28C9B7290C98D7438E70B3D3F7C848FBD7D1DC194FF83F4F7CC9B1378E98
And enter it in to the second box down titled "Hash hex bytes" and then hit calculate, you will get the correct RIPEMD160 result:
Code:
F54A5851E9372B87810A8E60CDD2E7CFD80B6E31
legendary
Activity: 3472
Merit: 10611
it is because in your first hash you set the input type correctly but then you moved to another website that didn't have that option so your input type is wrong. more accurately your RIPEMD160 is interpreting the input (0b7c28...) as a UTF8 string not hexadecimal input.
legendary
Activity: 952
Merit: 1385
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
^In this link it shows us the procedure to create a bitcoin address (version 1)

I take the public key (0250863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352) and I hash it with SHA256:



Then it says that I have to take the result of SHA256 (0b7c28c9b7290c98d7438e70b3d3f7c848fbd7d1dc194ff83f4f7cc9b1378e98) and perform RIPEMD-160 to it. While the site says that the result should be that:

Code:
f54a5851e9372b87810a8e60cdd2e7cfd80b6e31

I get that:
Code:
6836d8a2986c8c34881114fe0412a1d416ae02a8



What do I do wrong? All the "ripemd160 hash online" sites print me the same result.
Jump to: