Mining into Bitcoin Addresses ! - How a Bitcoin Address is Created ?
Mining into Bitcoin Addresses ! - How a Bitcoin Address is Created ?

By CryptoUser | CryptoPublisher | 22 May 2020


The correct way to create a Bitcoin address is to use well tested, open source, peer reviewed wallet software. Manually handling keys has resulted in funds loss over and over again. Unlike other centralized systems losses in Bitcoin are usually unrecoverable.

There are currently three address formats in use:

  1. P2PKH - Pay 2 Public Key Hash  - which begin with the number 1, eg: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2.
  2. P2SH   - Pay 2 Script Hash - type starting with the number 3, eg: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy.
  3. Bech32 - SegWit Wallet Address - type starting with bc1, eg: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq

 

There’s a good chance your preferred website, wallet or exchange doesn’t support at least one of these formats. Read my article on different BTC address types Mining into Bitcoin Addresses ! - Everything You Must Know About Bitcoin Addresses.

Also, Create a Bitcoin SEGWIT P2SH Address using Electrum Wallet !.

 

What is in the Content ?

In this article, I am going to discuss about how to create a version 1 (P2PKH) wallet address. I am hoping to create a series of articles about Bitcoin addresses in future.

 

Into Business !

 

Bitcoin address is a 160-bit hash of the public portion of a public/private ECDSA keypair. Using public-key cryptography, you can "sign" data with your private key and anyone who knows your public key can verify that the signature is valid. 

 

0d782ef5d74c518eab606a929b4f3edbda2550133b84b13196c47425af61feac.png

 

Here is a brief overview of how address generation works, for informational purposes:

0 - Having a private ECDSA key

   18e14a7b6a307f426a94f8114701e7c8e774e7f9a47e2c2035db29a206321725 (The Private Key)

1 - Take the corresponding public key generated with it (33 bytes, 1 byte 0x02 (y-coord is even), and 32 bytes corresponding to X coordinate)

   0250863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352 (The Public Key)

2 - Perform SHA-256 hashing on the public key

   0b7c28c9b7290c98d7438e70b3d3f7c848fbd7d1dc194ff83f4f7cc9b1378e98

3 - Perform RIPEMD-160 hashing on the result of SHA-256

   f54a5851e9372b87810a8e60cdd2e7cfd80b6e31

4 - Add version byte in front of RIPEMD-160 hash (0x00 for Main Network)

   00f54a5851e9372b87810a8e60cdd2e7cfd80b6e31

(note that below steps are the Base58Check encoding, which has multiple library options available implementing it)
5 - Perform SHA-256 hash on the extended RIPEMD-160 result

   ad3c854da227c7e99c4abfad4ea41d71311160df2e415e713318c70d67c6b41c

6 - Perform SHA-256 hash on the result of the previous SHA-256 hash

   c7f18fe8fcbed6396741e58ad259b5cb16b7fd7f041904147ba1dcffabf747fd

7 - Take the first 4 bytes of the second SHA-256 hash. This is the address checksum

These are control digits which help the wallet determine you didn't mistype the address.

   c7f18fe8

8 - Add the 4 checksum bytes from stage 7 at the end of extended RIPEMD-160 hash from stage 4. This is the 25-byte binary Bitcoin Address.

   00f54a5851e9372b87810a8e60cdd2e7cfd80b6e31c7f18fe8

9 - Convert the result from a byte string into a base58 string using Base58Check encoding. This is the most commonly used Bitcoin Address format (P2PKH)

1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs - "This is your Bitcoin Address".

 

When sender gets a bitcoin address, their wallet converts it from base58check to hex, checks the checksum and removes both the Version-Byte (zero-byte) and checksum to get RIPEMD160(SHA256(pubkey)) - value in step 03. Then it proceeds with scriptPubKey verification.

That's why it is called Pay-to-public-key-hash. Bitcoin address is just a way of encoding a public key hash.

 

 

Thank You for Viewing.

Please consider following and helping with a donation.

 

 

StarClicks - Earn Some Extra Money by Clicking Ads !

https://www.publish0x.com/economynext/starclicks-earn-some-extra-money-by-clicking-ads-xlllxyn

 

Honeygain - Money for Your Excess Internet Capacity !

https://www.publish0x.com/economynext/honeygain-money-for-your-excess-internet-capacity-xejjjyp

 

If you haven't signed in to Publish0x, use My publish0x referral link

https://www.publish0x.com?a=openM14d7A

 

1) BTC
368UxYjPLyJ4TEDQ9X5PCAUwDhq6dwhxfQ

2) ETH
0xAA6f54B665702e6CBf29C94C4E51121fB959FcC8

3) LTC
LgH2TMAtLgzopSSiixWKDqR76AWRoqhSWJ

4) BCH
qr4hcjdc3p94q3dgucn770q7surq4gs8lvpc4afx2f

5) DGB
DB9ixZvnTfxqT5Udzy9wHULJNFKd1FxSnz

6) BTG
GWCfg95P1LQgSqeqJacNJvuRqLZ8qftw4R

7) BAT
0x1a116B3bef9D7291F5147d8a0E2b9389c94D18e7

8)DASH
XyES8Fd5gzMHbGqXCFF3immfSRoepps9ij

9)ZEC
t1KgedEbS1pyeWQWoehBDoCJJ3MspmCptv5

10)MONERO
47JrgDDuAvRboX1mRTyAbuHGtGC2LZj5Rggui3u1d5s6Z3UB3oaRZfvE2MhWwuAHGMV3Wn8Us7GTggc8MiCMSmrMUHVCsmW

 

 

View Other Articles:

1) LocalCryptos - Non Custodial P2P marketplace for Cryptos !

https://www.publish0x.com/cryptopublisher/localcryptos-non-custodial-p2p-marketplace-for-cryptos-xkkkkrq

2) Create a Bitcoin SEGWIT P2SH Address using Electrum Wallet !

https://www.publish0x.com/cryptopublisher/create-a-bitcoin-segwit-p2sh-address-using-electrum-wallet-xllleez

3) StarClicks - Earn Some Extra Money by Clicking Ads !

https://www.publish0x.com/economynext/starclicks-earn-some-extra-money-by-clicking-ads-xlllxyn

4) Mining into Bitcoin Addresses ! - A Non-Base58 Character in a Bitcoin Addresses ?

https://www.publish0x.com/cryptopublisher/mine-for-a-great-cause-share-your-idle-computing-power-and-a-xgdykye

5) If you are interested in some nice relaxing music, check my YouTube Channel

https://www.youtube.com/channel/UCCptwwc697hEo8vMA8nVCWw/

 




Sources:

https://en.bitcoin.it/wiki/Address

https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses

https://bitcoin.stackexchange.com/questions/52022/what-is-the-significance-of-version-byte-and-address-checksum-in-version-1-bitco



CryptoPublisher
CryptoPublisher

This blog will aid you to learn about various digital assets and a little bit about mining.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.