Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: zipmaster on October 29, 2015, 12:45:17 AM



Title: How to convert ECKeys to WIF format?
Post by: zipmaster on October 29, 2015, 12:45:17 AM
After backing up my private keys from the Android Bitcoin Wallet app (schildbach), I managed to export it to my laptop and decrypt it. I then proceeded to use bitcoinj to dump the raw keys onto a data file. My objective being to look at all the single private keys I own.

The raw dump lists the historical of all my transactions along with my wallet address strings followed by entries of the form:

ECKey{pub=..., priv=...}

How do I convert the priv ECKey to WIF format? I've been hanging my head on it for days now without getting anywhere.

Any help would be greatly appreciated.

Thanks!


Title: Re: How to convert ECKeys to WIF format?
Post by: achow101 on October 29, 2015, 12:51:33 AM
Part of that ECKey line should have something like "priv WIF=..." which is the WIF key. If it isn't there, try upgrading bitcoinj to the latest version.

Otherwise, you can use this site: https://gobittest.appspot.com/PrivateKey and enter the privatekey hex. The site will give you the WIF version.


Title: Re: How to convert ECKeys to WIF format?
Post by: DannyHamilton on October 29, 2015, 04:20:46 AM
- snip -
you can use this site: https://gobittest.appspot.com/PrivateKey and enter the privatekey hex. The site will give you the WIF version.

Keep in mind that it is VERY RISKY to enter your private key on a website.  If anyone gains access to your private keys, they can AT ANY TIME NOW OR IN THE FUTURE spend any bitcoins that are received at the address associated with the private key.


Title: Re: How to convert ECKeys to WIF format?
Post by: shorena on October 29, 2015, 06:52:18 AM
- snip -
you can use this site: https://gobittest.appspot.com/PrivateKey and enter the privatekey hex. The site will give you the WIF version.

Keep in mind that it is VERY RISKY to enter your private key on a website.  If anyone gains access to your private keys, they can AT ANY TIME NOW OR IN THE FUTURE spend any bitcoins that are received at the address associated with the private key.

Thus, you might want to do it yourself -> https://en.bitcoin.it/wiki/Wallet_import_format

Keep in mind that bitcoin's base58 encoding uses a different order (1-9,A-Z,a-z) than the "regular" base58 (1-9,a-z,A-Z) you might encounter or be familiar with.