[Ethereum] Secure paper wallet creation for ETH using JS

cold-storagecryptographyetherprivate-keywallets

I am about to start the process of transferring my ETH to paper wallets for safe keeping. Currently the funds are stored on an online exchange. History shows that this is a very bad idea. It is not much, but my threat-model is only on loosing the ETH. The questions relate to the creation of secure paper wallets.

For convenience I would like to use web wallet creation tools, such as MyEtherWallet and/or EthAddress. I analysed their source code and in none of them I could find a possible backdoor. (I couldn’t find – that doesn’t mean there isn’t)

What I did was:

  • Verified the TLS certificate chain of github.com
  • Download the code from the GitHub repos
  • Reviewed all the code, especially the JavaScript functions
  • Checked and compared if they used the same unmodified Ethereum JavaScript classes from the official repo
  • Analyzed the wallet creation code
  • Debugged each step with the dev tools in the browser
  • Generated 1000 wallets for a very short collision test

I now know that it uses window.crypto.getRandomValues for its PRNG, which is currently the best way in a web-browser, without using a third-party library. And they don’t use broken hashing algorithms.

Possible issues:

  • Collisions of wallet address public key (less likely with a cryptographically secure entropy/randomness source and the length of 40 characters – compared to Bitcoin’s 34-1 chars)
  • Bug in the code of the website and/or bug in the EthereumJS libs and/or the crypto implementations (It wouldn't be the first time it would contain a heavy bug in ethereumJS-utils)
  • Probably less tested in production than the official desktop wallet software

Precausions:

  • Creating the wallets on an air-gapped computer
  • Encrypting and storing the information in multiple physical locations
  • Wipe browser cache

Questions that need answering:

  1. Will the wallets created at this moment in time be backwards compatible in the future? (Metropolis, Serenity, …)
  2. How do I verify if the wallets have been created correctly (private key), without first sending a small amount in and out of the wallet?
  3. Is there anything else I have to consider and I am correct with my assumptions?
  4. Why are there only third-party web wallet creation pages on the internet and no official ones (yet)? (Maybe because of: Ethereum: "We are making tools for tool-makers“?)

Thank you very much

Best Answer

Will the wallets created at this moment in time be backwards compatible in the future? (Metropolis, Serenity, ...)

I can confirm that MyEtherWallet will always provide backwards capabilities with older version of our encrypted versions, as well as common methods created by other wallets. We are currently in the process of switching to use the same encryption as geth which will (1) help standardize across wallets and (2) make it easier for people to move from MyEtherWallet -> Mist in the future. We also hope to implement other methods of accessing (ie: Jaxx mnemonics, etc.).

For reference, the only things that might change as Ethereum "grows up" is the json / keystore / encryption / etc. formats of the private key. In the end, it's still decrypting to get to the same version of the private key. The way you store it and decrypt it just might change. Most, if not all, wallet providers are going to stay up to date as encryption methods and standards emerge and provide backwards capabilities and cross-capabilities.

How do I verify if the wallets have been created correctly (private key), without first sending a small amount in and out of the wallet?

Personally, I use the MyEtherWallet offline transaction tab to test in and out of any new deep-cold-storage wallet. I suppose you could import the key using a different client and verify it gives you the same address. So, since you are using MyEtherWallet which using Javascript, you could import the unencrypted private key into geth and verify the address, or into eth, or whatever. You will not want to cross-verify with another Javascript implementation (like EthAddress).

Is there anything else I have to consider and I am correct with my assumptions?

I recommend keeping a copy of EthAddress or MyEtherWallet's zipped repo with your cold-storage keys. That way in the future if something changes or something, you'll still have a local version, one that you know works with your private key, to run.

Why are there only third-party web wallet creation pages on the internet and no official ones (yet)? (Maybe because of: Ethereum: "We are making tools for tool-makers“?)

The Ethereum developers have stated that they are working towards a light client. At this point, I find it impressive that they have so many clients in different languages and the Mist / Ethereum Wallet is already as strong as it is. It's been 7 months since launch. Also, keep in mind that the Ethereum Wallet / Mist is so much more than a wallet. A lot of people seem to forget this because that's all they use it for. But in reality, the things they are doing with contracts and tokens are amazing and is what they are focused on at this point.


For reference, here are the three sites mentioned in this thread:


full disclosure: I am co-founder of MyEtherWallet. I try to be objective.

Related Topic