I am trying to take the encrypted keyfile from icebox and import into Geth. However I am coming up with this error when I try

geth account import icebox.txt

Fatal: Failed to load the private key: encoding/hex: invalid byte: U+007B '{'

The keystore file is a v2 keystore file. I would import via something like myetherwallet but there is no v2 compatibility. I was told that geth still had compatibility to import v2 keystore files and automatically import them into v3.

The reason I am trying to do this is to get my private key for this account. So, if anyone knows another way to get a private key from a v2 keystore file (like found in icebox) that solution would work too.

2 Answers 2


Oh hey. You know what I just realized. You have it in your keystore folder and can see it in the accounts list in geth right? What if you then do:

> eth account update [<uuid>|<address> , ... ] // Decrypt and re-encrypt given keys.


That will prompt for a new password I believe and therefore re-encrypt and hopefully re-encrypt with v3 of the JSON?

You know what would be even easier? If MyEtherWallet just supported v2 of JSONs! I've added it to the to-do list but, life is crazy right now. Maybe we can push with HF stuff.

  • No, unfortunately I can't see the file in the accounts list in geth. I think I just can't use icebox until they have v3 capability because I have no way to find my private key from their encrypted keystore.
    – Amazing
    Commented Jul 20, 2016 at 10:29

You can use pyicebox to extract a geth compatible keyfile from a given mnemonic.

Follow these steps:

  1. download https://github.com/badmofo/pyicebox/blob/master/icebox.py
  2. install dependencies: pip install mnemonic scrypt bitcoin ethereum
  3. extract private keys: python icebox.py keys, enter your mnemonic
  4. export keyfile: python icebox.py export, enter the corresponding key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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