Constructing bitcoin address for known public key

in blockchain •  8 years ago 

By this publication I want to start a series of articles explaining blokchain structure, if of course it will be interested to community.

To construct address we need to be able to calculate ripemd160 and sha256 hash function. Additionally, we must be able to present data in base256 and base58 format. I'll show you how to do

it without having programming knowledge.

Services:

1. In order to translate base256 representation in binary find the appropriate service by the search phrase "hexadecimal to binary file" - suitable example

http://tomeko.net/online_tools/hex_to_file.php

2. In order to calculate the sha256 hash from the binary representation of the data find the appropriate service by the search phrase "file to sha256 online" - suitable example

https://md5file.com/calculator

3. In order to calculate the ripemd160 hash from the binary representation of the data find the appropriate service by the search phrase “file to ripemd160 online” - suitable example

http://hash.online-convert.com/ripemd160-generator

4. In order to represent the data as base58 from base256 representation find the appropriate service by the search phrase “base256 to base58 online” - suitable example http://lenschulwitz.com/base58

Construction:

Let us to consider construction of bitcoin address for the public key example. A public key is a consistent record of two solutions of elliptic equations preceded by a byte '04'. I plan to write about the solution of elliptic equations for constructing public key for a private one in the on of the next posts.

Let the solutions of elliptic equations in base256 representation are following:

678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb6 49f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f

Then the public key is:

04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f

In order to calculate the sha256 hash, we must first write the public key to a file in binary using the service 1 and then calculate the sha256 of the resulting file using the service 2.

1. sha256 => 261c1eb21fc4708c6acbe1cfc6d4565652e9e768b620782898936b93000a6c02

The same way for calculation ripemd160 hash.

2. ripemd160 => 62e907b15cbf27d5425399ebf6f0fb50ebb88f18

3. 00+ => 0062e907b15cbf27d5425399ebf6f0fb50ebb88f18

4. sha256 => 9b90f16de7f0e580c07735dac15ffe23e2f8f8e103914e509aa91913ffdb9fb6

5. sha256 => c29b7d937e3049e279391e62fdf00c12def7444013ddf6215808d10e9f2d5996

6. Get 4 bytes => c29b7d93

7. Concatinate results of (3) and (6) 0062e907b15cbf27d5425399ebf6f0fb50ebb88f18c29b7d93

To represent data as base58 use service 4.

8. base256 в base58 => 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

Done. This is the very first bitcoin address found in the blokchain.

Used diagram drawn by the bitcointalk.org user etotheipi. Russian translation: https://steemit.com/blockchain/@dervish/postroenie-bitkoin-adresa-po-izvestnomu-publichnomu-klyuchu

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @dervish! You have received a personal award!

Happy Birthday - 1 Year on Steemit Happy Birthday - 1 Year on Steemit
Click on the badge to view your own Board of Honor on SteemitBoard.

For more information about this award, click here

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @dervish! You have received a personal award!

2 Years on Steemit
Click on the badge to view your Board of Honor.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @dervish! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!