Bitcoin Forum
December 08, 2016, 04:25:16 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Recovering address and key from corrupted wallet  (Read 2076 times)
monstery
Newbie
*
Offline Offline

Activity: 5


View Profile
May 03, 2011, 08:59:10 AM
 #1

Hi,

I need help recovering bitcoin from my wallet. I have damaged my partition filesystem and i am not able to recover wallet.dat.
I did make image of my disk and i am able to locate at least parts of my wallet.dat i hex editor.
In hexeditor I see strings like: key, pool, addr ...

Lost bitcoin were on this address:
http://blockexplorer.com/address/19ypz7Hx8RYdf87iwajU5KdKGvps8RMM8q

A I understand i need to extract keys for this address and import them to my new wallet. Can someone help?

1481214316
Hero Member
*
Offline Offline

Posts: 1481214316

View Profile Personal Message (Offline)

Ignore
1481214316
Reply with quote  #2

1481214316
Report to moderator
1481214316
Hero Member
*
Offline Offline

Posts: 1481214316

View Profile Personal Message (Offline)

Ignore
1481214316
Reply with quote  #2

1481214316
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481214316
Hero Member
*
Offline Offline

Posts: 1481214316

View Profile Personal Message (Offline)

Ignore
1481214316
Reply with quote  #2

1481214316
Report to moderator
1481214316
Hero Member
*
Offline Offline

Posts: 1481214316

View Profile Personal Message (Offline)

Ignore
1481214316
Reply with quote  #2

1481214316
Report to moderator
m4rkiz
Full Member
***
Offline Offline

Activity: 170


View Profile
May 03, 2011, 09:25:08 AM
 #2

what exactly happened? now many transactions did you had?

try searching for that as all wallets have this header common
monstery
Newbie
*
Offline Offline

Activity: 5


View Profile
May 03, 2011, 09:48:39 AM
 #3

I was reinstalling windows as installer overwritten some of my truecrypted partition.

I had something around 20 transactions in wallet, but the i am sure that most bitcoins are at the address i posted.

I found wallet header, but i cannot restore it, because i dont know where it ends. Even if i knew where it ends it is probably fragmented anyway.
m4rkiz
Full Member
***
Offline Offline

Activity: 170


View Profile
May 03, 2011, 09:58:16 AM
 #4

yes, encrypted partitions can be pain in the ass some times, i had few of those problems myself back when i started to use full disk encryption

im afraid that i don't know anything about wallet structure so i can't help you there

btw. it would be nice to see some marker at the end of wallet file
mewantsbitcoins
Full Member
***
Offline Offline

Activity: 126


View Profile
May 03, 2011, 10:06:22 AM
 #5

I was reinstalling windows as installer overwritten some of my truecrypted partition.

I had something around 20 transactions in wallet, but the i am sure that most bitcoins are at the address i posted.

I found wallet header, but i cannot restore it, because i dont know where it ends. Even if i knew where it ends it is probably fragmented anyway.


monstery
I,m not sure this will work, but here's an idea. Try restoring the encrypted volume header from the disk that truecrypt created when you created the volume and try mounting it.
monstery
Newbie
*
Offline Offline

Activity: 5


View Profile
May 03, 2011, 10:27:59 AM
 #6

monstery I,m not sure this will work, but here's an idea. Try restoring the encrypted volume header from the disk that truecrypt created when you created the volume and try mounting it.
I did that already. Thats how i've been able to get unencrypted image of my disk.

I looked to the source code, but with my basic C++ skills i can't figure out how are the keys stored. I think key is 265bit int? But which key is used with which account?

I really think wallet should be in some text format like JSON or XML. It would be so much easier to recover.
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1036


View Profile WWW
May 03, 2011, 10:39:12 AM
 #7

The keys are stored using the standard OpenSSL encoding for ECDSA private keys, which actually includes a copy of the field parameters, curve parameters and the public key as well. 279 bytes per key, in total. A lot of these bytes are constant (as they are fixed for secp256k1), so you could look for those, and recover the 279 bytes around it, and use the bdb library to recreate a wallet.dat file with those keys in it.

PS: I'm working on a wallet export/import to human-readable files, but it may still take a while.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
monstery
Newbie
*
Offline Offline

Activity: 5


View Profile
May 03, 2011, 11:27:59 AM
 #8

I assembled my old wallet from parts and it works.

Many thanks for all of you. Especially for sipa.
niooron
Full Member
***
Offline Offline

Activity: 190


View Profile
May 03, 2011, 07:06:23 PM
 #9

I hope you have that wallet backed up on 10 different online and offline backups now.

14dxwuQwkQiLbZjJFfciZ26xSGdRU5mKEp
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!