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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
horcrux-1.0.3.tar.gz
(10.4 kB
view details)
Built Distribution
horcrux-1.0.3-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file horcrux-1.0.3.tar.gz
.
File metadata
- Download URL: horcrux-1.0.3.tar.gz
- Upload date:
- Size: 10.4 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 | bb05e9d8a400488dd247e3d50bba32bfed380cab5778e72874899df3434eb103 |
|
MD5 | 7758045e676c9773087acb0bd463bd80 |
|
BLAKE2b-256 | df60a72510b880cc3afbaf3b3f9fb9e1edcf812b782ff86083361a57b4ad93d4 |
File details
Details for the file horcrux-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: horcrux-1.0.3-py3-none-any.whl
- Upload date:
- Size: 11.2 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 | 150a0ebefe10fb7f322500b7f376eaa60a5640def8d8741290460c4fbb074bcb |
|
MD5 | ea7dde37f85a70510ff1650f803539f5 |
|
BLAKE2b-256 | 502bc2796478da12de7f14a5d3aa26e5f322631af6c354749fae1958f0c2b571 |