Metadata-Version: 2.4
Name: vaultsplit
Version: 0.1.0
Summary: Threshold secret storage with Shamir Secret Sharing and AES-256-GCM
Author: Yakup Delil
License: MIT License
        
        Copyright (c) 2026 Yakup Delil
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=42
Dynamic: license-file

# 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

```bash
py -m pip install -e .
```

## Python API

```python
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

```python
from vaultsplit import Vault

vault = Vault("./myvault")
vault.encrypt_file("secret.txt", "secret.vault")
vault.decrypt_file("secret.vault", "secret_recovered.txt")
```

## CLI

```bash
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.
