VaultSplit
VaultSplit is a Python security library for splitting a 256-bit secret into multiple Shamir Secret Sharing shares and using the reconstructed secret to encrypt data with AES-256-GCM.
Features
- 256-bit cryptographically secure secret generation
- Shamir Secret Sharing
- Default 6-of-10 threshold
- AES-256-GCM authenticated encryption
- HKDF-SHA256 key derivation
- Share/vault integrity metadata
- Text and file encryption APIs
- Command-line interface
- Ready for PyPI packaging
Install locally
py -m pip install -e .
Python API
from vaultsplit import Vault
vault = Vault("./myvault")
vault.create(total_shares=10, threshold=6)
ciphertext = vault.encrypt_text("Merhaba dünya!")
print(vault.decrypt_text(ciphertext))
File encryption
from vaultsplit import Vault
vault = Vault("./myvault")
vault.encrypt_file("secret.txt", "secret.vault")
vault.decrypt_file("secret.vault", "secret_recovered.txt")
CLI
vaultsplit init ./myvault --shares 10 --threshold 6
vaultsplit status ./myvault
vaultsplit encrypt-file ./myvault secret.txt secret.vault
vaultsplit decrypt-file ./myvault secret.vault recovered.txt
Security model
This library does not become secure merely because the shares are stored in ten files. If an attacker can read all ten files, they can reconstruct the secret. Threshold sharing becomes useful when shares are separated across distinct trust domains, such as different machines, accounts, removable media, or physical backups.
AES-GCM provides confidentiality and authentication for encrypted data. The application still needs secure operating-system permissions, safe backup practices, and an appropriate threat model.
This project is educational/experimental and has not been independently audited. Do not use it as the sole protection for high-value production secrets without a professional security review.
Release files for vaultsplit 0.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 | |
|---|---|---|---|
| vaultsplit-0.1.0.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vaultsplit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / vaultsplit-0.1.0.tar.gz
| Download URL | vaultsplit-0.1.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
327d91bd22b55f438b9fa9994ea90a1fb4ec3c6418ee0bcb5a370c407eb1fe03
|
|
BLAKE2b-256 checksum How to use checksums |
c64f06d9b278cc0788d8b04a5a1cd79e2e7500bb61c16fcd2b53501e74958071
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Release files / vaultsplit-0.1.0-py3-none-any.whl
| Download URL | vaultsplit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f6d8917df4636f383231fbdbf0922dafcece4d3ac7619f0e539b3572da9325a
|
|
BLAKE2b-256 checksum How to use checksums |
4616288bda69e953678e2d6e570c43378b1b21e0ab7fea5e3db9ef5871145f16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|