Closed Shulyaka closed 6 years ago
Example:
[denis@localhost seedsplit]$ echo "island rich ghost moral city vital ignore plastic slab drift surprise grid idea distance regret gospel page across bird obscure copy either vessel jeans" | node bin/cli.js split -t 2 -s 3
Enter seed mnemonic:
1 pony quality biology flush middle flight universe stool like ocean climb casino super buyer smooth owner hidden gravity unable hunt mass media early borrow
2 sorry earn angry best glide purpose chat grant fox wall lawsuit such liquid wrong chimney raven husband boss grass inject they special warm shuffle
3 bus farm lecture segment shiver adjust rookie beyond blade clutch monster output clog taxi expect embrace omit lazy palace lobster fix budget donate rebel
[denis@localhost seedsplit]$ node bin/cli.js combine -t 2
Enter shard mnemonic: 1 pony quality biology flush middle flight universe stool like ocean climb casino super buyer smooth owner hidden gravity unable hunt mass media early borrow
Enter shard mnemonic: 3 bus farm lecture segment shiver adjust rookie beyond blade clutch monster output clog taxi expect embrace omit lazy palace lobster fix budget donate rebel
island rich ghost moral city vital ignore plastic slab drift surprise grid idea distance regret gospel page across bird obscure copy either vessel jeans
Hey @Shulyaka, this is really cool!
24 words - this is the limitstion of sss-node's keyshares API, it only works with 32-byte keys. And I couldn't find a good way to use it for shorter keys.
@Shulyaka ok, and I suppose there is no way that we can pad a shorter secret?
I couldn't find a good way to do it. All my ideas would result with a much longer shares than initial seed.
Here is what I have found out:
I hope my explanation is not too complicated. Please also see the libraries' technical details and my issue that I raised to clarify the above points.
I believe, the real question here is whether you want to support shorter (unsecure) mnemonics in the future. And if you do, may be it is better to stick to the current library.
Thanks for the writeup! I guess one simple thing that could be done is the following:
s<number>
instead of just a number24-word seeds could be encoded with l<number>
.
Now when recovering l
means that it's a "long" seed and s
that it's a "short" seed.
Ok, will try to implement something like this
Awesome, thanks!
Well, it is done now, please check.
I found out that apart from 128 bit and 256 bit mnemonics, there can also be 160 bit, 192 bit, and 224 bit. I have assigned the following prefixes: x for 128bit (12 words, "eXtra short") s for 160bit (15 words, "short") t for 192bit (18 words, "tiny") m for 224bit (21 words, "moderate") No prefix for native 256bit (24 words) Please advise if you prefer "a b c d" prefixes or something like this
Each share has 24 words regardless of original size.
Example:
[denis@localhost seedsplit]$ echo "leave culture supreme spider sport speak globe banner obey rhythm rubber tumble pact erupt piece" | node bin/cli.js split -t 2 -s 3
Enter seed mnemonic:
s1 girl arrow wagon debris family penalty exercise afford replace orient liar raw home twist hotel relief cherry render lucky miracle subway spare wing usage
s2 effort panther scale curtain glass rich firm buddy stick weasel dragon fossil keep action food alien glory you thing club kingdom cream atom remain
s3 foam plunge use that tissue slam kitten area virus system lawn add media planet mule filter game mask lake erupt begin basic lunch elevator
[denis@localhost seedsplit]$ node bin/cli.js combine -t 2
Enter shard mnemonic: s1 girl arrow wagon debris family penalty exercise afford replace orient liar raw home twist hotel relief cherry render lucky miracle subway spare wing usage
Enter shard mnemonic: s3 foam plunge use that tissue slam kitten area virus system lawn add media planet mule filter game mask lake erupt begin basic lunch elevator
leave culture supreme spider sport speak globe banner obey rhythm rubber tumble pact erupt piece
Nice, I'm going to merge this against the develop branch. I have some stylistic changes that I would like to make. I think I'll go for the a, b, c, ...
prefixes.
When I make a new PR against the master branch tagging a new release, I'll ping you :)
Great!
Please keep shards for 24 words without prefixes (just a number), that's my personal wish:)
Why do you want that? For me it would make more sense to be consistent. It also simplifies the code.
That's my use case for the tool. I plan to split the seed from my hardware crypto wallet into pieces and put them into a cold storage device like billfodl or cryptosteel, and hand them over to some members of my family and some friends. Because they are designed to store only 24 words, the share number will have to be remembered, possibly for many years. And remembering a single digit is much more convenient and reliable than, say, 'd3'. I am sure I am not the only one who could benefit from a little more convenience, and 24-word shards a going to be most common.
Thanks, I'll keep that as is then.
Hi,
This is a kind of experimental proof-of-concept code that you may find useful or interesting. I don't expect you to merge it right away, but rather to consider.