Security Policy & Cryptography
Detailed disclosure of BitChat's cryptographic primitives, mutual Noise XX handshake, threat model, known limitations, and private vulnerability reporting process.
Verified Security Foundation
Noise XX Handshake
Provides mutual peer authentication without relying on certificate authorities, public key infrastructures (PKI), or central key servers.
Forward Secrecy
Ephemeral Curve25519 (X25519) keypairs are negotiated per connection. Session encryption keys reside exclusively in volatile process memory and are zeroed upon session termination.
Authenticated Encryption
Payloads are protected with 256-bit ChaCha20 authenticated with Poly1305 MACs (AEAD). Payloads modified in transit are rejected before application dispatch.
Noise XX Mutual Authentication Flow
How two nodes mutually prove their identity and establish symmetric encryption keys across radio or LAN without transmitting long-term keys in plaintext.
Security Guarantees & Explicit Limitations
Threats Mitigated
- Authoritative Rust Noise XX & Zeroization: Direct peer sessions execute inside Rust
NativeNoiseSessionwithzeroize::ZeroizeOnDrop, zero eager Python session key copies, and fail-closedu32::MAXnonce exhaustion guards. - Strict Replay & AEAD Protection: 1,024-entry sliding replay window tracks every wire nonce including nonce
0, advancing strictly after ChaCha20-Poly1305 authentication tag verification succeeds. - Collision-Safe Identity & Trust Separation:
NativePeerStateEnginerejects colliding keys for both modern SHA-256 peer IDs and post-auth legacybitchat-tuipeer IDs, keepingobserved,authenticated, and user-confirmedverifiedtrust strictly separate. - Bounded DoS Defenses & No Central Servers: Pending DM queues are capped (32 per peer / 512 global), UDP discovery is rate-limited natively via
NativeIpRateLimiter, and no central servers or accounts exist.
Known Limitations & Non-Guarantees
- RF & Network Traffic Analysis: Physical radio observers can detect BLE transmission events and MAC addresses. LAN observers can inspect UDP discovery frames and unencrypted outer routing headers.
- Physical Device Compromise & OS Memory: Long-term identity keys in
~/.bitchat/identity.jsonrely on OS file permissions (0600on POSIX, user DACL on Windows) without on-disk passphrase encryption yet; Rustzeroizescrubs owned memory on drop but cannot guarantee erasure from OS swap or kernel crash dumps. - Authentication vs. Real-World Identity: Completing Noise XX proves cryptographic possession of a peer's static key (
authenticated), not real-world identity — out-of-band fingerprint verification (/verify) is required forverifiedtrust. - Broadcast Channels & Radio DoS: Public broadcast messages (
#public) are intentionally unencrypted for local mesh participants, and physical RF jamming cannot be prevented by software.
Reporting Security Vulnerabilities
We take reports of security vulnerabilities seriously and appreciate the assistance of the security research community.
Private Security Advisory Process
Please do not report security vulnerabilities through public GitHub issues, public discussion forums, or social media. Instead, use GitHub's private vulnerability reporting feature: