Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: platorin on November 05, 2017, 01:05:55 AM



Title: Exporting private keys from old Core Wallet
Post by: platorin on November 05, 2017, 01:05:55 AM
Hey Guys. I would like to export my private keys from Core Wallet. Let's say I have several addresses with at least one incoming transaction on each. Would that mean I will have to a private key for each address individually, or would I rather receive one key for all addresses?

Thanks!


Title: Re: Exporting private keys from old Core Wallet
Post by: Spendulus on November 05, 2017, 03:23:01 AM
Hey Guys. I would like to export my private keys from Core Wallet. Let's say I have several addresses with at least one incoming transaction on each. Would that mean I will have to a private key for each address individually, or would I rather receive one key for all addresses?

Thanks!
Usually it's a mess. You can dump them all as is, or move the coin to one key and then dump just that one.


Title: Re: Exporting private keys from old Core Wallet
Post by: HCP on November 05, 2017, 04:44:28 AM
Each address has it's own key... so, logically, if you have coins spread across multiple address, you're going to need to get multiple keys. (NOTE: Instead of using 'dumpprivkey' multiple times to get each private key, you can use the 'dumpwallet' command to just dump the whole wallet out to a file).

PROS: Free! Maintains privacy (none of the addresses will be linked)
CONS: Time consuming, messy, possibility of missing a key/address

Or... as Spendulus has suggested, just send ALL the coins in that wallet to a new address in that wallet, and just export that one key for the new address.

PROS: Just one key to rule them all! :P
CONS: Will cost a transaction fee... which could get large dependent on how many UTXOs you're trying to consolidate, plus you have to wait for confirmation... possible privacy implications


Title: Re: Exporting private keys from old Core Wallet
Post by: platorin on November 07, 2017, 05:34:24 PM
Each address has it's own key... so, logically, if you have coins spread across multiple address, you're going to need to get multiple keys. (NOTE: Instead of using 'dumpprivkey' multiple times to get each private key, you can use the 'dumpwallet' command to just dump the whole wallet out to a file).

PROS: Free! Maintains privacy (none of the addresses will be linked)
CONS: Time consuming, messy, possibility of missing a key/address

Or... as Spendulus has suggested, just send ALL the coins in that wallet to a new address in that wallet, and just export that one key for the new address.

PROS: Just one key to rule them all! :P
CONS: Will cost a transaction fee... which could get large dependent on how many UTXOs you're trying to consolidate, plus you have to wait for confirmation... possible privacy implications
I understand. Thank you. One more question - that command "dumpwallet" won't do anything to my wallet iselft or my bitcoins? It just "dumps" all data to a text file?


Title: Re: Exporting private keys from old Core Wallet
Post by: Sanglotslongs2 on November 07, 2017, 08:04:40 PM
Each address has it's own key... so, logically, if you have coins spread across multiple address, you're going to need to get multiple keys. (NOTE: Instead of using 'dumpprivkey' multiple times to get each private key, you can use the 'dumpwallet' command to just dump the whole wallet out to a file).

PROS: Free! Maintains privacy (none of the addresses will be linked)
CONS: Time consuming, messy, possibility of missing a key/address

Or... as Spendulus has suggested, just send ALL the coins in that wallet to a new address in that wallet, and just export that one key for the new address.

PROS: Just one key to rule them all! :P
CONS: Will cost a transaction fee... which could get large dependent on how many UTXOs you're trying to consolidate, plus you have to wait for confirmation... possible privacy implications

Are you sure of that ? On core 1 private key can have several address.


Title: Re: Exporting private keys from old Core Wallet
Post by: HCP on November 07, 2017, 09:42:16 PM
Are you sure of that ? On core 1 private key can have several address.
Technically, each HEX private key can be used to generate 2 addresses (compressed/uncompressed)... as far as I'm aware, Bitcoin Core currently deals only in compressed addresses... and when you dump the WIF keys, a WIF key has a 1:1 relationship with an address. The WIF starts with either "5" = uncompressed or it starts with a "K" or "L" = compressed.

Unless you're referring to xprvs... aka "Master Private Key"... which are derived from the "seed". ???


Title: Re: Exporting private keys from old Core Wallet
Post by: Spendulus on November 08, 2017, 12:24:53 PM
Each address has it's own key... so, logically, if you have coins spread across multiple address, you're going to need to get multiple keys. (NOTE: Instead of using 'dumpprivkey' multiple times to get each private key, you can use the 'dumpwallet' command to just dump the whole wallet out to a file).

PROS: Free! Maintains privacy (none of the addresses will be linked)
CONS: Time consuming, messy, possibility of missing a key/address

Or... as Spendulus has suggested, just send ALL the coins in that wallet to a new address in that wallet, and just export that one key for the new address.

PROS: Just one key to rule them all! :P
CONS: Will cost a transaction fee... which could get large dependent on how many UTXOs you're trying to consolidate, plus you have to wait for confirmation... possible privacy implications
I understand. Thank you. One more question - that command "dumpwallet" won't do anything to my wallet iselft or my bitcoins? It just "dumps" all data to a text file?
No it won't change your wallet. Yes to text file.