Bitcoin Forum
May 21, 2024, 05:35:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Import Bitcoin private keys, Help for 100usd!  (Read 1403 times)
Klerni (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
March 13, 2016, 11:40:21 AM
 #1

Hello..
I lost some cash in my corrupted wallet.dat .. I'm trying to desperately recover it.. Already found many private keys in hex editor but have problem with importing them to bitcoin wallet.

I found that this is structure of private and public key

 // structure of a private key:
 // "308201130201010420" + private key (32 bytes) + " 2020101302c06072a8648ce3d0101022100ffffffffffffffffffffffffffffffffffffffffffff fffffffffffefffffc2f300604010004010704410479be667ef9dcbbac55a06295ce870b07029bf cdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47 d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364 141020101a14403420004" + public key (64 bytes)
 
 // structure of compressed private key
 // "3081D30201010420" + private key (32 bytes) + "a08185308182020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffff ffffffffffffffffffffffefffffc2f300604010004010704210279be667ef9dcbbac55a06295ce 870b07029bfcdb2dce28d959f2815b16f81798022100fffffffffffffffffffffffffffffffebaa edce6af48a03bbfd25e8cd0364141020101a124032200" + compressed public key (33 bytes)
 

My private keys are structured as compressed. If I'm adding it to my console as command:

importprivkey FC3F143D1C92B2054EC37DA0B491AAE37CE7BAA77A5F1577B17191D2F7936C01 (key modified due to privacy)

Then on output I have "Invalid private key encoding (code -5)"

How can I change compressed priv key to priv key? or just to wallet import format?
For help I'm sharing with 100usd as it's important for me.
Apocalyptic
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
March 13, 2016, 12:10:42 PM
 #2

Assuming "+ private key (32 bytes) +" stands for the private exponent of the key, you have to prepend the version byte 0x80, then apply Base58Check (see the "Encoding a private key" section of https://en.bitcoin.it/wiki/Base58Check_encoding )

Edit: Actually the whole process is outlined step-by-step at https://en.bitcoin.it/wiki/Wallet_import_format
Klerni (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
March 13, 2016, 12:22:43 PM
 #3

Hmm... already did all process until last point...

Is there any ready software which can allow me simply change this code through base 58 encode? or the best from priv key to wif? 

I mean, becuase if I have 100 private keys then it's going to kill my brain Smiley
findftp
Legendary
*
Offline Offline

Activity: 1022
Merit: 1006

Delusional crypto obsessionist


View Profile
March 13, 2016, 12:29:05 PM
Last edit: March 13, 2016, 01:05:56 PM by findftp
 #4

Hmm... already did all process until last point...

Is there any ready software which can allow me simply change this code through base 58 encode? or the best from priv key to wif?  

I mean, becuase if I have 100 private keys then it's going to kill my brain Smiley

Maybe you can use https://www.bitaddress.org ?
You can insert and convert multiple private key formats.
It's an offline javascript app so your keys are not shared with the server.

You can send the 100USD in BTC to 1EV3EXsW197nAkJtiWA16ZfjfPfjPitLrN

Thanks!  Wink
watashi-kokoto
Sr. Member
****
Offline Offline

Activity: 682
Merit: 269



View Profile
March 13, 2016, 01:00:48 PM
Last edit: March 13, 2016, 01:14:46 PM by watashi-kokoto
 #5

How can I change compressed priv key to priv key? or just to wallet import format?

Hi there, on linux you can use this script bitcoin.sh


https://github.com/grondilu/bitcoin-bash-tools/


you run it simply from the command line

source ~/bitcoin.sh

newBitcoinKey 0x8010b1bb119ad37d4b65a1022a314897b1b3614b345974332cb1b9582cf03536

The first command activates the script
the second command translates your private key  to compressed and uncompressed wif so you can import it to bitcoin core:

Once you see the address with your funds, you have won!

importprivkey your key


If there is problem with script, try entering the key in reverse order for example:

aabbcc.........8899
9988.........ccbbaa

(because sometimes keys are reversed)
good luck




Klerni (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
March 13, 2016, 01:26:27 PM
 #6

Thank you guys ! Smiley

Because there were more helpers as soon as will receive bitcoins I'm going to send 50usd to apocalyptic and findftp ! Smiley
Apocalyptic if you could send me your address on pm
Watashi, also thank you for involve but I'm using Mac : ) It's for sure good info for future people who will look for solution.
findftp
Legendary
*
Offline Offline

Activity: 1022
Merit: 1006

Delusional crypto obsessionist


View Profile
March 15, 2016, 12:15:00 PM
 #7

I was wondering if you had any success retrieving your coins?
Klerni (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
March 15, 2016, 08:20:13 PM
 #8

I'm still fighting for it Sad
Those keys are not what I needed to recover cash..
watashi-kokoto
Sr. Member
****
Offline Offline

Activity: 682
Merit: 269



View Profile
March 15, 2016, 09:07:01 PM
 #9

I'm still fighting for it Sad
Those keys are not what I needed to recover cash..

still not fixed?
EDIT: tell us what happened
findftp
Legendary
*
Offline Offline

Activity: 1022
Merit: 1006

Delusional crypto obsessionist


View Profile
March 15, 2016, 09:11:31 PM
 #10

I'm still fighting for it Sad
Those keys are not what I needed to recover cash..

But were the keys valid? Did the method work?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3402
Merit: 6641


Just writing some code


View Profile WWW
March 15, 2016, 09:47:35 PM
 #11

Have you tried running Bitcoin Core with the -salvagewallet option to see if it can recover the corrupted some keys so that you can spend from them? If you try that, make sure you keep a backup of your wallet.dat file somewhere as I think it will destroy the corrupted wallet once it attempts a salvage.

nyaa
Newbie
*
Offline Offline

Activity: 20
Merit: 4



View Profile
March 20, 2016, 06:31:09 PM
 #12

Try pywallet https://github.com/jackjack-jj/pywallet with --recover option and small partition with wallet.dat on it

Recently recovered with it my corrupted wallet.dat https://bitcointalk.org/index.php?topic=1404609.0

Just in case - my address 1MwM8z8RZdEFuBx5tcg6YHAvLG1AdGYyT8  Smiley

Good luck!
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!