bitcoin core – how to decrypt encrypted_privkey


Background on how you got here:

I have very Old wallet file in .dat format. (from 2017) The backup is as far as I remember just a copy of the wallet file from the bitcoin-core ~/ directory.

I tried to open it in “talking” bitcoin-core by:

  1. Copy the wallet file to ~/.bitcoin/wallets/walletName/walletName.dat
  2. Add wallet name to list in ~/.bitcoin/settings.json

Now, when I start up bitcoin-core, I get this message:

Error: Failed to load database path '/home/{redacted}/.bitcoin/wallets/OldWallet_1'. Data is not in recognized format.

So, having no meaningful results in google other than pywallet, I decided to try importing it to Electron… and discovered Electron had no option to import basic bitcoin wallets (wtf?). I found some info about ‘pywallet’, I tried to use it to retrieve information from my .dat file, I had to modify it a bit because my cipher password is really long and contains many strange characters, so passing it as an argument is very difficult to execute the text.

I was able to get a list of all addresses defined in this file and “encrypted_privkey” for each address.

I couldn’t get it to decrypt anything, because the script crashes with “Segmentation Fault (core dumped)” (everyone loves C/C++).

the question:

So, my question is, given that I know the password for this wallet (I think I also recovered the cipher salt) and have an ‘encrypted_privkey’ list, how do I decrypt it so I can import it into Electron?

[edit]

I just tried to import my dashcoin wallet to dash-core, I got the same error message, so it’s very likely that something about the wallet file format changed during the time I wasn’t using cryptocurrencies.

If anyone knows how to “upgrade” the file format, please let me know, it will solve the problem too.



Source link

Related Posts