Metadata-Version: 2.4
Name: uxsp
Version: 1.2.0
Summary: Universal Exchange Security Protocol — Hybrid Post-Quantum Secure Messaging
Author-email: SIVA RAJA S <sivaraja5401@gmail.com>
License: MIT License
        
        Copyright (c) 2026 SIVA RAJA S
        
        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.
        
Project-URL: Repository, https://github.com/SIVA-RAJA/uxsp
Project-URL: Documentation, https://github.com/SIVA-RAJA/uxsp#readme
Project-URL: Bug Tracker, https://github.com/SIVA-RAJA/uxsp/issues
Project-URL: Changelog, https://github.com/SIVA-RAJA/uxsp/blob/main/CHANGELOG.md
Keywords: security,cryptography,post-quantum,pqc,kyber,dilithium,hybrid-encryption,secure-messaging
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41.0.0
Requires-Dist: liboqs-python>=0.10.0
Requires-Dist: argon2-cffi>=21.3.0
Provides-Extra: aio
Provides-Extra: redis
Requires-Dist: redis>=4.0.0; extra == "redis"
Provides-Extra: postgres
Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgres"
Provides-Extra: db
Requires-Dist: redis>=4.0.0; extra == "db"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "db"
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.100.0; extra == "fastapi"
Requires-Dist: starlette>=0.27.0; extra == "fastapi"
Requires-Dist: httpx2>=2.12.0; extra == "fastapi"
Provides-Extra: django
Requires-Dist: django>=4.0.0; extra == "django"
Provides-Extra: flask
Requires-Dist: flask>=2.0.0; extra == "flask"
Provides-Extra: frameworks
Requires-Dist: fastapi>=0.100.0; extra == "frameworks"
Requires-Dist: starlette>=0.27.0; extra == "frameworks"
Requires-Dist: httpx2>=2.12.0; extra == "frameworks"
Requires-Dist: django>=4.0.0; extra == "frameworks"
Requires-Dist: flask>=2.0.0; extra == "frameworks"
Provides-Extra: all-django
Requires-Dist: django>=4.0.0; extra == "all-django"
Requires-Dist: redis>=4.0.0; extra == "all-django"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all-django"
Provides-Extra: all-flask
Requires-Dist: flask>=2.0.0; extra == "all-flask"
Requires-Dist: redis>=4.0.0; extra == "all-flask"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all-flask"
Provides-Extra: all-fastapi
Requires-Dist: fastapi>=0.100.0; extra == "all-fastapi"
Requires-Dist: starlette>=0.27.0; extra == "all-fastapi"
Requires-Dist: httpx2>=2.12.0; extra == "all-fastapi"
Requires-Dist: redis>=4.0.0; extra == "all-fastapi"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all-fastapi"
Provides-Extra: all
Requires-Dist: fastapi>=0.100.0; extra == "all"
Requires-Dist: starlette>=0.27.0; extra == "all"
Requires-Dist: httpx2>=2.12.0; extra == "all"
Requires-Dist: django>=4.0.0; extra == "all"
Requires-Dist: flask>=2.0.0; extra == "all"
Requires-Dist: redis>=4.0.0; extra == "all"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
Provides-Extra: full
Requires-Dist: fastapi>=0.100.0; extra == "full"
Requires-Dist: starlette>=0.27.0; extra == "full"
Requires-Dist: httpx2>=2.12.0; extra == "full"
Requires-Dist: django>=4.0.0; extra == "full"
Requires-Dist: flask>=2.0.0; extra == "full"
Requires-Dist: redis>=4.0.0; extra == "full"
Requires-Dist: psycopg2-binary>=2.9.0; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest==9.0.3; extra == "dev"
Requires-Dist: pytest-asyncio==1.3.0; extra == "dev"
Requires-Dist: pytest-cov==7.1.0; extra == "dev"
Requires-Dist: fakeredis==2.35.1; extra == "dev"
Requires-Dist: mypy==1.20.2; extra == "dev"
Requires-Dist: ruff==0.15.12; extra == "dev"
Provides-Extra: docs
Requires-Dist: Sphinx==9.1.0; extra == "docs"
Requires-Dist: furo==2025.12.19; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints==3.10.2; extra == "docs"
Dynamic: license-file

# UXSP — Universal Exchange Security Protocol

