1

I want to generate an Ethereum private key from a single word mnemonic. For example,

(1) I could use keccack256 online tool to transform a word to a private key. Would this be a valid key? Are there any other ways this could have been done?

(2) In the case of a 12-24 word mnemonic it is possible to generate a 512-seed from the mnemonic sentence which is used to generate a private key. How might this be done with only one word as seed ‘’phrase’’? I know this is possible since it has been done but I do not understand how. Would it be done in the exact same way the seed from the 12 word mnemonic is derived from?

So how is it possible to generate a private key from a single word. Is it possible only using case (1) or also case (2) and other?

0

(1) I could use keccack256 online tool to transform a word to a private key. Would this be a valid key ?

Any 256-bit number is a valid private key, so yes, it would be a valid key. But this isn't enough entropy to generate a secure private key. I could just run every word in the dictionary through keccak256() (and every other widely used hash function that generates 256-bit numbers) and check whether there are any funds associated with each private key until I find yours.

The whole idea behind using 12-24 dictionary words as the seed is to make the entropy sufficient to make it secure.

https://xkcd.com/936/

You can't have both the seed and the hash function known or easy-to-guess. (keccak256() is known, dictionary words are easy to guess.)

So how is it possible to generate a private key from a single word.

You have 2 choices:

  1. Use a difficult-to-guess seed with a known hash function, or
  2. Use a difficult-to-guess hash function with an easy-to-guess seed

For the first option, you could use a password manager to generate a secure password, then run that through keccak256() or any other hash function that can give you a 256-bit number. However, your secure password (high entropy) doesn't come under your definition of "mnemonic".

For the second option, you would need to run your chosen dictionary word (low entropy) through a hash function you had written yourself (or, alternatively, a series of known hash functions in an order only you know).

1
  • Also, can this single word ‘seed’ be used to generate a master key in a HD wallet (seed word (bip39)—>512 seed(bip39) —> master/root key(bip32)). For example iancoleman.io/bip39 gives the option using 3 words minimum but is it possible using python to get the master key using 1 word ? – qubitz Feb 7 at 3:45

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.