Bitcoin Forum

Bitcoin => Electrum => Topic started by: BldSwtTrs on March 24, 2017, 10:35:37 PM



Title: how to convert private key from WIF to WIF compressed
Post by: BldSwtTrs on March 24, 2017, 10:35:37 PM
How to do? I need to do that in order to be able to import my private key in Electrum.


Title: Re: how to convert private key from WIF to WIF compressed
Post by: achow101 on March 24, 2017, 10:43:30 PM
Converting your private key will result in a completely different address. Electrum should be able to import any WIF private key.


Title: Re: how to convert private key from WIF to WIF compressed
Post by: BldSwtTrs on March 24, 2017, 10:48:21 PM
Converting your private key will result in a completely different address. Electrum should be able to import any WIF private key.
Well I have a paper wallet with a private key beginning with a 5 (WIF format) but Electrum 2.6.4 seems only to allow to sweep private key beginning with K or L.

When I try to enter my privkey beginning with a 5,  I cannot click on the "Sweep" button whereas I can click on that button when I put a privkey beginning with K or L.


Title: Re: how to convert private key from WIF to WIF compressed
Post by: kolloh on March 25, 2017, 03:02:20 AM
In case you do need to convert between the two formats in the future, bitaddress.org supports providing both formats under Wallet Details. I'd recommend only doing this offline for security purposes.


Title: Re: how to convert private key from WIF to WIF compressed
Post by: cpfreeplz on March 25, 2017, 03:08:35 AM
Converting your private key will result in a completely different address. Electrum should be able to import any WIF private key.
Well I have a paper wallet with a private key beginning with a 5 (WIF format) but Electrum 2.6.4 seems only to allow to sweep private key beginning with K or L.

When I try to enter my privkey beginning with a 5,  I cannot click on the "Sweep" button whereas I can click on that button when I put a privkey beginning with K or L.

Doesn't 5 at the beginning mean it's encrypted? I guess you've already figured it out, but next time you could always see different values by inputting them on https://www.bitaddress.org (https://www.bitaddress.org) if you have any troubles. I'd suggest downloading the website and doing everything offline for added security.


Title: Re: how to convert private key from WIF to WIF compressed
Post by: pooya87 on March 25, 2017, 04:34:18 AM
Converting your private key will result in a completely different address. Electrum should be able to import any WIF private key.
Well I have a paper wallet with a private key beginning with a 5 (WIF format) but Electrum 2.6.4 seems only to allow to sweep private key beginning with K or L.

When I try to enter my privkey beginning with a 5,  I cannot click on the "Sweep" button whereas I can click on that button when I put a privkey beginning with K or L.

Doesn't 5 at the beginning mean it's encrypted? I guess you've already figured it out, but next time you could always see different values by inputting them on https://www.bitaddress.org (https://www.bitaddress.org) if you have any troubles. I'd suggest downloading the website and doing everything offline for added security.

no, the uncompressed private keys start with 5 like the following (https://en.bitcoin.it/wiki/Private_key):
Code:
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF
and i have never had any trouble importing private keys into Electrum. the solution to OP's problem is to simply upgrade to the latest release and if the problem persisted then report it here.


Title: Re: how to convert private key from WIF to WIF compressed
Post by: HI-TEC99 on March 25, 2017, 04:53:47 AM
Converting your private key will result in a completely different address. Electrum should be able to import any WIF private key.
Well I have a paper wallet with a private key beginning with a 5 (WIF format) but Electrum 2.6.4 seems only to allow to sweep private key beginning with K or L.

When I try to enter my privkey beginning with a 5,  I cannot click on the "Sweep" button whereas I can click on that button when I put a privkey beginning with K or L.

Doesn't 5 at the beginning mean it's encrypted? I guess you've already figured it out, but next time you could always see different values by inputting them on https://www.bitaddress.org (https://www.bitaddress.org) if you have any troubles. I'd suggest downloading the website and doing everything offline for added security.

no, the uncompressed private keys start with 5 like the following (https://en.bitcoin.it/wiki/Private_key):
Code:
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF


Bitaddress clearly shows that. Here's a screenshot of a test key I generated using it. The WIF key starts with a 5 and the compressed WIF key starts with a K or an L. Counter intuitively the compressed WIF key is one character longer than the other.

https://i.imgur.com/Y7gwCZG.png