Bitcoin Forum
May 13, 2024, 01:44:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I convert a Base58 private key into WIF?  (Read 3386 times)
DarkStar_ (OP)
Legendary
*
Offline Offline

Activity: 2758
Merit: 3282


View Profile WWW
August 29, 2016, 03:59:39 PM
 #1

I got my computer fixed today, and since I deleted Electrum before shipping it off to be repaired, I need to reinstall Electrum and import my keys again (which are on blockchain.info). I tried importing the keys I got from blockchain.info in WIF format (Gave an key starting with K/L?), and Electrum gave me completely different addresses. I noticed blockchain.info also lets you export as Base58, and Electrum doesn't accept those, so I'm wondering how I can convert a Base58 key into WIF, like the title says.


I believe this is in the right section, since the main question is importing private keys.

taking a break - expect delayed responses
1715607846
Hero Member
*
Offline Offline

Posts: 1715607846

View Profile Personal Message (Offline)

Ignore
1715607846
Reply with quote  #2

1715607846
Report to moderator
1715607846
Hero Member
*
Offline Offline

Posts: 1715607846

View Profile Personal Message (Offline)

Ignore
1715607846
Reply with quote  #2

1715607846
Report to moderator
I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715607846
Hero Member
*
Offline Offline

Posts: 1715607846

View Profile Personal Message (Offline)

Ignore
1715607846
Reply with quote  #2

1715607846
Report to moderator
1715607846
Hero Member
*
Offline Offline

Posts: 1715607846

View Profile Personal Message (Offline)

Ignore
1715607846
Reply with quote  #2

1715607846
Report to moderator
1715607846
Hero Member
*
Offline Offline

Posts: 1715607846

View Profile Personal Message (Offline)

Ignore
1715607846
Reply with quote  #2

1715607846
Report to moderator
longbob72
Hero Member
*****
Offline Offline

Activity: 574
Merit: 503


V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==


View Profile
August 29, 2016, 04:15:18 PM
 #2

WIF is Base58. Private key with K or L are from compressed address and you'd end up with different address if you convert it.

You sure you didn't get the wrong private key?

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
longbob72
Hero Member
*****
Offline Offline

Activity: 574
Merit: 503


V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==


View Profile
August 29, 2016, 06:09:28 PM
 #3

WIF is Base58. Private key with K or L are from compressed address and you'd end up with different address if you convert it.

You sure you didn't get the wrong private key?
Not sure, but I haven't seen others having problems with something like that. I thought they were different, since blockchain.info lets you pick Base58 or WIF.

Well, it seems like you're right. I checked my blockchain.info wallet which have some imported addresses and the private keys doesn't have checksum which is really odd.

You can convert it by using casascius' bitcoin address utility (wiki, download link), follow these steps:
1. Open 'Address > Enter an address/key' and enter blockchain.info's WIF key.
2. Copy the hex private key of the address that was added (view its details by right clicking it).
3. Open 'Tools > Base58 calculator' and enter the copied hex.
4. Go to 'Mode > Use Checksum' and make sure that it's checked and copy the base58 result.
5. Same as step 1 but enter the result from 4 instead.
6. Now your real address should be added. Just view the details and copy the WIF private key and import it to electrum.

Might want to wait few hours before doing this to let other users view this post. I'm pretty sure it's safe but just in case.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
August 29, 2016, 06:29:21 PM
 #4

Yep.  Blockchain.info in their infinite wisdom has decided to display private keys as a base58 value with no version, checksum, or compression indicators.  I'm sure someone over there probably thought it would be a good idea, but I don't know why.

I'm sure there have been converters written to help people with this problem, but I can't find any of them quickly at the moment.  I'll check back tonight and if nobody else chimes in here with an easy to use and code reviewed open source solution, I'll see if I can find any of the ones I've seen discussed here at bitcointalk in the past.

DarkStar_ (OP)
Legendary
*
Offline Offline

Activity: 2758
Merit: 3282


View Profile WWW
August 29, 2016, 06:50:51 PM
 #5

WIF is Base58. Private key with K or L are from compressed address and you'd end up with different address if you convert it.

You sure you didn't get the wrong private key?
Not sure, but I haven't seen others having problems with something like that. I thought they were different, since blockchain.info lets you pick Base58 or WIF.

Well, it seems like you're right. I checked my blockchain.info wallet which have some imported addresses and the private keys doesn't have checksum which is really odd.

You can convert it by using casascius' bitcoin address utility (wiki, download link), follow these steps:
1. Open 'Address > Enter an address/key' and enter blockchain.info's WIF key.
2. Copy the hex private key of the address that was added (view its details by right clicking it).
3. Open 'Tools > Base58 calculator' and enter the copied hex.
4. Go to 'Mode > Use Checksum' and make sure that it's checked and copy the base58 result.
5. Same as step 1 but enter the result from 4 instead.
6. Now your real address should be added. Just view the details and copy the WIF private key and import it to electrum.

Might want to wait few hours before doing this to let other users view this post. I'm pretty sure it's safe but just in case.
Appreciate your help. Followed your steps, and managed to get my main address imported. I don't see how this could be not safe, so I decided to go ahead without waiting. Cheesy The new blockchain wallet really sucks. Too bad the old one isn't an option anymore.

Going to be a huge pain doing this for 10 addresses, but it's better than nothing I guess. Thanks! Post your address and I'll send you a small tip.

