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

Recover EncryptedMasterSecrets from arbitrary sequences of Mnemonics #51

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

pjkundert
Copy link

Recovering SLIP-39 EncryptedMasterSecrets from (possibly corrupted or otherwise attacked) sets of Mnemonics is the sole purpose of the SLIP-39 standard.

Verifying, grouping and vetting sets of mnemonics requires at least partial decoding of the mnemonic to extract identifier, extendable flag, group counts, thresholds, etc., so that only compatible mnemonics are considered. This is difficult to do "externally" to the SLIP-39 implementation.

Therefore, a robust API to recover one or more SLIP-39-encoded encrypted master secrets from a pool of collected mnemonics is not just useful, but critical to the proper operation of a SLIP-39 based recovery system.

Thus: I propose shamir_mnemonic.group_ems_mnemonics, which takes a sequence of Mnemonics (as either str or Share), and produces a sequence of EncryptedMasterSecrets and a dict of group indices and the list of Mnemonics used to recover the secret. It does so in a manner resilient to various corruptions or attacks, ignoring invalid, unrelated/incompatible or redundant Mnemonics.

Fixes #44

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.

Group member check seems too restrictive when combining mnemonics
1 participant