Closed petre-c closed 2 weeks ago
Hi,
The problem is that SLIP-39 and BIP-39 use different method for generating their master seeds.
Though, you can make them compatible by using BIP39 entropy as SLIP39's masterkey. Example: BIP39 entropy as masterkey -> SLIP39 shards <-> BIP39 entropy <-> BIP39 mnemonic.
Thanks for that, @ilap
So I'm still failing while attempting to do the roundtrip with different tools:
seven replace great luggage fox rent general tower guess inside smile sing
results in c4b6d998c265c56c983731676ea732e4
c4b6d998c265c56c983731676ea732e4
as masterSecret
in main.js, setting passphrase
to ""
main.js
gets me (only the 2-member-shares) 👇🏾
* Shares used by Alice alone for restoring the master secret (total of 2 member-shares):
main.js:74
1) spew biology acrobat romp alto shaped primary body smear dough revenue duke regular column focus oral ceiling mountain blue salt grin elite prune tofu dryer away finger theory process artwork edge drink paper
main.js:16
2) spew biology beard romp alcohol evening problem domain tackle else fumes toxic ancient recall domain mountain elite easy steady animal research smith column purple deliver holiday muscle muscle equation vocal alcohol system profile
main.js:16
Master secret: c4b6d998c265c56c983731676ea732e4
main.js:10
Recovered one: c4b6d998c265c56c983731676ea732e4
Error: Invalid mnemonic checksum
slip39-recovery --using-bip39 -m "adult scandal acrobat romp afraid pulse promise diminish elevator scatter devote quiet regular crazy fishing device shaft percent false society buyer adequate decorate jerky that example dough python switch syndrome briefing wealthy emperor" -m "adult scandal beard romp alpha guest moment orbit elder justice moisture equation should random legs ugly likely spend prevent steady glad fortune discuss shrimp scout random response goat graduate flexible both chest domain"
glimpse perfect mirror silent near order mimic egg cube boost eternal shoe near book system great curtain rifle off second industry odor network only
Oooh, I see. They're compatible and interoperable, but it seems that the issue is with the iancoleman's website.
Oooh, I see. They're compatible and interoperable, but it seems that the issue is with the iancoleman's website.
Shouldn't I be able to recover the entropy I generate with slip39-js using python-slip39, then?
So I'm still failing while attempting to do the roundtrip with different tools:
You should use List<int>
or similar instead of hex string. Meaning:
Do not use: "c4b6d998c265c56c983731676ea732e4", as it uses as string, meaning 32 length string (256-bit entropy)
only use [196, 182, 217, 152, 194, 101, 197, 108, 152, 55, 49, 103, 110, 167, 50, 228]
16-length array meaning 128-bit entropy
As SLIP39's 20-length mnemonic means 128-bit entropy, while 33-length mnemonic is 256-bit entropy.
So then what would be the input to slip39EncodeHex()
method in main.js?
I could not translate your code snippet to make it work within main.js
Please bear with me and pardon my ignorance.
So then what would be the input to
slip39EncodeHex()
method in main.js?Please bear with me and pardon my ignorance.
This one would do I think:
const masterSecret = [].toByteArray("c4b6d998c265c56c983731676ea732e4");
So then what would be the input to
slip39EncodeHex()
method in main.js? Please bear with me and pardon my ignorance.This one would do I think:
const masterSecret = [].toByteArray("c4b6d998c265c56c983731676ea732e4");
YES! That worked. Thank you, @ilap
Maybe interoperability with other tools could be addressed in the docs.
Oooh, I see. They're compatible and interoperable, but it seems that the issue is with the iancoleman's website.
I created a PR for iancoelman's website to resolve the issue caused by my slip39-js v0.1.7.
Great, thank you, @ilap
iancoleman does not seem to be active, there are PRs sitting unmerged from 2022.
I saw you forked his repo. Would you be willing to host it somewhere for easy access?
Referencing your PR https://github.com/iancoleman/slip39/pull/35
Hosted here -> https://3rditeration.github.io/slip39/src/
I tried and failed to recover the BIP39 seed from SLIP39 shards generated by https://github.com/pjkundert/python-slip39 with this tool.
I also failed to recover the BIP39 seed from the SLIP39 shards generated by current tool with https://github.com/pjkundert/python-slip39.
Are the two supposed to be compatible / interoperable.
My goal is to have a number of tools that can recover SLIP39 shards I generate to store my BIP39 seed phrase in a distributed way.