taking a break - expect delayed responses
longbob72
Hero Member
*****
Offline Offline

Activity: 574
Merit: 503


V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==


View Profile
August 29, 2016, 07:03:40 PM
 #6

Appreciate your help. Followed your steps, and managed to get my main address imported. I don't see how this could be not safe, so I decided to go ahead without waiting. Cheesy The new blockchain wallet really sucks. Too bad the old one isn't an option anymore.

Going to be a huge pain doing this for 10 addresses, but it's better than nothing I guess. Thanks! Post your address and I'll send you a small tip.

Why, thank you. I'm not gonna refuse a small tip so here: 135ETKp2UjLJPiUbauhYmfhxRvJhK7Cy7a. Glad that helped.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
DarkStar_ (OP)
Legendary
*
Offline Offline

Activity: 2758
Merit: 3282


View Profile WWW
August 29, 2016, 08:12:58 PM
 #7

Appreciate your help. Followed your steps, and managed to get my main address imported. I don't see how this could be not safe, so I decided to go ahead without waiting. Cheesy The new blockchain wallet really sucks. Too bad the old one isn't an option anymore.

Going to be a huge pain doing this for 10 addresses, but it's better than nothing I guess. Thanks! Post your address and I'll send you a small tip.

Why, thank you. I'm not gonna refuse a small tip so here: 135ETKp2UjLJPiUbauhYmfhxRvJhK7Cy7a. Glad that helped.
Sent 0.001BTC as a token of thanks. tx: https://www.blocktrail.com/BTC/tx/43458a3d05fe14863cfef6cce5b6ace7382564d88e0262ed5b4221a79bc0d579
Any chance you know of a fast way to convert them, or a script to automatically do it for multiple private keys?

taking a break - expect delayed responses
longbob72
Hero Member
*****
Offline Offline

Activity: 574
Merit: 503


V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==


View Profile
August 29, 2016, 08:32:42 PM
 #8

Appreciate your help. Followed your steps, and managed to get my main address imported. I don't see how this could be not safe, so I decided to go ahead without waiting. Cheesy The new blockchain wallet really sucks. Too bad the old one isn't an option anymore.

Going to be a huge pain doing this for 10 addresses, but it's better than nothing I guess. Thanks! Post your address and I'll send you a small tip.

Why, thank you. I'm not gonna refuse a small tip so here: 135ETKp2UjLJPiUbauhYmfhxRvJhK7Cy7a. Glad that helped.
Sent 0.001BTC as a token of thanks. tx: https://www.blocktrail.com/BTC/tx/43458a3d05fe14863cfef6cce5b6ace7382564d88e0262ed5b4221a79bc0d579
Any chance you know of a fast way to convert them, or a script to automatically do it for multiple private keys?

Thanks.
Unfortunately, at the moment I don't have anything that can make it fast. Not very experienced with scripts here.

                                                                       
    ▄▄███████▄▄                           ▄      ▄
   ██████████████▄                       ███    ███
  ███▀ ▄▄▄▄▄▄▄ ▀████                     ███    ███
  █████████████▄ ▀███                    ███    ███   █▄ ▄▄
   ▀████▄  ▄▄███  ▀███                   ███    ███  ▄████
   ▄███████████   ▄███                  ███    ███  ▀▀███▀▀
   ███           ▄███         ▄▄▄▄      ███    ███     █    ▄▄  ▄▄▄▄
  ▄███     ▄▄▄▄█████        ▄█████▄    ▄██▀   ▄██▀    ███   █████████
  ███▄    ████████         ▄███▀▀███   ███    ███    ███▀   █████▀████
   ███     ▀▀█████▄      ▄█████▄ ███   ███    ███    ███    ████   ███
   ███         ▀███▄     ███▀███ ███  ███▀   ███▀    ███    ███▀   ███
   ███           ███▄    ███  ▀▀ ███  ███    ███    ███▀   ▄███    ███
   ▀██▄           ███    ███▄  ▄███   ███    ███    ███    ███    ███▀
    ███           ▀███▄   ████████    ███    ███    ███    ███    ███
    ▀██            ▀████   ▀████▀      ██     ██    ▀██    ▀█▀    ▀█▀


.
.
.
        ▄▄▀                ▀▄▄
     ▄ ▀▀                    ▀▀ ▄
   ▄ ▀▀▀                      ▀▀▀ ▄
  ▄▀▀▀                          ▀▀▀▄
 ▀█▄▄                            ▄▄█▀
▄█  ▄                            ▄  █▄
▀█ █▀                            ▀█ █▀
█▄  ▄                            ▄  ▄█
▀█ █                              █ █▀
█▄   █                          █   ▄█
 ██▄█▀                          ▀█▄██
  ▀▀  ▄█                      █▄  ▀▀
  ▀██▄ ▀  █▄              ▄█  ▀ ▄██▀
    ▀▀▀   ██  █▄      ▄█  ██   ▀▀▀
     ▀███▄▄▀  ███    ███  ▀▄▄███▀
        ▀▀▀▀▄▄▄▄▀    ▀▄▄▄▄▀▀▀▀
          ▀▀█████▀▀▀▀█████▀▀
.
.
Free Bitcoins
Chat Lottery & Games
Level Up System with Rewards
▄████████▄  ▄████████▄
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
 ████████    ████████
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
██      ██  ██      ██
▀████████▀  ▀████████▀
.
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!