Feat/slip39 shamir secret sharing 407 #765
Open
+1,013
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add SLIP39 (Shamir's Secret Sharing) Support for Coldkey Management
Summary
This PR implements SLIP39 support for coldkey management, addressing issue #407. It allows users to create and recover coldkeys using Shamir's Secret Sharing, where the plaintext seed phrase is never exposed - eliminating the risk of screen reader and keylogger attacks.
Closes #407
What's Changed
New Commands
Create a coldkey with SLIP39 shares:
Recover a coldkey from shares:
How It Works
SLIP39 splits a secret into N shares where M shares are required to reconstruct the original (M-of-N threshold scheme). For example, with a 3-of-5 setup:
Security Benefits
Use Cases
Files Changed
bittensor_cli/src/bittensor/slip39.pybittensor_cli/cli.pynew-coldkey-slip39,recover-coldkey-slip39)tests/unit_tests/test_cli.pypyproject.tomlshamir-mnemonic>=0.3.0dependencyTesting
All tests pass:
Dependencies
Added
shamir-mnemonic>=0.3.0- the official Trezor implementation of SLIP39.References
Checklist
stagingbranchContribution by Gittensor, learn more at https://gittensor.io/