Closed lacksfish closed 6 years ago
@lacksfish, please see BIP39
The length of the derived key is 512 bits (= 64 bytes).
The derived key is seedFromFirstMnemonic
.
You are providing greater than 32 bytes of entropy to entropyToMnemonic
, which the strict rules are that 128 <= ENT <= 256
.
If you see this being done elsewhere, they are probably not adhering to the standard as strictly.
Can you then by any chance share the code snippet using bip39.js to derive a mnemonic from another mnemonic given a password as described by the initial BIP39 spec?
I'd really would like to learn more about the plausible-deniability this BIP39 feature offers and I am confused given this functionality seems to be differentiating amongst BIP39 implementations.
It seems that
mnemonicToSeed()
returns a Buffer that contains "too much" entropy? https://github.com/bitcoinjs/bip39/blob/v2.5.0/index.js#L99 will then throw an Exception when I try to feed that entropy seed back intoentropyToMnemonic()
Below I share the code with which I tried to create a password derived mnemonic with a passphrase based on the optional BIP39 spec with the bip39.js library. I also add a code snippet of how to achieve the encryption using
bitcore-mnemonic
The Exception thrown is
Most likely I'm doing something wrong. Although what is confusing is that
bitcore-mnemonic
seems to be using the seed/entropy Buffer the way I'd have expected... ( see https://github.com/bitpay/bitcore-mnemonic/blob/master/lib/mnemonic.js#L71)Environment: Ubuntu 18.04 , Node v8.12.0