Bitcoin Forum
April 16, 2024, 09:17:16 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin wallet master key  (Read 377 times)
victorkimba17 (OP)
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
October 04, 2018, 05: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?
1713302236
Hero Member
*
Offline Offline

Posts: 1713302236

View Profile Personal Message (Offline)

Ignore
1713302236
Reply with quote  #2

1713302236
Report to moderator
1713302236
Hero Member
*
Offline Offline

Posts: 1713302236

View Profile Personal Message (Offline)

Ignore
1713302236
Reply with quote  #2

1713302236
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713302236
Hero Member
*
Offline Offline

Posts: 1713302236

View Profile Personal Message (Offline)

Ignore
1713302236
Reply with quote  #2

1713302236
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
October 04, 2018, 08: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.

victorkimba17 (OP)
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
October 05, 2018, 05: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 ?
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
October 05, 2018, 05: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.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
October 05, 2018, 08: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

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Forsyth Jones
Hero Member
*****
Offline Offline

Activity: 1134
Merit: 590


Press F for Leo


View Profile WWW
October 07, 2018, 01:03:55 AM
 #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

.freebitcoin.       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.PLAY NOW.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4158



View Profile
October 07, 2018, 03:12:55 AM
 #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.

..JAMBLER.io..Create Your Bitcoin Mixing
Business Now for   F R E E 
▄█████████████████████████████
█████████████████████████
████▀████████████████████
███▀█████▄█▀███▀▀▀██████
██▀█████▄█▄██████████████
██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████
█████▄▄▄██████████▀▄████
█████▀▄█▄██████▀█▄█████
███████▀▄█▀█▄██▀█▄███████
█████████▄█▀▄█▀▄█████████
█████████████████████████
█████████████████████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
      OUR      
PARTNERS

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
▄█████████████████████████████
████████▀▀█████▀▀████████
█████▀█████████████▀█████
████████████████████████
███████████████▄█████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████▀█████████
████████████████████████
█████▄█████████████▄█████
████████▄▄█████▄▄████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
   INVEST   
BITCOIN

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
Forsyth Jones
Hero Member
*****
Offline Offline

Activity: 1134
Merit: 590


Press F for Leo


View Profile WWW
October 07, 2018, 03:26:04 AM
 #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.

.freebitcoin.       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.PLAY NOW.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4158



View Profile
October 07, 2018, 03:43:52 AM
 #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.


..JAMBLER.io..Create Your Bitcoin Mixing
Business Now for   F R E E 
▄█████████████████████████████
█████████████████████████
████▀████████████████████
███▀█████▄█▀███▀▀▀██████
██▀█████▄█▄██████████████
██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████
█████▄▄▄██████████▀▄████
█████▀▄█▄██████▀█▄█████
███████▀▄█▀█▄██▀█▄███████
█████████▄█▀▄█▀▄█████████
█████████████████████████
█████████████████████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
      OUR      
PARTNERS

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
▄█████████████████████████████
████████▀▀█████▀▀████████
█████▀█████████████▀█████
████████████████████████
███████████████▄█████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████▀█████████
████████████████████████
█████▄█████████████▄█████
████████▄▄█████▄▄████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
   INVEST   
BITCOIN

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
Forsyth Jones
Hero Member
*****
Offline Offline

Activity: 1134
Merit: 590


Press F for Leo


View Profile WWW
October 07, 2018, 04:06:56 AM
 #10

you're right this is measured in the release of v0.13 when the determinist hierarchical was implemented.


.freebitcoin.       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.PLAY NOW.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!