SLIP-39 Shamir Mnemonics
Project description
Reference implementation of SLIP-0039: Shamir’s Secret-Sharing for Mnemonic Codes
Abstract
This SLIP describes a standard and interoperable implementation of Shamir’s secret sharing (SSS). SSS splits a secret into unique parts which can be distributed among participants, and requires a specified minimum number of parts to be supplied in order to reconstruct the original secret. Knowledge of fewer than the required number of parts does not leak information about the secret.
Specification
See https://github.com/satoshilabs/slips/blob/master/slip-0039.md for full specification.
Installation
With pip from GitHub:
$ pip3 install https://github.com/trezor/python-shamir-mnemonic
From local checkout for development:
$ python3 setup.py develop
CLI usage
CLI tool is included as a reference and UX testbed. It is very obviously insecure. DO NOT USE it for generating or decoding any sort of serious secrets.
When the shamir_mnemonic
package is installed, you can use the shamir
command:
$ shamir create 3of5 # create a 3-of-5 set of shares
Use shamir --help
or shamir <command> --help
to get detailed help.
If you want to run the CLI from a local checkout without installing, use the following command:
$ python3 -m shamir_mnemonic.cli
Test vectors
The test vectors in vectors.json are given as a list of triples. The first member of the triple is a description of the test vector, the second member is a list of mnemonics and the third member is the master secret which results from combining the mnemonics. The master secret is encoded as a string containing two hexadecimal digits for each byte. If the string is empty, then attempting to combine the given set of mnemonics should result in error. The passphrase “TREZOR” is used for all valid sets of mnemonics.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file shamir-mnemonic-0.1.0.tar.gz
.
File metadata
- Download URL: shamir-mnemonic-0.1.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cc08d276e05b13cd32bd3b0c5d1cb6c30254e0086e0f6857ec106d4cceff121 |
|
MD5 | 504f2f0f6dede9b0d881899795c9e893 |
|
BLAKE2b-256 | e4b12b7966cde14ecb74564150ba7267a909e2472e9d8d7781579a2eeb84e98f |
File details
Details for the file shamir_mnemonic-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: shamir_mnemonic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e7cc1354697e304b7868fc01085bcd4b30bb2020b77b6cc5ceeb0c032d513a7 |
|
MD5 | 2e8e1f853791ab423f84e3a700600b48 |
|
BLAKE2b-256 | da7bbe61fae6dc3685197e3de75d78bcab7b40caac3235a235b2f8170cfc1cd2 |