-
-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mnemonic Generation Support #109
Comments
This issue is in regards to mnemonic generation, and not mnemonic decrypt. Re-opening. |
(Just announced) Etherjs is a strong candidate. Docs available here |
MetaMascara should provide this functionality while also allowing us to avoid managing key access within MEW directly. Consider further investigation |
https://github.com/bitcoinjs/bip39#examples is what we will likely end up going with. We don't need an additional dependency, and |
Put together some designs for selecting between either generate type, and what mnemonic generation will look like. Copy is definitely just a suggestion, so someone will want to look that over so we can finalize it. Initial Choice ScreenAs per #557, the copy above the options suggests using something else. Perhaps we want to put this inside of an alert element, or otherwise draw attention to it. Generate MnemonicWhile unnecessary, having them enter a passphrase here is just so that we can confirm it later, and to make sure they're not surprised the first time they unlock / waiting to enter it later in the process. Was there a plan to make a printable mnemonic wallet, like keystore? Confirm MnemonicMost products have this step. Let me know if it's overkill. Final Screen (Mnemonic)Screenshots are out of date, but you get the idea. This may be overkill, but I think it leaves little to be interpreted incorrectly. Final Screen (Keystore File)The keystore flow would otherwise be unchanged, but it should have a similar end screen to mnemonic. |
Copy recommends (if you don't love it, don't change it.)
Keystore
Mnemonic
No strong feelings on the remainder of the copy. Great job! |
ps: I really really really really love how you have done the generate part to make it nearly impossible for them to copy and paste! 💖 💖 💖 💖 💖 💖 💖 💖 💖 💖 |
Maybe that should be updated. |
The knowledge base is going to need a lot of updating once v4 launches. There have been quite a few changes. |
Alongside raw private key and UTC wallet generation, it would be valuable for MEW to provide a mnemonic based wallet (potentially in the same format as MetaMask).
Misc Notes
To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string "mnemonic" + passphrase (again in UTF-8 NFKD) used as the salt. The iteration count is set to 2048 and HMAC-SHA512 is used as the pseudo-random function. The length of the derived key is 512 bits (= 64 bytes).
So any passphrase you choose, gets concatenated with "mnemonic" and is used as a salt. ie. if your passphrase was "Th1sI5mYp@ssphr@se"... it would be "mnemonicTh1sI5mYp@ssphr@se" being used as the salt and an iteration count of 2048.
Also, as mentioned in the BIP, ANY passphrase provided will generate a valid seed... so an attacker would then need to check addresses for every generated/tested passphrase for coins further slowing down any attack.
-- BIP 39?
The text was updated successfully, but these errors were encountered: