Skip to content

Fix embedded mnemonic share index bit sizing#58

Open
Michealkene wants to merge 1 commit into
bitaps-com:masterfrom
Michealkene:fix/jsbtc-55-embedded-index-bits
Open

Fix embedded mnemonic share index bit sizing#58
Michealkene wants to merge 1 commit into
bitaps-com:masterfrom
Michealkene:fix/jsbtc-55-embedded-index-bits

Conversation

@Michealkene
Copy link
Copy Markdown

Fixes #55.

Summary:

  • Derive embedded share index bit capacity from the BIP39 entropy/checksum size.
  • Use that capacity by default in __split_secret, so 12-word mnemonics only generate encodable share indexes.
  • Keep validation when the requested total share count exceeds the embedded index capacity.
  • Add regression coverage for a 12-word embedded-index split/combine path and the 16-share overflow case.

Tests:

  • git diff --check
  • Local smoke coverage for the affected split/combine path passed in the earlier work session.
  • Full npm test was not completed locally because dependency install timed out and mocha was unavailable in this checkout.

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

Successfully merging this pull request may close these issues.

Bug: indexBits=8 default causes silent wallet loss for 12-word mnemonics

1 participant