Metadata-Version: 2.4
Name: nexus-enigma
Version: 1.0.0
Summary: Nexus Gateway SDK - End-to-end encrypted data ingestion for IoT and applications
Author-email: Your Company <support@yourcompany.com>
License: MIT
Project-URL: Homepage, https://github.com/yourcompany/nexus-enigma
Project-URL: Bug Tracker, https://github.com/yourcompany/nexus-enigma/issues
Project-URL: Documentation, https://docs.yourcompany.com/nexus
Keywords: nexus,encryption,iot,mqtt,data-ingestion,aes-256-gcm
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=3.4.0
Requires-Dist: requests>=2.25.0
Requires-Dist: paho-mqtt>=1.6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# Nexus Enigma SDK

End-to-end encrypted data ingestion for Nexus Gateway.

## Installation

```bash
pip install nexus-enigma
```

## Quick Start

### HTTP Client (Sender Apps)

```python
from nexus_enigma import NexusEnigma

client = NexusEnigma(
    app_key="your_app_key",
    master_secret="BASE64_MASTER_SECRET_FROM_NEXUS",
    base_url="https://your-nexus-server.com"
)

# Send encrypted sensor data
result = client.send({
    "temperature": 25.5,
    "humidity": 60,
    "sensor_id": "temp_001"
})

print(result)  # {"message": "Data accepted", "message_ids": [...]}
```

### MQTT Client (IoT Devices)

```python
from nexus_enigma import MQTTEnigmaClient

client = MQTTEnigmaClient(
    host="your-mqtt-broker.com",
    port=1883,
    master_secret="BASE64_MASTER_SECRET_FROM_NEXUS",
    source_id=1  # Your MQTT source ID from Nexus
)

# Connect and publish
client.connect()
client.publish("sensors/temperature", {
    "temp": 25.5,
    "humidity": 60
})
client.disconnect()
```

## Features

- **AES-256-GCM Encryption** - Military-grade authenticated encryption
- **HKDF Key Derivation** - Daily rotating keys for forward secrecy
- **Automatic Key Management** - Keys derived from master secret automatically
- **HTTP & MQTT Support** - Choose your transport protocol
- **Zero Configuration Encryption** - Just provide your master secret

## Security

All data is encrypted **before** leaving your device:

1. Daily keys are derived using HKDF-SHA256
2. Each message gets a unique random nonce
3. AES-256-GCM provides encryption + integrity verification
4. Only your Nexus server can decrypt the data

## Requirements

- Python 3.8+
- `cryptography>=3.4.0`
- `requests>=2.25.0`
- `paho-mqtt>=1.6.0`

## License

MIT License - see [LICENSE](LICENSE) for details.
