Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include ssss bits parameter in mnemonic #2

Open
iancoleman opened this issue Sep 5, 2017 · 2 comments
Open

Include ssss bits parameter in mnemonic #2

iancoleman opened this issue Sep 5, 2017 · 2 comments

Comments

@iancoleman
Copy link
Owner

The number of bits used for ssss shares determines the maximum number of shares.

The ssss library defaults to 8 bits (max 255 shares)

The shamir39 implementation hardcodes it to 12 bits (max 4095 shares)

This should ideally be encoded into the mnemonic so there is no upper limit on the number of shares. See shamir39.js L744

@jhoenicke
Copy link

I think using 11 bits fixed makes sense. You don't need to repack and pad the bits a second time when converting to words. The algorithm could do most of the transformations on the word level (11 bit chunks). Basically you can then compute the n-th word of the secret using the n-th word of the shares (plus the indices of the share). And 2047 shares should be enough for everyone.

This makes the algorithm simpler and the seeds shorter as you don't have to add padding twice. I don't think there are security issues (and if there are, they are only obfuscated by switching between 12bit/11bit packing).

@FlippyFlink
Copy link

Thanks Ian for creating and sharing your work! :-)
If people want, they can use this template to write down their words. On page 2 to I added a link to your https://iancoleman.io/shamir39/
See:
https://commons.wikimedia.org/wiki/File:Seed-phrase-wallet-backup-template.png
https://commons.wikimedia.org/wiki/File:Seed-phrase-wallet-backup-template-page2.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants