Bitcoin Forum
May 03, 2024, 01:22:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to convert private key from WIF to WIF compressed  (Read 2232 times)
BldSwtTrs (OP)
Legendary
*
Offline Offline

Activity: 861
Merit: 1010


View Profile
March 24, 2017, 10:35:37 PM
 #1

How to do? I need to do that in order to be able to import my private key in Electrum.
1714742543
Hero Member
*
Offline Offline

Posts: 1714742543

View Profile Personal Message (Offline)

Ignore
1714742543
Reply with quote  #2

1714742543
Report to moderator
1714742543
Hero Member
*
Offline Offline

Posts: 1714742543

View Profile Personal Message (Offline)

Ignore
1714742543
Reply with quote  #2

1714742543
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714742543
Hero Member
*
Offline Offline

Posts: 1714742543

View Profile Personal Message (Offline)

Ignore
1714742543
Reply with quote  #2

1714742543
Report to moderator
1714742543
Hero Member
*
Offline Offline

Posts: 1714742543

View Profile Personal Message (Offline)

Ignore
1714742543
Reply with quote  #2

1714742543
Report to moderator
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6578


Just writing some code


View Profile WWW
March 24, 2017, 10:43:30 PM
 #2

Converting your private key will result in a completely different address. Electrum should be able to import any WIF private key.

BldSwtTrs (OP)
Legendary
*
Offline Offline

Activity: 861
Merit: 1010


View Profile
March 24, 2017, 10:48:21 PM
 #3

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.
kolloh
Legendary
*
Offline Offline

Activity: 1736
Merit: 1023


View Profile
March 25, 2017, 03:02:20 AM
 #4

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.
cpfreeplz
Legendary
*
Offline Offline

Activity: 966
Merit: 1042


View Profile
March 25, 2017, 03:08:35 AM
 #5

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 if you have any troubles. I'd suggest downloading the website and doing everything offline for added security.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10535



View Profile
March 25, 2017, 04:34:18 AM
 #6

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 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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
HI-TEC99
Legendary
*
Offline Offline

Activity: 2772
Merit: 2846



View Profile
March 25, 2017, 04:53:47 AM
Last edit: April 27, 2018, 08:25:49 PM by HI-TEC99
 #7

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 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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!