Skip to content

About

Practically Unbreakable Secure Data Transfer System Which Becomes Mathematically More Secure with scaling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘» Phantom-Net

Where Privacy Meets Technology

Encryption RSA Onion Zero Knowledge

πŸ” End-to-end encrypted β€’ πŸ‘οΈβ€πŸ—¨οΈ Anonymous routing β€’ πŸ›‘οΈ Zero-knowledge architecture

Your messages. Your privacy. Period.


🌟 Overview

Phantom-Net is a cutting-edge secure messaging platform where the server cannot decrypt your messages. Built with military-grade encryption and anonymous onion routing, it ensures that your conversations remain truly private.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  "In a world of surveillance, privacy is not a luxuryβ€”         β”‚
β”‚   it's a right. Phantom-Net makes that right a reality."       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Features

Feature Description
πŸ‘» Phantom Network Anonymous onion routing (mixnet) for metadata protection
πŸ”’ Zero-Knowledge Server cannot decrypt your messagesβ€”ever
🌐 Client-Side Crypto All encryption happens in YOUR browser
πŸ›‘οΈ Military-Grade RSA-4096 + AES-256-GCM hybrid encryption
πŸ”‘ Key Protection Private keys never leave your device
⚑ Real-Time Instant secure messaging via WebSocket
🎭 Traffic Resistance Random delays + fixed-size packets defeat analysis
🎚️ Configurable Choose Direct (fast) or Anonymous (3-hop) routing

πŸ—οΈ Architecture

flowchart TB
    subgraph CLIENT ["πŸ–₯️ Client Browser"]
        A[React Frontend] --> B[Web Crypto API]
        B --> C[Onion Encryption]
    end
    
    subgraph BACKEND ["βš™οΈ Backend Server"]
        D[Express Gateway] --> E[Auth Service]
        D --> F[Message Router]
    end
    
    subgraph PHANTOM ["πŸ‘» Phantom Network"]
        G[Node A] --> H[Node B]
        H --> I[Node C]
    end
    
    subgraph ORCH ["πŸŽ›οΈ Orchestrator"]
        J[K8s-Lite]
        K[Docker Manager]
        L[Health Monitor]
    end
    
    subgraph STORAGE ["πŸ’Ύ Storage"]
        M[(VedDB)]
    end
    
    CLIENT -->|"πŸ” Encrypted"| BACKEND
    BACKEND -->|"πŸ“¦ Onion Packet"| PHANTOM
    PHANTOM -->|"βœ… Delivery"| BACKEND
    PHANTOM <-->|"πŸ”§ Manage"| ORCH
    BACKEND --> STORAGE
    
    style CLIENT fill:#2d3748,stroke:#4fd1c5,color:#fff
    style BACKEND fill:#2d3748,stroke:#f6ad55,color:#fff
    style PHANTOM fill:#1a1a2e,stroke:#a855f7,color:#fff
    style ORCH fill:#2d3748,stroke:#68d391,color:#fff
    style STORAGE fill:#2d3748,stroke:#63b3ed,color:#fff
Loading

πŸ§… Onion Routing Flow

sequenceDiagram
    participant Alice as πŸ‘€ Alice
    participant Backend as βš™οΈ Backend
    participant NodeA as πŸ”΅ Node A
    participant NodeB as 🟒 Node B
    participant NodeC as 🟣 Node C
    participant Bob as πŸ‘€ Bob

    Alice->>Alice: πŸ” Encrypt with Bob's key
    Alice->>Alice: πŸ§… Wrap in 3 onion layers
    Alice->>Backend: πŸ“€ Send encrypted packet
    Backend->>NodeA: πŸ“¦ Forward to entry node
    
    Note over NodeA: Peel Layer 1 πŸ”“
    NodeA->>NodeB: πŸ“¦ Forward encrypted
    
    Note over NodeB: Peel Layer 2 πŸ”“
    NodeB->>NodeC: πŸ“¦ Forward encrypted
    
    Note over NodeC: Peel Layer 3 πŸ”“
    NodeC->>Backend: βœ… Deliver to backend
    
    Backend->>Bob: πŸ“¬ Notify via WebSocket
    Bob->>Bob: πŸ”“ Decrypt with private key
Loading

πŸ” Encryption Layers

graph LR
    subgraph Message ["πŸ“ Original Message"]
        M[Hello Bob!]
    end
    
    subgraph L1 ["Layer 1 - AES-256-GCM"]
        E1[Encrypted Content]
    end
    
    subgraph L2 ["Layer 2 - Node C Key"]
        E2[🟣 Onion Layer]
    end
    
    subgraph L3 ["Layer 3 - Node B Key"]
        E3[🟒 Onion Layer]
    end
    
    subgraph L4 ["Layer 4 - Node A Key"]
        E4[πŸ”΅ Onion Layer]
    end
    
    M --> L1 --> L2 --> L3 --> L4
    
    style Message fill:#10b981,stroke:#059669,color:#fff
    style L1 fill:#3b82f6,stroke:#2563eb,color:#fff
    style L2 fill:#8b5cf6,stroke:#7c3aed,color:#fff
    style L3 fill:#22c55e,stroke:#16a34a,color:#fff
    style L4 fill:#3b82f6,stroke:#2563eb,color:#fff
