Note these addresses are derived from the BIP32 Extended Key
With Bitcoin Improvement Proposals (BIP) we can be the witnesses of huge changes and development of blockchain based wallets. In the middle of all BIPs, there are three most important ones, defining the standards or modern hierarchical deterministic wallets. BIP-32, BIP-39, and BIP-44 are nowadays supported by most modern hierarchical deterministic wallets called also the HD wallets.
The BIP-32 mainly describes the way of building the hierarchical deterministic wallet basing on the BIP-39 features. What does it mean? BIP-32 is exactly explaining how the bitcoin master private key and the master chain code is being created from delivered by BIP-39 bitcoin seed. The bitcoin seed generated by BIP-39 is the base for generating deterministic and hierarchical deterministic wallets. Without the bitcoin seed we wouldn't be able to generate our bitcoin master private key. The mentioned bitcoin seed generated by deterministic key generator is being created from so-called mnemonic phrase containing all mnemonic words randomly chosen from the list and salt combining mnemonic phrase with passphrase, which provides additional protection.
How does BIP-32 work?
It generates a special 512 bits hash containing two 256 bits parts identified as left hash and the right hash. The left hash contains the bitcoin master private key and the right one contains master chain code. Thanks to attached bitcoin master private key we are able to generate master public keys.
To generate mentioned 512 bits hash we need a special function using HMAC SHA512 features and three parameters like index number, chain code and one of two in the brackets (parent bitcoin private key or parent public key). The function creating the hash is also called the Child Key Derivation Function. Depending on which parent bitcoin private key or parent public key we choose we can create respectively hardened key or normal key. For hardened keys, we also have to use specific values of mentioned previously index. While using parameters for creating a hardened key, CKD function will create a new hash called child private key containing parent bitcoin private key stored in the left hash and child chain code stored in the right hash. If we use parameters to create a normal key, as the return we receive a child public key containing parent public key in the left hash and child chain code.
We can repeat execution of Child Key Derivation function and create different unlinkable child keys from the same parent keys.
The main of BIP-32 is to generate Extended Private Keys and Extended Public Keys. The first one EPRV contains the parent bitcoin private key and parent chain code. The second XPUB contains parent public key and parent chain code.
Watch bitcoin account balances without the ability to spend coins?
What is easy to notice thanks to Extended Private Keys we can create another bitcoin private and public keys which allow us to receive and sign transactions. On the other side, the Extended Public Keys allow us only to create another public keys. It doesn't mean anything bad unless you want the wallet only to track the balance of your accounts without being able to spend the coins.
How bitcoin seed is being generated?
Bitcoin seed delivered by BIP-39 is being generated with deterministic key generator. The deterministic key generator is nothing else than a function called Password-Based Key Derivation Function 2. The deterministic key generator combines mentioned in the top section of the article salt and mnemonic phrase into the bitcoin seed.
What is private key WIF?
The private key WIF is defined by Wallet Import Format. What does it mean? It means mostly that thanks to private key WIF we are able to convert our bitcoin private key into the private key WIF format. The wallet import format is just another way of storing the original version of our private keys. We can convert this key continuously.