Does anyone has idea how metamask generates the passPhrase. I was looking in github for related files but unable to figure out how exactly the things are done.

1 Answer 1


The mnemonic key phrase? How is that generated?

I'm not sure how MetaMask generates it. But I can guess that it uses a similar approach to the other standards our there. E.g. BIP 39

For a detailed "how is this done". Read here:


  1. You need random data, aka, entropy.

  2. You get enough of that and do fancy computes on said data.

  3. That data is then separate out in a "table" of numbers

  4. These numbers are indexed to a word list (dictionary)

  5. You print out words that corresponde to the indexed numbers

Note: You can further protect, or secure, one's mnemonic by pairing it with a user's passphrase.

[mnemonic] + [passphrase] = [private keys].

This is cool, because, if someone got ahold of your mnemonic, they still could NOT generate your private keys without your unique passphrase.

  • Yes I know all the things you wrote above. I was just wondering how I can use metamask like login system, where users only need to enter password to login or may recover account with seed phrase. I guess exodus wallet does the same. Feb 22, 2019 at 18:16
  • the password is used to encrypt/decrypt their account on their device. The seed phrase, aka mnemonic, is generated through entropy at the creation time of the new account. If you already knew the things above, I'm not clear on what your exact question is. More or less, all the knowledge is there, you just need to implement it. Feb 22, 2019 at 19:53
  • yeah man, I got it. I was just confusing with the encryption of account on the device. I thought I can use password to generate mnemonic. thanks a lot Feb 23, 2019 at 5:15

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.