Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Bestly on July 28, 2018, 07:13:54 PM



Title: Difference Between BTC Main Address & Child Address?
Post by: Bestly on July 28, 2018, 07:13:54 PM
Before long Imtoken app started having wallet Bitcoin wallet aside the Ethereum wallet it used to have.
Now, in the Bitcoin wallet inside Imtoken app, there is the Main Address and then Child Address, different from each other.

Can anyone who knows the difference please elucidate on this? How are they related please?


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: jackg on July 28, 2018, 07:21:31 PM
Can you post an example of each?

Does a main address begin with a 1/3/bc1? If so, it's a Bitcoin address, if not, it's a public key that can derive your other addresses.

If not, one might be a change and the other a regular receiving address... 


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: ETFbitcoin on July 28, 2018, 07:45:35 PM
Weird, i've used/try few wallets, but never know/find this term. Just like jackg mentioned, IMO it's another term for main and change address.

Edit : simple google search me led to this page (https://support.token.im/hc/en-us/articles/360002162893-How-do-I-set-the-Bitcoin-child-address- (https://support.token.im/hc/en-us/articles/360002162893-How-do-I-set-the-Bitcoin-child-address-)) and looks like child address refer to address which created with Extended Public Key (xPub).

From their guide/screenshot, looks like Main address is the first bitcoin address that created with xPub and Child address is the 2nd/later bitcoin address created with xPub which isn't used yet. I might wrong since i don't actually use the wallet though.


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: tarball on July 28, 2018, 07:49:14 PM
Can you post an example of each?

Does a main address begin with a 1/3/bc1? If so, it's a Bitcoin address, if not, it's a public key that can derive your other addresses.

If not, one might be a change and the other a regular receiving address...  

I think you mean it's a 'master public key', not a 'public key' because a public key can only derive one bitcoin address (unless you have the chain code and index number and I doubt that the wallet would show those). I could be wrong though.


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: jackg on July 29, 2018, 10:13:38 AM
Can you post an example of each?

Does a main address begin with a 1/3/bc1? If so, it's a Bitcoin address, if not, it's a public key that can derive your other addresses.

If not, one might be a change and the other a regular receiving address...  

I think you mean it's a 'master public key', not a 'public key' because a public key can only derive one bitcoin address (unless you have the chain code and index number and I doubt that the wallet would show those). I could be wrong though.

Yes you're right.
Although both the master public key and addresses are public keys. Just the xpub isn't accepted in the network for transactions.

Addresses are hashes of their private keys.
Master public keys are hashes of their xprv/master private keys.

Meanwhile, if ETF is right, the master public key can be derived from the two private keys (or potentially addresses) of the main and child address.


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: ranochigo on July 30, 2018, 02:35:07 PM
Meanwhile, if ETF is right, the master public key can be derived from the two private keys (or potentially addresses) of the main and child address.
There's no main or child address. The master private and public keys are the "main" keys while any addresses generated are the child keys.

The master public key can't be derived from two addresses or else it would be pretty flawed and we wouldn't be using it anymore. You can, however derive the master private key using one of the child private key and the master public key with little difficulty. It applies to all unhardened keys (ie. those with master public key).


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: jackg on July 30, 2018, 04:02:54 PM
Meanwhile, if ETF is right, the master public key can be derived from the two private keys (or potentially addresses) of the main and child address.
There's no main or child address. The master private and public keys are the "main" keys while any addresses generated are the child keys.
The main address as ETF said is the address that is used for recieving and the child address is the change address (nothing to do with master keys)

The master public key can't be derived from two addresses or else it would be pretty flawed and we wouldn't be using it anymore. You can, however derive the master private key using one of the child private key and the master public key with little difficulty. It applies to all unhardened keys (ie. those with master public key).

Hardened ones have a ' at the end of the derivation path don't they (or had I got that wrong)?


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: ranochigo on July 30, 2018, 04:25:34 PM
The main address as ETF said is the address that is used for recieving and the child address is the change address (nothing to do with master keys)
Oh okay I get what you mean.

Hardened ones have a ' at the end of the derivation path don't they (or had I got that wrong)?
Yup. BIP44 states that an apostrophe means that the path is hardened. If your derivation path is hardened, xpub can't be generated. Without the xpub, you cannot use a child private key and the (non-existent) xpub to generate the master private key.


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: HCP on July 30, 2018, 10:06:35 PM
Now, in the Bitcoin wallet inside Imtoken app, there is the Main Address and then Child Address, different from each other.

Can anyone who knows the difference please elucidate on this? How are they related please?
Looking at the "Imtoken" specific case... Their definition of "Main Address" and "Child Address" is simply what ETF stated earlier...

looks like Main address is the first bitcoin address that created with xPub and Child address is the 2nd/later bitcoin address created with xPub which isn't used yet.

That is to say that:
"Main Address" = m/44'/0'/0'/0/0
"Child Address" = m/44'/0'/0'/0/1, m/44'/0'/0'/0/2... m/44'/0'/0'/0/n

I guess they have done this so that users will think they have a "fixed" address. I have seen a lot of newbies get confused when an HD wallet starts spitting out new receive addresses and get concerned that they're going to lose coins.

This Main/Child address system that Imtoken have created looks like an attempt to try and ease these concerns by pretending that you have both a (fixed) "main" address... but can also generate multiple unique addresses if you want.


The main address as ETF said is the address that is used for recieving and the child address is the change address (nothing to do with master keys)
No... it isn't "receive" and "change"... they're all "receive" addresses... the screen shows xpub 0/0 and xpub 0/1...


Title: Re: Difference Between BTC Main Address & Child Address?
Post by: danitech on August 06, 2018, 09:52:58 AM
i think If you use the same address to receive Bitcoin, everyone can track all your transaction records easily. By creating a new address, a child address, you are better able to maintain your privacy.