1
$\begingroup$

Is there a method of converting a Bitcoin private key into a 12 word mnemonic seed out of a 1000-2000 word dictionary? I couldn't think of a good way of solving this.

$\endgroup$
  • $\begingroup$ Do you also want to be able to recover the private key from the mnemonic, or do you just want a mnemonic deterministically generated by a Bitcoin private key? The latter is easy: use the private key as a seed for a PRNG and use it to sample from the diceware wordlist! $\endgroup$ – Squeamish Ossifrage Aug 10 '17 at 15:16
  • $\begingroup$ Conversely, most brain wallets work the other way around: use a hash of the 12-word sequence as a seed for a PRNG, and generate the Bitcoin private key from that. That way you don't need an easily computable bijection between a subset of 12-word sequences and 32-byte sequences. $\endgroup$ – Squeamish Ossifrage Aug 10 '17 at 15:24
  • $\begingroup$ Here's my private key with some bitcoins in it: 5K5mkjaLwFbU4nNdpBHtYVBH7hBCY6qLeTA8cD9XUujsdNZvgGn -- so i want to be able to use this private key to generate an ethereum private key from it. but the ethereum js libraries uses the 12 word mnemonic, which is why i wanted to convert this. $\endgroup$ – Patoshi パトシ Aug 10 '17 at 20:18
  • $\begingroup$ you should not give your private key comments. $\endgroup$ – khan Aug 11 '17 at 7:41
  • $\begingroup$ anyone posting on this sub-site is not stupid. =) cryptography is not for the layman anytime soon. $\endgroup$ – Patoshi パトシ Aug 11 '17 at 14:24
2
$\begingroup$

BIP 39 describes the implementation of a mnemonic code or mnemonic sentence -- a group of easy to remember words -- for the generation of deterministic wallets.

Bitcoin private key is not stored in this way, rather seed to prng which generated the private and public key pair is converted into mnemonic so that its easy for human to type or remember.

A list of 2048 words, which is indexed from 0-2047(11 bit information) is used. 132 bit value (128 bit seed + 4 bit checksum) is divided into 12 chunks of 11 bits each, then each 11 bit is used to select a word from dictionary.

for more details see BIP39

$\endgroup$

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.