I goal is to understand. I do not want to earn money with mining. (I have a server without GPU)

Here is what i've done:

I have downloaded, maked and installed bitcoin sourcecode from github.

It seems to work because i can interact with bitcoind with bitcoin-cli command.

I know this is not a good practice but i want to "see" my private key.

I have read several documentation and tutorials and they said i need to generate an address first, then call dumpprivkey method.

Like this:

$ bitcoin-cli getnewaddress

$ bitcoin-cli dumpprivkey xxxxxxx

I do not understand but if i repeat twice this operation, i get 2 differents private keys.

So this is not the private key i am looking for... What is those privates keys ?


2 Answers 2


Let's suppose I have lost everything except this extended master key. How can I setup a new fresh computer and retrieve all my bitcoins just with this key?

According to How to get xpub or mpk(bip32) for my bitcoin core wallet?

you can export the xpriv with dumpwallet

According to https://bitcointalk.org/index.php?topic=3866008.0

Bitcoin Core does not have a way to directly import [master] private keys. You could derive a bunch of private keys in WIF from the xpriv and import them all at once, but you can't import the xprv directly.

  • Thanks for your answer. Everything is very confuse for me. I will do a test : i will take 2 computers. Whats commands should i type on both computer in order to « transfert » my account from first to second computer
    – Bob5421
    Aug 25, 2019 at 14:44
  • 1
    @Bob5421: That's a different question. See en.bitcoin.it/wiki/Backingup_your_wallet - Copy the wallet.dat file from the old wallet and use it to overwrite the wallet.dat file of a newly installed empty wallet on a different computer. Aug 25, 2019 at 17:23

This is the private key that allows you to spend Bitcoin which is sent to the corresponding address.

If you run both of those commands twice, you will generate a new key pair and a new address each time, which will be different.

  • 1
    Okay but i have another private key somewhere which is global for my account ?
    – Bob5421
    Aug 23, 2019 at 15:11
  • 1
    yes, each key pair is derived from a master key, see bitcoincore.org/en/doc/0.18.0/rpc/wallet/dumpwallet it will be at the top of the output file.
    – JBaczuk
    Aug 23, 2019 at 15:21
  • Thanks, i can see an "extended" master key. What is the difference between extended and not extended master key (which i cannot see) Thanks
    – Bob5421
    Aug 23, 2019 at 15:33
  • 1
    It is used for hierarchical deterministic key derivation, see github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
    – JBaczuk
    Aug 23, 2019 at 15:56
  • 1
    Let's suppose i have lost everything except this extended master key. How can i setup a new fresh computer and retreive all my bitcoins just with this key
    – Bob5421
    Aug 24, 2019 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.