Description
Python port of Shamir key Split and Combine methods from Hashicorp Vault.
Requirements
- Python 3.9 or higher
Installation
pip install pyshamir
Usage
Split & Combine
from pyshamir import split, combine
import secrets
# generate a random secret, here secret is a 32 bytes
secret = secrets.token_bytes(32)
# set the number of shares; i.e. the number of parts to split the secret into
num_of_shares = 5
# threshold is minimum number of keys required to get back the secret
threshold = 3
# split to get a list of bytearrays which can be combined later to get back the secret
parts = split(secret, num_of_shares, threshold)
# Now, the parts be combined to get back the secret
recomb_secret = combine(parts)
References
Metadata
Release files for pyshamir 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyshamir-1.1.0.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyshamir-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.4 kB
Release files / pyshamir-1.1.0.tar.gz
| Download URL | pyshamir-1.1.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c99eab3eb50e0c8eca654f776acdf832534b717adb9e0d9127a60a0432c160f5
|
|
BLAKE2b-256 checksum How to use checksums |
eadbbffb0ec4de6e0a855b58cde7937b680f06388d86f2fbbb5fdda3b21777ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyshamir-1.1.0-py3-none-any.whl
| Download URL | pyshamir-1.1.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4446174d0d0195f8d4fdd7f972917aeacbff9828f1f97cf89bce58edd8260e1
|
|
BLAKE2b-256 checksum How to use checksums |
ac72278e9821cceb4c5d1356a4dac924cdf03515565c12076bc5bc680c36e3fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency log