Skip to content

About

QuantumVault is a decentralized, post-quantum secure file storage system.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

QuantumVault — Backend

Post-Quantum Secure Multi-Cloud Distributed Storage — FastAPI Backend

Stack

  • FastAPI — async Python API framework
  • Reed-Solomon (4+2) — pure-Python GF(2^8) erasure coding
  • AES-256-GCM — symmetric encryption (client-side, frontend)
  • ML-KEM-768 — post-quantum KEM (simulated; swap in liboqs for production)
  • PostgreSQL — relational store with JSONB shard maps

File Structure

qvault-backend/
├── main.py            # FastAPI app + endpoints
├── shard_manager.py   # RS(4+2) encoder + multi-cloud dispatch (CORE MODULE)
├── models.py          # Pydantic request/response schemas
├── schema.sql         # Complete PostgreSQL schema + seed data
└── requirements.txt

Run Locally

pip install -r requirements.txt
uvicorn main:app --reload --port 8000

API docs: http://localhost:8000/docs

Primary Endpoint

POST /upload-shard
Content-Type: multipart/form-data

Headers:
  X-AES-IV          : 24-char hex (96-bit GCM IV)      [required]
  X-Vault-Shield-ID : UUID of PQ shield                  [optional]
  X-KEM-Capsule     : Base64 ML-KEM-768 capsule bytes    [optional]
  X-Owner-ID        : UUID of authenticated user         [optional]

Body:
  file: <AES-256-GCM encrypted binary ciphertext>

RS(4+2) Shard Distribution

Ciphertext (bytes)
     │
     ▼
RS Encoder (GF(2^8))
     │
     ├── shard_0  (DATA)    ─┐
     ├── shard_1  (DATA)    ─┤── AWS  us-east-1
     ├── shard_2  (DATA)    ─┤
     ├── shard_3  (DATA)    ─┤── GCP  europe-west1
     ├── shard_4  (PARITY)  ─┤
     └── shard_5  (PARITY)  ─┘── Azure central-us

Reconstruction: any 4 of 6 shards → RS decode → original ciphertext
Fault tolerance: 1 entire cloud provider can fail with full recovery

Database Schema Tables

Table Purpose
users Auth identities + PQ public key fingerprints
postquantum_shields ML-KEM-768 shield registry
vault_files File metadata + AES IV + shield reference
shard_maps Junction: file → RS distribution (JSONB)
shards Individual shard URIs, status, KEM capsule hash
forensics_audit_log Immutable tamper-evident chain-of-custody log

About

QuantumVault is a decentralized, post-quantum secure file storage system.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages