bitpay / bitcore-mnemonic

BIP39 Mnemonics implemented for Bitcore

Home Page:http://bitcore.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

From seed to mnemonic not possible ?

rllola opened this issue · comments

Hello,

I have so master seed that I want to translate into a mnemonic so I can enter it in a device. I tried to generate a new Mnemonic from a seed but the result is different. I am doing it wrong or it is just simply not possible ?

> var code = new Mnemonic()
undefined
> code
<Mnemonic: echo visual paddle amount craft art ticket receive guard slender promote edge >
> code.toSeed()
<Buffer 55 f9 2e 68 c3 32 01 14 6f 8e ab e2 2d 1c  ... >
> new Mnemonic(code.toSeed())
<Mnemonic: field siren olive major cactus mechanic sail ... >

Not possible.

.toSeed() runs hashing algorithms that are irreversible.

However, if you would like to generate 16 bytes of random bytes and store that, you can store those 16 bytes and use that to re-generate the same 12 word phrase over and over.

But there is no way to turn the result of .toSeed() back into its original phrase