[![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-orange)]()
[![Python: 3.11+](https://img.shields.io/badge/Python-3.11%2B-blue)]()
[![License: MIT](https://img.shields.io/badge/License-MIT-green)]()
[![Coverage: 100%](https://img.shields.io/badge/Coverage-100%25-brightgreen)]()

**UXSP (Universal Exchange Security Protocol)** is an enterprise-grade, hybrid post-quantum security framework. It is designed from the ground up to protect your web APIs, file streams, messaging layers, and live media against classical eavesdroppers and the upcoming threat of quantum computers.

---

## 💡 What is UXSP?

In standard web applications, data sent over the internet relies on traditional encryption (like RSA or ECC). However, upcoming quantum computers will soon be powerful enough to break this traditional encryption, exposing sensitive user records, financial transactions, and private messages.

**UXSP solves this problem today by providing "Hybrid Post-Quantum Security":**
1. **Double-Layer Armor**: It combines trusted classical encryption (AES-256-GCM + X25519/Ed25519) with modern NIST-standardized Post-Quantum Cryptography algorithms (**ML-KEM** FIPS 203 and **ML-DSA** FIPS 204).
2. **Zero-Complexity for Developers**: Instead of writing hundreds of lines of complex cryptographic setup, UXSP provides beautiful, high-level APIs that allow developers to secure entire applications, web endpoints, multi-gigabyte file transfers, and even WebRTC video streams with **just 1 line of code**.

---

## ✨ Features Overview

UXSP comes packed with capabilities to handle any data transfer scenario securely:

- **Send Any Format**: Whether you are sending plain text, structured JSON, raw binary, large files, documents (PDF, Word), images, photos, audio, voice memos, archives (Zip), locations, or contacts, UXSP provides dedicated classes for all data types. It automatically serializes, chunks, encrypts, and packages the data.
- **Live Video Calls**: Negotiate high-performance AES-GCM secure WebRTC sessions for real-time video calls with a single line of code.
- **Live Voice Calls**: Establish encrypted audio streams with configurable codecs and sample rates for highly secure voice communication.
- **Live CCTV Integration**: Securely connect and stream data from live CCTV cameras, protecting sensitive monitoring feeds from interception.
- **Web Framework Middlewares**: Drop-in middlewares for **FastAPI**, **Django**, and **Flask**. They automatically decrypt incoming requests, verify identities, and encrypt outbound responses, replacing the need for traditional CSRF tokens.
- **Durable Replay Protection (NonceStores)**: Out-of-the-box support for Memory, Redis, and Postgres-backed NonceStores (both synchronous and asynchronous) to ensure intercepted messages can never be replayed by an attacker.
- **Frontend Interoperability**: A companion NPM package allows your web frontend to encrypt data directly in the browser before it even hits the network.

*(For detailed implementations, tutorials, and code examples of these features, please refer to the `docs/` directory).*

---

## ⚙️ Installation & Setup

UXSP is highly modular. You only need to install the dependencies required for your specific framework and storage needs.

| Installation Command | Included Components & Dependencies |
| :--- | :--- |
| `pip install uxsp` | Base `uxsp.secure` (cryptography, liboqs-python, argon2-cffi) |
| `pip install uxsp[aio]` | `uxsp.secure` + `uxsp.aio` (Asynchronous capabilities) |
| `pip install uxsp[django]` | `uxsp.secure` + Django Integrations |
| `pip install uxsp[flask]` | `uxsp.secure` + Flask Integrations |
| `pip install uxsp[fastapi]` | `uxsp.secure` + FastAPI, Starlette, HTTPX Integrations |
| `pip install uxsp[postgres]` | `uxsp.secure` + Postgres (`psycopg2-binary`) |
| `pip install uxsp[redis]` | `uxsp.secure` + Redis (`redis`) |
| `pip install uxsp[aio, django]` | `uxsp.secure` + `uxsp.aio` + Django |
| `pip install uxsp[aio, postgres]` | `uxsp.secure` + `uxsp.aio` + Postgres |
| `pip install uxsp[aio, redis]` | `uxsp.secure` + `uxsp.aio` + Redis |
| `pip install uxsp[aio, django, postgres]` | `uxsp.secure` + `uxsp.aio` + Django + Postgres |
| `pip install uxsp[aio, django, redis]` | `uxsp.secure` + `uxsp.aio` + Django + Redis |
| `pip install uxsp[all-django]` | `uxsp.secure` + `uxsp.aio` + Django + Postgres + Redis |
| `pip install uxsp[all-flask]` | `uxsp.secure` + `uxsp.aio` + Flask + Postgres + Redis |
| `pip install uxsp[all-fastapi]` | `uxsp.secure` + `uxsp.aio` + FastAPI + Postgres + Redis |
| `pip install uxsp[all]` | Complete stack with all web frameworks and storage backends |

### System Prerequisites (`liboqs`)

UXSP utilizes `liboqs` for C-native Post-Quantum Cryptography acceleration. You must install the required build tools for your platform:

* **Ubuntu / Debian / Mint**:
  ```bash
  sudo apt update && sudo apt install -y build-essential cmake ninja-build libssl-dev git
  ```
* **Fedora / RHEL / CentOS**:
  ```bash
  sudo dnf groupinstall -y "Development Tools" && sudo dnf install -y cmake ninja-build openssl-devel git
  ```
* **macOS**:
  ```bash
  brew install cmake ninja openssl@3
  ```
* **Windows**:
  Requires Visual Studio Build Tools (C++), CMake, and Git. *(Note: Windows support is experimental and falls back to msvcrt for certain operations).*

*(If `liboqs` fails to compile on your system, UXSP will automatically fall back to its built-in pure Python Post-Quantum Cryptography implementations, ensuring it always runs).*

---

## 🚀 How to Access the Project (Documentation)

For detailed step-by-step developer tutorials, architectural explanations, and complete code examples, please head to the **`docs/`** directory.

The documentation is written to be perfectly clear, even if you are a new programmer without deep domain knowledge in cryptography or networking. 

Start by reading the **[Index (`docs/index.md`)](./docs/index.md)**, which will guide you through:
- High-level and Low-level APIs
- Synchronous vs. Asynchronous Usage
- Live Video, Audio, and CCTV Streaming
- Django, Flask, and FastAPI Middleware configurations
- Replay Protection with NonceStores
- The UXSP Command Line Interface (CLI)

---

## 📄 License & Security

UXSP is released under the **[MIT License](./LICENSE)**. 
For security disclosures, vulnerability reporting, and threat models, please consult **[SECURITY.md](./SECURITY.md)**.

_UXSP v1.2.0_
_Maintained by SIVA RAJA S_
