0

I have a keystore file from an old ellipal wallet with some eth with it. The corresponding password is correct (I can use it to display the private key and keystore in it) and I can also run the following code with that password.

const fs = require("fs");
const keythereum = require("keythereum");

const KEYSTORE = "KeystoreFileName";
const PASSWORD = "YourPassword";

const keyObject = JSON.parse(fs.readFileSync(KEYSTORE, {encoding: "utf8"}));
const privateKey = keythereum.recover(PASSWORD, keyObject).toString("hex");
console.log(`0x${keyObject.address}: 0x${privateKey}`);

But the problem with all these methods is: I get an unusable private key containing the start being 0xffffff.... and then some chars/numbers. When I inspect the QR code it looks off and it will not get recognised by Metamask or other programs. The bottom right corner looks damaged which seems to be because of these many ffffff. Sending out from the ellipal wallet also does not work (obviously since the private key seems damaged).

I thought about changing some decryption parameters in the keystore file but no idea if that would yield success.

What can I do with this?

3
  • It is odd, keythereum will error out if the file is corrupted or the password is wrong, so the private key should be wrong. The largest possible private key is n-1 where n the the order of secp256k1 en.bitcoin.it/wiki/Secp256k1.
    – Ismael
    Dec 2 '21 at 4:23
  • yes, it seems very odd. keyethereum gives the "wrong, unusable" private key in the exact same way as it gets the working private key for another keypair created in ellipal. There is no error shown whatsoever. Dec 3 '21 at 8:14
  • I'd guess that there was an error when the file was created, it doesn't store the correct private key.
    – Ismael
    Dec 4 '21 at 3:45
0

You should be able to access this using MyCrypto's Desktop app and then selecting Keystore file.

2
  • Thanks. Is that wallet known to fix decryption issues or being particularly good for old keystore wallets? Nov 30 '21 at 19:34
  • yeah - its very good with old keystore and pre-sale wallets! sorry for the delay in a response :) Dec 6 '21 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.