System Architecture
SecureChat uses a 3-layer architecture that separates identity, transport, and cryptography into independent, replaceable components. No single layer has access to all information.
Layer 1 — Kaspa Identity
Why Kaspa?
Traditional messengers use phone numbers or email as identity — both require a central authority. Kaspa's BlockDAG allows anchoring a public key once as a transaction, creating a decentralized, server-free identity that you own permanently.
- 10 blocks per second — fast enough for identity operations
- PoW security — same model as Bitcoin, no stake requirements
- Minimal fees — identity anchor costs fractions of a cent
- No smart contracts needed — simple UTXO transactions suffice
- Community run — no single company controls the network
Layer 2 — Transport
Ephemeral Relay Nodes
Inspired by SimpleX's SMP protocol. Message queues are unidirectional — the relay knows a queue exists but not who is communicating. Messages are deleted immediately after delivery. Relay operators are incentivized with KAS micropayments.
- No user accounts on relay — only anonymous queue IDs
- Separate queue IDs for each contact pair
- 2-hop onion routing hides both parties' IPs
- Anyone can run a relay — permissionless network
- Minimal server storage — messages gone after delivery
Layer 3 — Device Crypto
All crypto happens on your device
The relay never sees plaintext. The Kaspa chain never sees message content. All cryptographic operations use lazysodium (libsodium wrapper), the same library used by SecureCall and Chameleon — one audited stack across the entire StealthX platform.
- XChaCha20-Poly1305: 192-bit nonce eliminates IV reuse risk
- Double Ratchet: break-in recovery + forward secrecy
- Message padding to 256-byte blocks — prevents size analysis
- Keys generated on-device, stored in Android Keystore hardware
- STEALTH-DELETE wipes all keys and messages in under 1 second