Problem #1067
Sbauermaner
started this conversation in
General
Problem
#1067
Replies: 1 comment
|
There is some work with connecting bitchat and an external long range mesh network to increase reliability and resilience at Where the author talks about his success in connecting bitchat to meshcore (similar to meshtastic) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
BitChat currently works well in dense urban areas where many users have the app installed. However, the network dies wherever user density drops. A single user in a city cannot receive messages if there's no chain of BitChat nodes around them — even if millions of phones with Bluetooth are physically present.
Proposed Architecture
Four layers working together as one system:
The Key Insight
Layers 1, 2, and 3 already exist in BitChat or in compatible open source projects. The missing piece is Layer 4 — an always-on background relay that turns every installed device into an automatic node without the user actively opening the app.
This is architecturally similar to how Apple's Find My works — every device passively participates in relaying packets using a registered BLE UUID, without user interaction.
Prior Art — COVID Exposure Notifications
This architecture has already been proven at global scale. During COVID-19, Apple and Google implemented the Exposure Notifications system which:
0xFD6F) at OS levelThe technical mechanism is identical to what Layer 4 proposes. The difference:
COVID EN | BitChat Layer 4 -- | -- Centralized — tokens sent to Apple/Google servers | Decentralized — packets relayed peer to peer Single purpose — exposure detection | General purpose — message relay Built into OS by Apple/Google | Implemented as always-on foreground service Requires OS partnership | Works with public BLE API available to any appThe COVID system proved that BLE-based passive relay works reliably on billions of devices simultaneously. BitChat can achieve the same relay behaviour using the same public BLE APIs — without requiring OS-level integration.
Implementation Suggestion for Layer 4 (Android)
Result
Once critical mass is reached in a region — the network becomes impossible to shut down without physically removing every device. No servers. No central point of failure. Works during protests, blackouts, natural disasters.
The four layers together mean:
Known Vulnerability — Timing Attack & Physical Triangulation
This architecture has a fundamental privacy weakness that must be acknowledged.
The problem:
Any party that controls multiple nodes in the network can measure latency between hops and calculate physical distance between devices. With three controlled nodes — full triangulation of a user's physical location is possible. No encryption is broken. No messages are read. Just timing.
This means:
For a journalist at a protest — authorities don't need to read messages. They only need to know the journalist was there. Timing metadata is enough.
Tor partially solves this by adding artificial delays and onion routing — but only for the internet layer (Layer 3). The local BLE mesh (Layer 1) remains fully exposed to this attack.
Proposed mitigations:
This vulnerability is not unique to BitChat — it exists in every mesh protocol including Meshtastic, goTenna, and others. But it must be documented and mitigated especially for high-risk users.
References
Problem Statement
While Issue #1063 proposes a comprehensive four-layer mesh architecture (BLE + LoRa + Tor + Nostr), it does not adequately address a critical security vulnerability: the passive background relay infrastructure (Layer 4) creates an invisible command-and-control network that can be exploited for weapon guidance, military coordination, and kinetic operations — regardless of encryption.
This is fundamentally different from the timing/triangulation vulnerabilities discussed in #1063, which assume adversaries trying to locate users. This threat assumes adversaries using the network itself as a weapon delivery mechanism.
The Vulnerability
Scenario 1: UAV/Drone Correction Data
Attacker maintains UAV with targeting computer
→ Computes trajectory & initial coordinates offline
→ Encodes correction vector in single BitChat packet
→ Broadcasts via compromised/friendly nodes in Layer 1/4
→ Packet propagates through millions of devices seamlessly
→ UAV receives update, corrects trajectory, eliminates target
→ No internet required, no central server, no forensic trail
→ YOUR DEVICE relayed the packet. YOU didn't know.
Scenario 2: Synchronized Military Action
Adversary needs to coordinate 5 simultaneous attacks across city
→ Encodes launch timestamps in 5 separate BitChat packets
→ Each packet targets different geographic cluster via Layer 4
→ All packets arrive within milliseconds due to mesh propagation
→ Synchronized operation executes
→ Investigators trace packet origins — land on random civilian devices
Scenario 3: Rocket/Artillery Adjustment
Forward observer uses BitChat to send correction data to artillery unit
→ Data: "Target grid 12A, adjust -100m north, elevation +15m"
→ Packet relayed through civilian population via Layer 4
→ Artillery adjusts, fires
→ Impact. Casualty count increases.
→ Every relay node's owner becomes technically complicit
Why This Matters More Than #1063 Timing Attack
#1063 identifies that message content is encrypted but physical presence can be triangulated. This is a privacy loss for individuals.
Layer 4 weaponization is worse: your device becomes active infrastructure for lethal operations without your consent, knowledge, or ability to refuse.
Key difference:
Why Layer 4 Design Enables This
The proposal states: "No storage, no logging, pure relay"
This design choice — intended for privacy — makes weaponization trivial:
An attacker doesn't need to compromise millions of devices. They need to compromise or control one node per geographic cluster, then Layer 4 broadcasts to everyone.
Compounding Factors
Factor 1: Critical Mass in Conflict Zones
The architecture is most useful exactly where it's most dangerous:
These are precisely regions where armed groups operate.
Factor 2: Weak Signal Validation
The proposal mentions "hop counter < MAX_HOPS → rebroadcast and forget". This is:
Any packet that fits the protocol gets relayed.
Factor 3: Collective Liability
If BitChat becomes proven weapon delivery mechanism:
Real-World Precedent
During the Ukraine-Russia conflict:
BitChat with Layer 4 is orders of magnitude more vulnerable because:
Proposed Mitigations
These are not silver bullets — they're harm-reduction measures:
// Instead of: "pure relay, no storage"
// Implement: "one-way chain of custody"
// Each relay adds a probabilistic fingerprint
val outgoingPacket = incomingPacket.copy(
hopCount = incomingPacket.hopCount + 1,
// Hash of device's permanent-but-anonymous ID
// Prevents rebroadcasting from obvious source
relayFingerprint = HMAC_SHA256(DEVICE_SECRET, incomingPacket)
)
// This doesn't identify the relay node
// But it prevents the same device from relaying the same packet twice
// Making triangulation of packet flow possible (with warrant)
// Detect patterns common to weapon guidance (not content, just meta):
// A) Geospatial concentration
// If 100 copies of same packet in <1km radius in <10ms window
// → Likely targeting, not messaging
// B) Timing coordination
// If multiple distinct packets with synchronized timestamps
// → Likely coordinated action
// C) Repetition with variants
// If same packet re-sent with single-byte modifications
// → Likely targeting adjustment/correction
// Heuristic: if match >2 criteria, lower relay priority or drop
// Layer 4 opt-in must explicitly state:
"⚠️ WARNING: By enabling Background Relay, your device will:
✓ Transmit encrypted messages for unknown users
✓ Propagate data packets through BLE mesh
✓ Operate in background even if BitChat app is closed
🚔 LEGAL: In conflict zones or regions with active military operations,
relaying packets could constitute:
📊 PRACTICAL: Your device could be relaying:
I understand the risks and enable anyway: [YES / NO]"
// On launch, check device location:
val conflictZones = listOf(
GeoBox(lat1, lon1, lat2, lon2), // Ukraine border
GeoBox(...), // Taiwan strait
GeoBox(...), // Gaza
// ... detected programmatically from news APIs
)
if (deviceLocation in conflictZones) {
showDialog("Layer 4 Background Relay disabled in conflict zones\n" +
"This is to prevent weaponization of civilian infrastructure")
layer4.disable()
}
// Each packet relayed is implicitly signed with user's consent
val consentCommitment = HMAC_SHA256(USER_SECRET + TIMESTAMP + "CONSENT")
// Server (if any) can verify:
// - This device was aware of risks
// - At this timestamp
// - And relayed packet anyway
// Doesn't prevent weaponization, but creates liability trail
What This Issue Does NOT Propose
❌ Does not propose banning Layer 4 — decentralized infrastructure has legitimate uses
❌ Does not propose removing encryption — privacy is essential
❌ Does not propose device tracking — that defeats the purpose
❌ Does not propose content inspection — violates end-to-end encryption principle
What This Issue DOES Require
✅ Honest threat modeling — Layer 4 enables weapon delivery systems
✅ Informed consent — users must understand they're part of potential military infrastructure
✅ Heuristic detection — filter packets with targeting/coordination signatures
✅ Jurisdiction awareness — disable in active conflict zones
✅ Audit capability — with warrant, law enforcement should be able to prove packet flow (not content)
Questions for Maintainers
References
All reactions