Metadata-Version: 2.4
Name: borg-encryption
Version: 1.0.0
Summary: Borg Encryption System - A multi-layered, adaptive encryption system
Author-email: Borg Collective <resistance.is.futile@borg-collective.com>
License: MIT
Project-URL: Homepage, https://github.com/borg-collective/borg-encryption
Project-URL: Bug Tracker, https://github.com/borg-collective/borg-encryption/issues
Keywords: encryption,security,cryptography,api
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41.0.0
Requires-Dist: pycryptodome>=3.19.0
Requires-Dist: pynacl>=1.5.0
Requires-Dist: fastapi>=0.104.0
Requires-Dist: uvicorn>=0.23.2
Requires-Dist: pydantic>=2.4.2
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: click>=8.1.7
Requires-Dist: requests>=2.31.0
Dynamic: license-file

# Borg Encryption System

A multi-layered, adaptive encryption system inspired by the Borg from Star Trek. This system uses multiple encryption algorithms in sequence, including post-quantum resistant algorithms, to create an extremely secure encryption mechanism.

## Features

- **Multi-layered encryption** (cascading ciphers)
- **Post-quantum resistant algorithms**
- **Adaptive security measures**
- **Key rotation**
- **Side-channel attack protections**
- **Secure memory management**
- **REST API** for easy integration

## Installation

```bash
pip install borg-encryption
```

## Quick Start

### Command Line Usage

```bash
# Encrypt a text message
borg-encrypt encrypt --text "Resistance is futile" --key "your-password" --local

# Decrypt a text message
borg-encrypt decrypt --file encrypted.txt --key "your-password" --local

# Encrypt a file
borg-encrypt encrypt-file --file secret.pdf --key "your-password" --output secret.encrypted --local

# Decrypt a file
borg-encrypt decrypt-file --file secret.encrypted --key "your-password" --output secret.pdf --local

# Start the API server
borg-encrypt server --port 8000
```

### Python API Usage

```python
from borg_encryption import BorgEncryption

# Create an encryption instance
borg = BorgEncryption("your-password")

# Encrypt data
message = "Resistance is futile. Your biological and technological distinctiveness will be added to our own."
encrypted = borg.encrypt(message)

# Decrypt data
decrypted = borg.decrypt_to_string(encrypted)
print(decrypted)  # Should print the original message
```

### REST API Usage

```python
from borg_encryption.client import BorgAPIClient

# Create a client
client = BorgAPIClient("http://localhost:8000", "your-api-key")

# Encrypt a message
encrypted = client.encrypt_text("Resistance is futile", "your-password")

# Decrypt a message
decrypted = client.decrypt_text(encrypted, "your-password")
```

## Security Features

- **Multi-layered encryption**: Uses AES-GCM, ChaCha20-Poly1305, and XSalsa20-Poly1305 in sequence
- **Secure key derivation**: Uses PBKDF2 and Scrypt with high iteration counts
- **Adaptive defense**: Monitors for attacks and adapts security parameters
- **Secure memory management**: Clears sensitive data from memory when no longer needed
- **Side-channel attack protections**: Implements timing attack countermeasures

## License

MIT License
