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

[Feature] Add SLIP-39 Shamir's secret sharing import support for SeedSigner #636

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

alvroble
Copy link
Contributor

@alvroble alvroble commented Dec 19, 2024

Description

This PR introduces support for importing Shamir Secret Sharing (SSS) shards (SLIP-39) into SeedSigner, focusing on seed recovery for users with existing SSS-based backups. While SeedSigner’s stateless design discourages SSS for routine use, this feature provides flexibility for recovering keys from legacy setups or unique scenarios where SSS is used.

The implementation is strictly limited to key recovery, with no support for creating new SSS setups (this can be discussed along with SeedQR support for SSS). So this feature aligns with SeedSigner’s philosophy of providing versatile recovery options without compromising simplicity.

Relevant issue: #552

The seed recovery flow is designed so that the user first inputs the threshold, then enters the words, and is finally asked for an optional passphrase. This process is similar to the regular seed import flow.

Threshold entry is only numerical:

SeedEntryShamirThresholdView

Then the user is asked about the original seed word length

SeedShamirShareImportSelectWordCount

Then, user enters words using the SLIP-39 wordlist. If the original seed length is 12 words, each Shamir's share will be 20 words long. If the original seed length is 24 words, each Shamir's share will be 33 words long. All shares (up to the threshold number) are required to recover the original secret.

SeedShamirShareMnemonicEntryView

SLIP-39 checksum errors are treated as follows:

SeedShamirShareInvalidView

Then the user will be asked if they want to enter a passphrase (the finalize screen is improvable), after which the device will take them to the SeedFinalizeView view

SeedShamirShareFinalizeView

I'm open to comments around this feature as well as to UX improvements so we can get a final version of the PR

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

  • I’ve run pytest and made sure all unit tests pass before sumbitting the PR

If you modified or added functionality/workflow, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms/os:

@kdmukai
Copy link
Contributor

kdmukai commented Dec 19, 2024

Very cool. I appreciate you honing your approach to fit the preferences we've adopted for the project thus far.

I will be tied up with finish the upcoming multilanguage + Spanish release, but will be looking forward to reviewing this PR in the coming weeks. If we get to 2-3 weeks past the new release and you haven't heard from me, please poke me on telegram and remind me to return here!

@newtonick newtonick added this to the 0.9.0 milestone Jan 13, 2025
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.

3 participants