Skip to content

Phantomojo/GhostWire-secure-mesh-communication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

167 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
GhostWire Logo

GhostWire

An open protocol for resilient peer-to-peer communication.

Version License: AGPL-3.0 Commercial License Status Tech Stack First Ping GitHub stars

GCD4F 2026 Submission | Learn More β†’


What Is GhostWire?

GhostWire is a decentralized networking protocol β€” not an app. It provides the cryptographic, routing, and transport layers that developers can build communication tools on top of.

The reference implementation is written in Rust and includes a working mesh node with encrypted messaging, AI-powered routing, post-quantum cryptography, and delay-tolerant networking.

Built for: Disaster responders, rural communities, privacy advocates, researchers, and anyone who needs communication that works regardless of the odds.


Protocol Stack

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  APPLICATION:  Messaging β”‚ Knowledge Ark β”‚ Ghost Channelsβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  API:          REST (Axum) β”‚ WebSocket β”‚ CLI β”‚ TUI       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  SERVICES:     BlockStore β”‚ Mailbox β”‚ Social β”‚ Sphinx    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  AI ROUTING:   LightGBM β†’ Gemma 4 β†’ GNN β†’ PRoPHET       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  CRYPTO:       XChaCha20-Poly1305 β”‚ X25519 β”‚ ML-KEM-768  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  TRANSPORTS:   StealthTCP β”‚ WebRTC β”‚ BLE β”‚ LoRa β”‚ obfs4  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  MESH:         libp2p GossipSub β”‚ Kademlia DHT β”‚ DTN     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Full specification: docs/spec/PROTOCOL.md


Key Capabilities

Capability Description
πŸ›‘οΈ Encrypted P2P XChaCha20-Poly1305 E2E encryption with X25519 key exchange and forward secrecy ratchet
🌐 Serverless Mesh Pure P2P via libp2p β€” no central point of failure, no cloud dependency
πŸ€– AI Routing 4-layer ML stack (LightGBM β†’ Gemma 4 β†’ GNN β†’ PRoPHET) for optimal path selection
πŸ“‘ Delay-Tolerant PRoPHET epidemic routing β€” messages survive network partitions via store-carry-forward
πŸ”’ Post-Quantum ML-KEM-768 (Kyber-768) hybrid key exchange β€” defends against harvest-now-decrypt-later
🎭 Anonymous Routing Sphinx onion routing (same protocol as Nym and Lightning Network) with SURBs
πŸ“Ά Multi-Transport TCP, WebRTC, Bluetooth LE, LoRa, Reticulum β€” auto-failover based on conditions
πŸ›‘οΈ Censorship Resistance 4 pluggable transport modes (WebSocket, Shadowsocks, TLS, obfs4) with traffic armor
🚨 Coercion Resistance Duress PIN, panic wipe, dead man's switch β€” protection against physical coercion
🧠 Web of Trust TOFU key pinning with signed attestations and computed trust scores
πŸ“š Knowledge Ark Decentralized knowledge commons β€” share code, docs, datasets across the mesh
πŸ”— Protocol Bridges Interoperability with Matrix, Meshtastic, Briar, Reticulum networks

Quick Start

Build & Run

git clone https://github.com/Phantomojo/GhostWire-secure-mesh-communication.git
cd GhostWire-secure-mesh-communication/ghostwire
cargo run --release

The node starts on http://127.0.0.1:8080. Mesh networking activates with --mesh-port.

Interactive TUI

cargo run --release -- tui

Terminal interface with dashboard, peer list, message history, and compose β€” all in one screen.

Key Action
Tab Switch tabs
i Compose message
q Quit

Full installation guide: docs/INSTALL.md


Build on GhostWire

GhostWire is a protocol, not just an application. You can build on it in three ways:

1. Use the Rust Library

[dependencies]
ghostwire = { git = "https://github.com/Phantomojo/GhostWire-secure-mesh-communication.git" }

2. Use the REST API

Start a GhostWire node, then interact via HTTP/WebSocket from any language.

3. Implement the Protocol

Follow the specifications in docs/spec/ to build your own implementation in any language.

Developer guide: docs/build/OVERVIEW.md


Published Crates

Crate Description Status
sphinx-rs Sphinx onion routing with SURBs βœ… 0.1.0 on crates.io
ghostwire-dtn Delay-tolerant networking (PRoPHET) 🚧 Next
hlc-rs Hybrid Logical Clocks 🚧 Planned
trust-store Web of Trust + TOFU 🚧 Planned

πŸ†š GhostWire vs Other Protocols

Feature GhostWire libp2p Matrix Nostr I2P
P2P mesh networking βœ… βœ… ❌ ❌ βœ…
Built-in encryption βœ… βœ… βœ… βœ… βœ…
Anonymous routing βœ… ❌ ❌ ❌ βœ…
Delay-tolerant networking βœ… ❌ ❌ ❌ ❌
AI-powered routing βœ… ❌ ❌ ❌ ❌
Post-quantum crypto βœ… ❌ ❌ ❌ ❌
Multi-transport βœ… βœ… ❌ ❌ βœ…
Offline messaging βœ… ❌ βœ… ❌ ❌
Censorship resistance βœ… ❌ ❌ ❌ βœ…
Coercion resistance βœ… ❌ ❌ ❌ ❌

GhostWire is most similar to libp2p (modular P2P stack) and I2P (anonymous network layer), with unique additions in AI routing, delay-tolerant networking, and post-quantum cryptography.


πŸ—οΈ Architecture

graph TD;
  subgraph "User Interface"
    WebUI["React Web Interface"]
    CLI["Rust Command-Line Interface"]
    TUI["Terminal User Interface"]
  end

  subgraph "GhostWire Core (Rust)"
    Core["Core Manager"]
    Identity["Identity Manager"]
    Kademlia["DHT / Kademlia (libp2p)"]
    Swarm["Swarm Controller (libp2p)"]
    Security["Security Manager"]
    Transport["Adaptive Transport System"]
  end

  subgraph "Network Layer"
    TCP["Stealth TCP"]
    WebRTC["WebRTC (P2P)"]
    LoRa["LoRa (Long Range)"]
    BT["Bluetooth LE"]
  end

  subgraph "Protocol Bridges"
    Briar["Briar Adapter"]
    Meshtastic["Meshtastic Adapter"]
    Matrix["Matrix Bridge"]
  end

  WebUI <-->|REST / WebSocket| Core
  CLI <-->|Direct API| Core
  TUI <-->|Direct API| Core

  Core <--> Identity
  Core <--> Kademlia
  Core <--> Swarm
  Core <--> Security

  Swarm <--> Transport
  Transport <--> TCP
  Transport <--> WebRTC
  Transport <--> LoRa
  Transport <--> BT

  Core <--> Briar
  Core <--> Meshtastic
  Core <--> Matrix
Loading

Deep dive: docs/ARCHITECTURE.md


πŸ“š Documentation

Guide Description
πŸ“‹ Protocol Spec Formal protocol specification (like NIPs / Matrix Spec)
πŸ—οΈ Architecture System internals and design decisions
πŸ› οΈ Installation Detailed setup for various platforms
πŸ”’ Security Security model and vulnerability disclosure
πŸ“‘ First Ping First cross-machine mesh communication record
πŸ€– AI Integration Gemma 4 and AI routing setup
πŸ”§ Build Instructions Compilation and development guide
πŸ—οΈ Build on GhostWire How to build applications on the protocol
πŸ“œ Governance Protocol evolution process (GIPs)
πŸ“‹ Wiki Full project knowledge base

πŸ† Competition

GCD4F 2026

GhostWire is submitted to the Global Competition on Design for Futures (GCD4F) 2026, organized by Beijing Normal University and UNESCO IITE.

Detail Information
Track Higher Education β€” AI for Society
Team Team GhostWire
Institution Open University of Kenya
Theme AI for Society
SDG Alignment SDG 9 (Infrastructure), SDG 11 (Communities), SDG 17 (Partnerships)

