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 · 1 comment

Comments

Projects
None yet
2 participants
@iancoleman
Owner

iancoleman commented Sep 5, 2017

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

This comment has been minimized.

jhoenicke commented Sep 7, 2017

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment