Author

Topic: Bitcoin address manual generetion (Read 166 times)

member
Activity: 254
Merit: 32
March 09, 2021, 06:44:49 AM
#10
Hi, I'm trying to generate Bitcoin address from private key manually following this article https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
But when I apply SHA-256 to public key mentioned in example I'm getting another hash then shown in this article. Same happens when I perform RIPEMD-160 hashing of SHA-256 hash.
It happens not only when I follow this article but any other article too.
Could someone suggest what did I do wrong?

I had the same problems, the study is the key. For educational purpose a made this:
https://bitcointalksearch.org/topic/excel-hash-256-5322103
And use this site to learn how hash works:
https://www.fileformat.info/tool/hash.htm
This forum has a lot of material, for increase your  learning.



legendary
Activity: 1596
Merit: 1288
March 09, 2021, 06:10:54 AM
#9
i used this https://www.mobilefish.com/services/cryptocurrency/cryptocurrency.html to learn how to generate bitcoin address from random numbers.


Use it to learn how bitcoin works and never send bitcoin to it.
newbie
Activity: 4
Merit: 0
March 08, 2021, 09:34:04 AM
#8
Thanks!!!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
March 08, 2021, 09:29:02 AM
#7
I mean tool for performing RIPEMD160 hashing for HEX values. Because all online hash tools work only with String input data

https://learnmeabitcoin.com/tools/ripemd160/
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
March 08, 2021, 09:28:54 AM
#6
I mean tool for performing RIPEMD160 hashing for HEX values. Because all online hash tools work only with String input data
I've used this before: https://www.pelock.com/products/hash-calculator.

Go to the page and input the values in hash hex bytes and scroll down for RIPEMD160.
newbie
Activity: 4
Merit: 0
March 08, 2021, 09:23:59 AM
#5
I mean tool for performing RIPEMD160 hashing for HEX values. Because all online hash tools work only with String input data
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
March 08, 2021, 09:07:19 AM
#4
Great! This is it. Maybe you may suggest any tool which can encode HEX values using RIPEMD-160?
But this is not an encoding. It's a hash function. Encoding means that it can also be decoded, for example a base64 text. Anything that has passed through a hash function like SHA256 or RIPEMD-160 means that there is no way back. As for recommended tools, what exactly are you looking for? Tool can be a line of code, a library or a site just like the one I posted. You have to clarify what you want to do.
newbie
Activity: 4
Merit: 0
March 08, 2021, 08:33:36 AM
#3
Great! This is it. Maybe you may suggest any tool which can encode HEX values using RIPEMD-160?
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
March 08, 2021, 07:40:45 AM
#2
Could someone suggest what did I do wrong?
You're probably hashing a string and not a hex. On the third step, you'll have to hash it as a hex and not as a string. Based on the wiki's example if you hash the corresponding public key as a hex you'll get the correct result:

Code:
0b7c28c9b7290c98d7438e70b3d3f7c848fbd7d1dc194ff83f4f7cc9b1378e98

But if you hash it as a string you'll get a different result, which is:
Code:
a9ce83de3a0ff3516b7c50cdd787e9f69f152f227d93c9512774231e7132e925

You can hash a hex through emn178.github.io. Just choose "hex" instead of "text" in the input type dropdown. Same thing must happen on RIPEMD-160.
newbie
Activity: 4
Merit: 0
March 08, 2021, 07:33:07 AM
#1
Hi, I'm trying to generate Bitcoin address from private key manually following this article https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
But when I apply SHA-256 to public key mentioned in example I'm getting another hash then shown in this article. Same happens when I perform RIPEMD-160 hashing of SHA-256 hash.
It happens not only when I follow this article but any other article too.
Could someone suggest what did I do wrong?
Jump to: