Page 1 of 1

Encrypted wallet corrupted, 5000 NMC reward for recovery!

Posted: Sun Oct 09, 2016 6:15 pm
by myfault
Hi guys,
i'm trying to recover some of the private keys contained in a corrupted NMC encrypted wallet.
I know the passphrase.
I've already tried with this tool https://github.com/jackjack-jj/pywallet
and the following command:
sudo python ./pywallet.py --recover --namecoin --recov_device /path/to/corrupted_wallet.dat --recov_size 1Mo --recov_outputdir /home/username/Desktop/recovery
No success! :(
I've also tried to open and read the wallet with an hex editor to see if i could somehow understand its structure and isolate some private keys but i couldn't really understand anything of that.
Do i have any chance to get some of my NMC back?
Where can i find informations about how NMC encrypted wallet are built?
I'm willing to reward with 5000 NMC if someone helps me to recover the private key i need.
Thanks

Re: NMC encrypted wallet corrupted!

Posted: Mon Oct 10, 2016 7:35 pm
by cassini
As far as I know the wallet encryption is identical to the one in the Bitcoin client. Try https://en.bitcoin.it/wiki/Wallet_encryption

By the way, what error message do you get when you open the wallet using the Namecoin client? Any clues in the debug.log file? Which client version?

Have you already tried Namecoin Core's start param -salvagewallet ?

Re: NMC encrypted wallet corrupted!

Posted: Tue Oct 11, 2016 5:43 am
by myfault
A fatal error occurred Namecoin can no longer continue safely and will quit.
EXCEPTION: 22DbRunRecoveryException
Db::exists: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
namecoin in Runaway exception

Wallet version is 0.3.80

I recovered the .dat file from a bad hard disk failure and as i said i tried to open the wallet.dat with an Hex editor, i see only 6 ckey are present and NO mkey, the file looks badly corrupted but only one private key contains namecoin so maybe i can recover that one only.

Re: Encrypted wallet corrupted, 5000 NMC reward for recovery

Posted: Tue Oct 11, 2016 4:30 pm
by phelix
I was once able to recover keys with https://github.com/gavinandresen/bitcointools

try fixwallet and/or dbdump

Re: Encrypted wallet corrupted, 5000 NMC reward for recovery

Posted: Tue Oct 11, 2016 4:55 pm
by myfault
That is from 5 years ago and for bitcoin, i don't really know how it can help me or how to use those tools to recover some private keys from a badly corrupted and encrypted namecoin wallet.

Re: Encrypted wallet corrupted, 5000 NMC reward for recovery

Posted: Sun Oct 16, 2016 9:01 am
by biolizard89
myfault wrote:Hi guys,
i'm trying to recover some of the private keys contained in a corrupted NMC encrypted wallet.
I know the passphrase.
I've already tried with this tool https://github.com/jackjack-jj/pywallet
and the following command:
sudo python ./pywallet.py --recover --namecoin --recov_device /path/to/corrupted_wallet.dat --recov_size 1Mo --recov_outputdir /home/username/Desktop/recovery
No success! :(
I've also tried to open and read the wallet with an hex editor to see if i could somehow understand its structure and isolate some private keys but i couldn't really understand anything of that.
Do i have any chance to get some of my NMC back?
Where can i find informations about how NMC encrypted wallet are built?
I'm willing to reward with 5000 NMC if someone helps me to recover the private key i need.
Thanks
Hi.

Sorry for the delayed reply. Try the following procedure:
  1. Make a backup of your Namecoin profile folder (wallet, blockchain, everything) in case anything goes wrong here. Yes, there is a possibility that this will make it worse, in which case you don't want to be without your backup.
  2. Download a recent build of Namecoin Core, or build it yourself from source. The most recent beta that has binaries available is probably nc0.13.99-name-tab-beta1, which has binaries posted at https://github.com/JeremyRand/namecoin. ... -gui-pr-67 . Note that those binaries haven't yet been reproduced by multiple developers, so whether you should use those binaries right now depends on (a) whether you trust me, (b) how inconvenient it would be for you to build from source, and (c) how urgent it is that you recover your wallet immediately.
  3. Run the following (using the Namecoin Core build): ./namecoin-qt -salvagewallet
  4. Namecoin Core will probably exit itself after running the wallet recovery. If it doesn't exit itself, exit it.
  5. Run the following (using the Namecoin Core build): ./namecoin-qt
  6. Most likely, your wallet will appear empty. That's okay. Exit Namecoin Core.
  7. Run the following (using the Namecoin Core build): ./namecoin-qt -rescan
  8. With luck, after this, your wallet will be recovered. It's probably a good idea to not use the recovered wallet with Namecoin 0.3.80 anymore; staying with Namecoin Core is probably safest unless you absolutely need a feature from 0.3.80.
Let me know how it goes.

Best,
-Jeremy

Re: Encrypted wallet corrupted, 5000 NMC reward for recovery

Posted: Mon Oct 24, 2016 2:17 pm
by phelix
myfault wrote:That is from 5 years ago
exactly. this is ancient tech in v0.3.80, it comes from Bitcoin v0.3.xx and had encryption added later on.

Did you try the berkeley db database recovery? Maybe you could retry to get better/more data out of the disk, at least I would store a complete image of the disk just in case NMC gets valuable again.

Somehow I can't find your thread about this over on bitcointalk any more.... ?
thread on bitcointalk: https://bitcointalk.org/index.php?topic=1646255.20

For the record I once managed to recover a badly corrupted Namecoin wallet from v0.3.80. If you still care send me the wallet and I will give it a try (keys are still encrypted).

Re: Encrypted wallet corrupted, 5000 NMC reward for recovery

Posted: Mon Oct 24, 2016 3:19 pm
by myfault
Hi phelix,
thanks for your interest but i don't think there's anything we can do to recover some of the private keys.
The user jackjack had a look at the encrypted wallet, he scanned it with an hex editor and didn't find any trace of the "mkey" which is absolutely necessary to decrypt the wallet.
If you still want to try i can send you the corrupted wallet via email.

Re: Encrypted wallet corrupted, 5000 NMC reward for recovery

Posted: Mon Oct 31, 2016 9:35 am
by biolizard89
@myfault did you try the instructions I posted? How well they'll work depends on how badly the wallet is corrupted, but they've worked before when I was helping someone with a corrupted wallet.

Cheers.