Metadata-Version: 2.4
Name: sovereign-zk
Version: 0.3.1
Summary: A concept framework exploring probabilistic ZK audits and TEEs for cross-border GPU compute.
Home-page: https://github.com/93Chidiebere/ZKP-GPUcompute
Author: Chidiebere
Author-email: vincent.christopher.189736@unn.edu.ng
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: ezkl>=22.3.0
Requires-Dist: cryptography>=41.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: pycryptodome>=3.19.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Sovereign-ZK

A theoretical concept framework exploring privacy-preserving cross-border GPU compute using Zero-Knowledge Verifiable Computation (ZK-VC) and Confidential Computing (CC). Developed by **Chidiebere V. Christopher**.

Sovereign-ZK proposes a two-tier architecture for institutions to offload heavy deep learning workloads to remote Confidential GPUs. It explores protecting plain-text data from remote software adversaries using hardware TEEs, while maintaining computational integrity via probabilistic audits. 

**v0.3.0+ Architecture Revamp:** The framework has completely shifted from Web3 Smart Contracts to a mathematically rigorous **SLA-Backed Probabilistic Audit Model**. It uses a `Commit-Then-Challenge` protocol driven by a public randomness beacon (e.g., `drand`) to ensure cloud provider accountability via economic deterrence ($S \ge g/q$) without blockchain privacy leaks.

## Installation / Upgrade

To upgrade to the SLA Commit-Then-Challenge architecture:
```bash
pip install --upgrade sovereign-zk
```

## Quick Start (SLA Probabilistic Architecture)

### 1. Start the Remote GPU Node (Kenya)
The node continuously listens for new AI compute jobs and outputs cryptographic commitments ($C_y$) for every single inference to bind its behavior.

```bash
python -m sovereign_zk.node
```

### 2. Submit Data from the Local Client (Nigeria)
On your local machine, use the client SDK to encrypt your data, generate an input commitment ($C_x$), and query the randomness beacon.

```bash
python -m sovereign_zk.client
```

Under the hood, the client script does this:
```python
from sovereign_zk.client import get_drand_beacon

# 1. Encrypt the data and generate Input Commitment
c_x = hashlib.sha256(encrypted_payload + nonce).hexdigest()

# 2. Receive Output Commitment (C_y) from Node
c_y = network.wait_for_commitment()

# 3. Query Public Randomness Beacon (e.g., 1% challenge rate)
beacon_val = get_drand_beacon()
if beacon_val <= 1:
    # 4. Job is challenged! Reveal nonce to Node to generate ZK Proof
    proof = network.challenge_node(nonce)
    verify_proof(proof, c_x, c_y)
else:
    # Accept outcome based on cryptographic economic deterrence
    authorize_fiat_payment()
```

## Economics
Sovereign-ZK uses standard Fiat/SLA contracts. By enforcing a $100\times$ slashing penalty against the cloud provider if they fail a $1\%$ cryptographic audit, African researchers achieve world-class AI compute integrity without the overhead of generating ZK proofs for every single transaction.

## Author

**Chidiebere V. Christopher**
* **LinkedIn**: [Chidiebere Christopher](https://www.linkedin.com/in/chidiebere-christopher/)
* **GitHub**: [93Chidiebere](https://github.com/93Chidiebere)
* **Email**: vchidiebere.vc@gmail.com
