How to decrypt encrypted_privkey Background how I got here:
I have a 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 bitcoin-core's ~/.bitcoin directory.
I tried opening it in &quot;modern&quot; bitcoin-core by:

copying the wallet file into ~/.bitcoin/wallets/walletName/walletName.dat
adding the wallet name to list in ~/.bitcoin/settings.json

Now, upon starting 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 that electron doesn't have an option to import bitcoin-core wallets (wtf?).
I did find some information about &quot;pywallet&quot;, I tried using it to recover information from my .dat file, I had to modify it a bit since my encryption password is really long and has many weird characters in it so passing it as an argument for script execution is incredibly difficult.
I managed to get list of all addresses defined in this file and &quot;encrypted_privkey&quot; for each address.
I didn't manage to get it to decrypt anything, because the script crashes with &quot;Segmentation Fault (core dumped)&quot; (everyone loves C/C++).
The question:
So, my question is, given I know the password to this wallet (I think I also recovered the encryption salt) and I have &quot;encrypted_privkey&quot; list, how do I decrypt them so I can import them in electron?
[edit]
I just tried importing my dashcoin wallet to dash-core, I get the same error message, so it's very likely that something about the wallet file format has changed during the time I wasn't using cryptocurrencies.
If anyone knows how to &quot;upgrade&quot; the file format, please let me know, it'll also solve the problem.
there is command opton in bitcoin core, there you can type &quot;upgradewallet&quot;
check if something happens.