Technical Deep Dive · v1.5

How encryption survives offline

The cryptography, mesh protocol, and hybrid transport that keep the same end-to-end guarantees whether you're on the network or in a Bluetooth-only room. Shipping today on iOS 17+ and macOS 14+, written end-to-end in Swift.

🔐 End-to-end encryption

Every direct message, group message, post, and comment is encrypted on the sender's device. The server, relay nodes, and any device in between only ever see opaque ciphertext.

X25519 ECDH AES-256-GCM Ed25519 HMAC-SHA-256 HKDF SQLCipher (AES-256)

📡 Bluetooth-LE mesh protocol

Raven turns every device into both a BLE peripheral and a BLE central simultaneously. Encrypted message frames hop from device to device, store-and-forward, until they reach the recipient — no router, no cell tower, no internet required.

CoreBluetooth BLE 5.0 Spray-and-Wait TTL · 5 hops SHA-256 dedup Anti-replay

🌐 Hybrid delivery — three modes, one envelope

The on-device router picks the cheapest delivery path that's actually working. The decision logic is local — no cloud lookups, no pre-flight checks.

📦 MeshEnvelope — the universal message format

Every payload travels in the same envelope, regardless of transport. The wrapper carries just enough routing metadata for the network to do its job — and not a byte more.

MeshEnvelope {
  id:           SHA-256 hash         // dedup + content addressing
  sender_id:    Hash(device_pubkey)  // anonymised identity
  recipient_id: Hash(target_pubkey)  // routing target
  payload:      AES-256-GCM(blob)    // opaque ciphertext
  signature:    Ed25519(envelope)    // origin authentication
  hmac:         HMAC-SHA-256         // integrity (cheap drop)
  ttl:          uint8                // hops remaining (default 5)
  timestamp:    ISO-8601 UTC         // anti-replay window
  nonce:        uint64 random        // per-message uniqueness
  route_type:   online | direct | bridge
}

⚡ Server architecture

The server is a thin relay — a stateless FastAPI service that accepts encrypted envelopes, fans them out via WebSocket and APNs, and parks them in PostgreSQL for offline pickup. Cost-wise it scales to zero when nobody's chatting.

Python 3.11 FastAPI WebSocket PostgreSQL 15 Cloud Run APNs HTTP/2

🍎 One Swift codebase, two native binaries

Raven runs natively on iOS 17+ and macOS 14+ — same Swift sources, same business logic, same crypto. We use Mac Catalyst with platform-specific shells so the Mac build feels native to macOS 26 (Liquid Glass UI, capsule sidebar, ⌘-shortcuts) without forking the codebase.

Swift 5.10 SwiftUI Catalyst CoreBluetooth Multipeer Connectivity Foundation Models

🧠 On-device intelligence

Smart features run locally — no prompts ever leave the device.

Foundation Models Apple Translation SFSpeechRecognizer

📊 How Raven compares

Raven sits at the intersection of mainstream encrypted messengers and offline-first mesh apps.

Feature Raven Signal WhatsApp Briar
End-to-end encryption
Works fully offline (mesh)
Works online (server-routed)
Hybrid auto-failover
Multi-hop store-and-forward
Live audio rooms limited
Decentralised social feed forums
No phone number required
Native iOS & macOS apps

🎯 Threat model — what Raven defends against

Out of scope: a sophisticated attacker with persistent access to the unlocked device, or one capable of compromising Apple's Secure Enclave. We document the boundary honestly rather than overpromise.

👨‍💻 Architected & built by Ahmadreza

Raven is independently designed and built — every line of crypto, mesh routing, server code, and UI ships from one author. Source isn't public, but the security-critical parts are available for review under NDA to vetted security researchers and serious partners.

Reach out →

Want to audit it?

Security researchers and review partners can request access to the cryptography and mesh protocol sources. We'd rather you check than take our word for it.

Request review access Download for iOS