🀝 Contributing

We welcome contributors across all layers of the protocol:

Get Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Ways to Contribute

  • πŸ¦€ Rust β€” libp2p networking, transport layers, crypto, AI routing
  • 🐍 Python β€” ML model training, data pipelines, GNN optimization
  • 🌐 TypeScript/React β€” Web UI, dashboard, visualization
  • πŸ“– Documentation β€” Protocol specs, guides, translations
  • πŸ§ͺ Testing β€” Write tests, report issues, penetration testing
  • πŸ”’ Security β€” Cryptographic analysis, threat modeling, audits
  • πŸŒ‰ Bridges β€” Matrix, Meshtastic, Briar, Reticulum adapters

Guidelines: CONTRIBUTING.md | Code of Conduct


πŸ“œ Licensing

GhostWire is dual-licensed:

License Use Case Cost
πŸ†“ AGPL-3.0-or-later Personal, Research, Education, Open Source Free
🏒 Commercial License Proprietary Products, SaaS, Closed-Source Contact for pricing

Library crates (sphinx-rs, ghostwire-dtn, etc.) are licensed under MIT + Apache-2.0 for permissive use.

Which License Do I Need?

Your Use Case License
Personal projects βœ… AGPL-3.0 (free)
University research βœ… AGPL-3.0 (free)
Open source projects βœ… AGPL-3.0 (free)
Using library crates βœ… MIT + Apache-2.0 (free)
Proprietary products 🏒 Commercial
SaaS without source disclosure 🏒 Commercial

Commercial inquiries: mirungu015@proton.me

Full terms: LICENSE | COMMERCIAL_LICENSE.md | LICENSE_EXPLANATION.md


πŸ‘₯ Team

Team GhostWire β€” Open University of Kenya, Nairobi

Name Role Contact
Michael Irungu Muriithi Team Lead, Protocol Architecture mirungu015@proton.me

Advisors & Contributors:

  • Frank β€” Technical Advisor
  • Austin β€” Hardware Lead (Mechatronics)

πŸ“ž Community & Support

Get Help

Stay Updated

  • ⭐ Star this repo to get release notifications
  • πŸ”” Watch for major updates

Security


πŸ† Roadmap

βœ… Completed

  • P2P mesh networking β€” libp2p GossipSub + Kademlia DHT
  • End-to-end encryption β€” XChaCha20-Poly1305 with X25519
  • Forward secrecy β€” Symmetric ratchet
  • AI routing β€” LightGBM + PRoPHET fallback (4-layer system)
  • Terminal UI β€” Ratatui dashboard
  • Web API β€” Axum HTTP server
  • Anomaly detection β€” Isolation Forest
  • Shamir recovery β€” Secret sharing for key recovery
  • First cross-machine ping β€” April 5, 2026
  • Protocol specifications β€” Formal specs in docs/spec/
  • Sphinx onion routing β€” Published as sphinx-rs crate

πŸ”„ In Progress

  • Message persistence and history
  • Full Double Ratchet with DH steps
  • GNN routing optimization (target: 85%+ accuracy)
  • Mobile clients (Tauri Android/iOS)
  • ghostwire-dtn crate publication

πŸ“‹ Planned

  • Voice over mesh (VoIP)
  • LoRa/Reticulum bridge (production)
  • Protocol adapters (Matrix, Meshtastic, Briar)
  • Knowledge Ark β€” offline content serving
  • Zero-knowledge proofs
  • Third-party security audit

🌟 Built for connection. Designed for resilience.

GhostWire β€” An open protocol for resilient peer-to-peer communication.

GhostWire Logo

πŸ“ Nairobi, Kenya | 🌐 Website | πŸ“§ mirungu015@proton.me


Licensed under AGPL-3.0-or-later or Commercial License

GCD4F 2026 Submission β€” Global Competition on Design for Futures

About

Decentralized encrypted mesh networking in Rust. P2P messaging with no servers, no cloud, no middlemen. Works offline.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors