Author

Topic: bitcoin wallet master key (Read 408 times)

hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
October 06, 2018, 11:06:56 PM
#10
you're right this is measured in the release of v0.13 when the determinist hierarchical was implemented.

legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
October 06, 2018, 10:43:52 PM
#9
As far as I know the bitcoin core generates a keypair of 1000 keys derived from the master key as they are used then generate 1000 more keypairs but all derived from the same master key, isn'it?
The pre-generated keys are all invalidated upon the generation of a new master private. The updated wallet.dat with the new password will then generate another 1000 addresses using the renewed seed.
the importance of renewing the backup is important to be sure to have the backup with the password updated and not with the old one, but should not generate another keypairs different from the previous backup, where receiving coins from an address generated by the new backup is not updated if we used the wallet file from the previous backup.
The point of changing the password is to ensure that people would not be able to steal any coin if they get ahold of your possibly compromised or otherwise insecure backup. It doesn't make sense if you're trying to secure your wallet, yet someone else is still able to steal your future coins. You are not supposed to use the previous backup for any of your transactions. That is your responsibility.

hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
October 06, 2018, 10:26:04 PM
#8
Bitcoin Core does not support a mnemoric seed. The purpose of the wallet is to enable greater convenience to its users while it still functions on previous logic, where the keypool should be refreshed with a password change.

The master key might not be able to generate all the addresses in the wallet precisely due to the reason above. Bitcoin Core is meant to use with its wallet.dat and the extraction is better suited for advanced users. A wallet.dat backup after each password change would suffice.
As far as I know the bitcoin core generates a keypair of 1000 keys derived from the master key as they are used then generate 1000 more keypairs but all derived from the same master key, isn'it?

the importance of renewing the backup is important to be sure to have the backup with the password updated and not with the old one, but should not generate another keypairs different from the previous backup, where receiving coins from an address generated by the new backup is not updated if we used the wallet file from the previous backup.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
October 06, 2018, 10:12:55 PM
#7
but the bitcoin-qt does not only support a seed, xpriv etc? if it has a master key in the wallet dump file that xpriv would not be valid for the entire wallet and all private keys are not derived from that master key? you say that every time you change the wallet password a new seed is created in the bitcoin-qt wallet
Bitcoin Core does not support a mnemoric seed. The purpose of the wallet is to enable greater convenience to its users while it still functions on previous logic, where the keypool should be refreshed with a password change.

The master key might not be able to generate all the addresses in the wallet precisely due to the reason above. Bitcoin Core is meant to use with its wallet.dat and the extraction is better suited for advanced users. A wallet.dat backup after each password change would suffice.
hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
October 06, 2018, 08:03:55 PM
#6
With regards to Bitcoin Core... The "proper" method of backup is a copy of your wallet.dat (or even multiple redundant copies)

With the Bitcoin Core HD wallets, every time you change the wallet passphrase (including the first time you set one up), a new seed (and therefore new master private key) is created... And new addresses derived.

NOTE: All the old master keys/generated addresses are still stored in the wallet file.

So, every time you set/change the passphrase you need to make a new backup of your wallet.dat.

Or, do it the "hard way" and try and keep track of all the xprvs Tongue

but the bitcoin-qt does not only support a seed, xpriv etc? if it has a master key in the wallet dump file that xpriv would not be valid for the entire wallet and all private keys are not derived from that master key? you say that every time you change the wallet password a new seed is created in the bitcoin-qt wallet
HCP
legendary
Activity: 2086
Merit: 4361
October 05, 2018, 03:59:30 PM
#5
With regards to Bitcoin Core... The "proper" method of backup is a copy of your wallet.dat (or even multiple redundant copies)

With the Bitcoin Core HD wallets, every time you change the wallet passphrase (including the first time you set one up), a new seed (and therefore new master private key) is created... And new addresses derived.

NOTE: All the old master keys/generated addresses are still stored in the wallet file.

So, every time you set/change the passphrase you need to make a new backup of your wallet.dat.

Or, do it the "hard way" and try and keep track of all the xprvs Tongue
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
October 05, 2018, 12:37:16 AM
#4
which one is the xprv key ?

You are looking for an extended master private key which is in the first line saying "extended private masterkey".
xprv is the starting 4 characters when you have a master private key for bitcoin mainNet but when you use a different network (TestNet here) the first characters can be different. In this case they are tprv.
Check this out: https://en.bitcoin.it/wiki/List_of_address_prefixes

The next two lines are the addresses that were derived from that master key with the mentioned paths.

P.S. TestNet coins don't have any value but remember that you should never post your keys anywhere like this.
jr. member
Activity: 113
Merit: 5
October 05, 2018, 12:30:14 AM
#3
the command `bitcoin-cli dumpwallet walletfilename` shows

Quote
# extended private masterkey: tprv8ZgxMBicQKsPdXHSRpLtX329KK4Phqx3T2dMkiKK427K7yCqUbfK1NtQYdyFSsCsdbv5Emce61p ZY7TFXc3jvxMtPFzChbwxH5g6XCm9e6m

cUGWMsLyd7MBffw6poDHEiDoWXv2aqrHi1RcLSQ7C4yhAQMBdcYs 1970-01-01T00:00:01Z label= # addr=mgYCPhE63MQsB8hd66ZZYEGDZTETf9WrqF
.....
cUPRHPYeTefm566zr4iA5v7uqvwyQg9VqXAQfGqkRC8bGvf3pxSR 2018-04-27T03:58:55Z reserve=1 # addr=mfXfTUL9XRF7jFtruu6z3nxH7oiX7APuQT hdkeypath=m/0'/0'/740'

which one is the xprv key ?
legendary
Activity: 1624
Merit: 2481
October 04, 2018, 03:51:38 AM
#2
To spend single UTXO's you need the corresponding private key.

For a proper backup, it is enough to backup the master private key (starting with xpriv..).


You can get the xpriv by executing these commands:
Code:
walletpassphrase "YOUR_PASSWORD" 10
dumpwallet "FILENAME"

The first command unlocks your wallet for sensitive actions for 10 minutes.

The second command creates a text file in the data directory of core.
You'll be able to get your xpriv from this file.
jr. member
Activity: 113
Merit: 5
October 04, 2018, 12:44:08 AM
#1
Using bitcoin core cli, the getwalletinfo command returns the master key, such as:

  "hdmasterkeyid": "cc4cb4e5b4bfcd3a44570392faba1c43390f2405"

The master key will generate the private key. When i want to back up the key, do i back up the master key or the private key?
Jump to: