Tuesday, November 12, 2013

Bitcoin how to export private keys

Here I will collect some smart tips regarding Bitcoin apps.

I have tried the Bitcoin wallet app on Android. It has a Export Key function that results in an encrypted file that you can backup.

To decrypt this file you need openssl and then you run this command:
openssl enc -d -aes-256-cbc -a -in <filename>

If you are using Bitcoin-qt you can see your private keys by first listing your public keys with
listreceivedbyaddress 0 true

or
bitcoind listaddressgroupings

and then you can use
dumpprivkey <publickey>

to see your private key.
The console is brought up by using
launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase "your walletpassphrase here" 600
type: dumpprivkey [your public key here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock