ilap / slip39-js

The javascript implementation of the SLIP39 for Shamir's Secret-Sharing for Mnemonic Codes.
MIT License
69 stars 27 forks source link

How can I convert Master Secret to BIP39 mnemonic seed? #22

Closed limpbrains closed 4 years ago

limpbrains commented 4 years ago

I'm trying to recover Trezor backup using slip39-js I've successfully received Master Secret and I'm trying to convert it to BIP38 seed using https://github.com/bitcoinjs/bip39 bip39.entropyToMnemonic with default english word list. But when I'm entering this seed to trezor, I'm getting different set of addresses.

ilap commented 4 years ago

Slip-39 only recovers the master seed/secret So, if the master key/node generation (or even the key derivation) differs for these two different mnemonic generating methods (as it can be seen in the Cardano's slip23 as an example) for TREZOR, then it would generate different addresses.

But, I am not sure how TREZOR is generating master key/nodes

limpbrains commented 4 years ago

Yes it turned out that TREZOR uses different key derivation scheme for wallets with slip39 backups. So there is no way to convert bip39 wallet to TREZOR slip39 wallet