π End-to-end encrypted β’ ποΈβπ¨οΈ Anonymous routing β’ π‘οΈ Zero-knowledge architecture
Your messages. Your privacy. Period.
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." β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| 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 |
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
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
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
| Layer | Technologies |
|---|---|
| Frontend | |
| Backend | |
| Infrastructure | |
| Storage | |
| Protocols | REST WebSocket Onion Routing Hybrid Encryption |
β Node.js v18+
β Python 3.10+
β Docker Desktop
β VedDB Server# 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| Service | URL |
|---|---|
| π₯οΈ Frontend | http://localhost:5173 |
| βοΈ Backend API | http://localhost:3000 |
| ποΈ Orchestrator | http://localhost:5000 |
| πΎ VedDB | 127.0.0.1:50051 |
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
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
| β 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 |
pie title Network Distribution
"Node A (Entry)" : 33
"Node B (Middle)" : 34
"Node C (Exit)" : 33
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# E2E routing test
npm run test:e2e- π Configure HTTPS (required)
- π Set strong JWT_SECRET
- πΎ Configure VedDB persistence
- π Set up monitoring
- β‘ Enable rate limiting
- π Configure production CORS
- π‘οΈ Run security audit
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! π"
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - See LICENSE for details.