How GuardianMesh Works

GuardianMesh is a distributed relay fabric with end-to-end encryption, seven transport types, and multi-guardian federation. Messages are encrypted before they leave your device and can travel over any available path — internet, Bluetooth, satellite, or physical media.

Message Path (WebSocket Relay)

The primary relay path uses authenticated WebSocket connections to guardian nodes:

  1. Client encrypts the message with the Double Ratchet (forward secrecy per message), signs the DTN bundle with Ed25519, and sends it to a guardian endpoint over an authenticated WebSocket session (Noise XX handshake).
  2. If destination is online, guardian delivers directly and returns delivered.
  3. If destination is offline, guardian stores bundle with expiresAtMs and returns stored.
  4. Federated guardians exchange registry and bloom-filter hints, forwarding bundles when beneficial.
  5. When destination reconnects, bundle is delivered and pending state is cleared.

This is the most common path, but not the only one. GuardianMesh supports seven transport types that can all carry the same encrypted bundles.

End-to-End Encryption

All messages are end-to-end encrypted before leaving the sender's device. No relay, guardian, or intermediary can read message content.

Session Establishment (X3DH)

Sessions are established using the Extended Triple Diffie-Hellman protocol with four DH operations:

The shared secret is derived via HKDF-SHA256. No trusted third party is involved.

Per-Message Encryption (Double Ratchet)

Group Messaging (MLS RFC 9420)

Group conversations use Messaging Layer Security with TreeKEM for O(log n) key updates. Epoch-based transitions provide forward secrecy for groups. Credentials are Ed25519-signed and validated on every KeyPackage.

Transport Types

GuardianMesh supports seven transport types plus gateway adapters. The adaptive transport scorer selects the best available path automatically.

Guardian (WebSocket Relay)

Primary transport. Clients connect to guardian relay nodes via Noise XX authenticated WebSocket sessions. Bundles are stored with configurable TTL and forwarded across federated guardians. Noise cipher suite: Noise_XX_25519_AESGCM_SHA256.

BLE Mesh

Bluetooth Low Energy mesh networking for device-to-device communication without internet. Key capabilities:

WebRTC

Direct peer-to-peer communication via WebRTC data channels. ICE candidate negotiation through the signaling server, with STUN for NAT traversal. No relay needed when peers can reach each other directly.

Tor

Anonymous transport via SOCKS5 proxy with full circuit management. Supports onion service operation for receiving connections. Circuit lifecycle tracking (building, open, closed, failed) with automatic renewal. Traffic obfuscation via obfs4 and meek pluggable transports.

LAN Discovery

Local network peer discovery via mDNS Zeroconf. Publishes and discovers peers using _ratchet._tcp and _guardian-mesh._tcp service types. Zero-config setup for same-network communication.

Satellite

Gateway adapter for satellite uplink and downlink. Broadcast-based delivery suitable for one-to-many distribution in remote areas without terrestrial infrastructure.

Sneakernet

Physical media transfer for fully offline scenarios. Bundles are encoded as QR codes (FN2 format with HMAC-SHA256 integrity verification) or exported as JSON files for USB/SD card transfer. Multi-QR chunking supports payloads larger than a single QR code.

Radio Gateway

HF and VHF radio transceiver gateway for long-range communication without any network infrastructure. Adapts the standard Transport interface to radio hardware.

Privacy and Anti-Surveillance

GuardianMesh includes multiple layers of protection against traffic analysis and surveillance:

Trust and Discovery

Guardians announce using Ed25519-signed payloads, and the directory verifies the signature and identity hash binding (identityHash = SHA-256(Ed25519_publicKey)). Public network views consume privacy-safe API projections at region level by default.

A web-of-trust system with 6 trust levels (Unknown, FirstContact, UnverifiedKnown, Extended, Indirect, Direct) allows users to verify peer identities without a central authority. Key rotation uses cryptographic rotation certificates where the old key signs the transition to a new key.

Federation

Guardian nodes form a federated relay network:

Routing Guarantees