Horcrux - A Python implementation of Shamir's Secret Sharing.
Project description
Horcrux
A Python implementation of Shamir's Secret Sharing, based of Hashicorp's implementation for Vault.
Shamir's Secret Sharing
Shamir's Secret Sharing in an efficient algorithm for distributing private information. A secret is transformed into shares from which the secret can be reassembled once a threshold number are combined.
Example
from shamir import combine, split
def hello() -> None:
"""Split a byte-string and recombine its parts."""
secret: bytes = b"Hello, World!"
shares: int = 5
threshold: int = 3
parts: list[bytearray] = split(secret, shares, threshold)
combined: bytearray = combine(parts[:3])
print(combined.decode("utf-8"))
if __name__ == "__main__":
hello()
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file horcrux-1.0.4.tar.gz.
File metadata
- Download URL: horcrux-1.0.4.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
737aa25529de84ee94145ce81564563aaff0eedf4bc29c152cb30450d2f09a3b
|
|
| MD5 |
ca4e5a3aedb05e4eac742974345ac1b8
|
|
| BLAKE2b-256 |
10233ddbd19724e496ae7ec2c441ea0b11c5d319950432491fe683ddde5a8556
|
File details
Details for the file horcrux-1.0.4-py3-none-any.whl.
File metadata
- Download URL: horcrux-1.0.4-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59e7daaee558565caff35b704ae417e5e3ed322cf2880e68cf3c552830b16cf3
|
|
| MD5 |
a01f649561cf834b68023e2e3e464072
|
|
| BLAKE2b-256 |
3c61b466351ecff80a21b7858de129ffb9554c7b076b6b4f4db3b2aac8b4237e
|