Loading

πŸ› οΈ Technology Stack

Layer Technologies
Frontend React TypeScript Vite Tailwind
Backend Node.js Express TypeScript
Infrastructure Python Docker
Storage VedDB
Protocols REST WebSocket Onion Routing Hybrid Encryption

πŸš€ Quick Start

Prerequisites

βœ“ Node.js v18+
βœ“ Python 3.10+
βœ“ Docker Desktop
βœ“ VedDB Server

Installation

# 1️⃣ Clone the repository
git clone https://github.com/your-username/phantom-net.git
cd phantom-net

# 2️⃣ Install dependencies
cd backend && npm install
cd ../frontend && npm install

# 3️⃣ Start VedDB
cd orch/veddb-server && cargo run --release

# 4️⃣ Start Orchestrator
cd ../k8s-lite && python run-local.py

# 5️⃣ Start Backend
cd ../../backend && npm run dev

# 6️⃣ Start Frontend
cd ../frontend && npm run dev

🌐 Access Points

Service URL
πŸ–₯️ Frontend http://localhost:5173
βš™οΈ Backend API http://localhost:3000
πŸŽ›οΈ Orchestrator http://localhost:5000
πŸ’Ύ VedDB 127.0.0.1:50051

πŸ“ Project Structure

phantom-net/
β”œβ”€β”€ 🎨 frontend/                 # React Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/         # UI Components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ’¬ messages/    # Chat interface
β”‚   β”‚   β”‚   └── πŸ” auth/        # Authentication
β”‚   β”‚   β”œβ”€β”€ services/           # Crypto & API
β”‚   β”‚   └── pages/              # Route pages
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ βš™οΈ backend/                  # Express Server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ services/           # Gateway, Encryption
β”‚   β”‚   β”œβ”€β”€ routes/             # API endpoints
β”‚   β”‚   └── middleware/         # Auth, Rate limiting
β”‚   └── package.json
β”‚
β”œβ”€β”€ πŸŽ›οΈ orch/                     # Infrastructure
β”‚   β”œβ”€β”€ k8s-lite/               # Python Orchestrator
β”‚   β”‚   └── control-plane/      # Flask API
β”‚   β”œβ”€β”€ phantom-node-js/        # Relay Nodes
β”‚   β”‚   β”œβ”€β”€ server.js           # Node logic
β”‚   β”‚   └── Dockerfile          # Container
β”‚   └── veddb-server/           # Rust Database
β”‚
└── πŸ“– README.md

πŸ”’ Security Deep Dive

Cryptographic Design

graph TD
    subgraph KeyGen ["πŸ”‘ Key Generation"]
        A[Generate RSA-4096 Keypair] --> B[Mark Private Non-Extractable]
        B --> C[Store Public on Server]
    end
    
    subgraph Encrypt ["πŸ” Message Encryption"]
        D[Generate Random AES-256 Key] --> E[Encrypt Message with AES-GCM]
        E --> F[Encrypt AES Key with RSA-OAEP]
        F --> G[Create Encrypted Bundle]
    end
    
    subgraph Onion ["πŸ§… Onion Wrapping"]
        H[Get Node Public Keys] --> I[Encrypt for Node C]
        I --> J[Encrypt for Node B]
        J --> K[Encrypt for Node A]
    end
    
    KeyGen --> Encrypt --> Onion
    
    style KeyGen fill:#3b82f6,stroke:#2563eb,color:#fff
    style Encrypt fill:#10b981,stroke:#059669,color:#fff
    style Onion fill:#8b5cf6,stroke:#7c3aed,color:#fff
Loading

Threat Model

βœ… Protected Against ❌ Not Protected (MVP)
Server Compromise Client Malware
Database Leaks Physical Device Theft
Man-in-the-Middle Social Engineering
Message Tampering Quantum Attacks
Traffic Analysis Keystroke Logging

πŸŽ›οΈ Phantom Network Stats

pie title Network Distribution
    "Node A (Entry)" : 33
    "Node B (Middle)" : 34
    "Node C (Exit)" : 33
Loading

πŸ§ͺ Testing

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# E2E routing test
npm run test:e2e

πŸ“¦ Deployment Checklist

  • πŸ” Configure HTTPS (required)
  • πŸ”‘ Set strong JWT_SECRET
  • πŸ’Ύ Configure VedDB persistence
  • πŸ“Š Set up monitoring
  • ⚑ Enable rate limiting
  • 🌐 Configure production CORS
  • πŸ›‘οΈ Run security audit

🀝 Contributing

gitGraph
    commit id: "Fork"
    branch feature
    commit id: "Create Branch"
    commit id: "Make Changes"
    commit id: "Add Tests"
    checkout main
    merge feature id: "Pull Request"
    commit id: "Merged! πŸŽ‰"
Loading
  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

πŸ“œ License

MIT License - See LICENSE for details.


🌟 Star this repo if you believe in privacy! 🌟

Built with πŸ’œ and cryptographic paranoia

GitHub stars

About

Practically Unbreakable Secure Data Transfer System Which Becomes Mathematically More Secure with scaling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages