Classification: Restricted SC-ARCH StealthX // SecureCall
Classification: Restricted · SC-ARCH

System Architecture Brief

System architecture: Rust crypto, WebRTC transport, WebSocket signaling.

Technical architecture overview of the SecureCall platform · Last updated April 2026

Component Inventory

Core Components

SecureCall is built from three tightly integrated components, each responsible for a distinct layer of the platform. The Android client handles all user-facing operations, the Rust crypto engine provides native-speed cryptographic primitives via JNI, and the Node.js signaling server coordinates call setup without ever touching media or plaintext content.

Component Technology Purpose
Android Client Kotlin / Java UI, audio capture, call management, security monitoring
Crypto Engine Rust (via JNI) XChaCha20-Poly1305, X25519, HKDF-SHA256, key management
Signaling Server Node.js / Express / WebSocket Connection establishment, key exchange relay

Application-frame cryptography executes inside the Rust native library. The signaling service coordinates call setup and is not designed to receive call plaintext. Voice media uses direct WebRTC when available and otherwise may traverse a TURN relay. A P-256 Android Keystore identity signs registration and both X25519 call transcripts before media starts.

Architecture Overview

System Diagram

The following diagram illustrates how the three components interact. The Android client contains four subsystems (UI, Audio Pipeline, Security Monitor, Network Manager) that communicate with the Rust crypto engine via JNI. The signaling server handles WebSocket-based call coordination and key exchange.

┌──────────────────────────────────────────────────────────┐
│                    Android Client                         │
│                                                          │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐ │
│  │    UI    │ │  Audio   │ │ Security │ │  Network   │ │
│  │  (MD3)  │ │ Pipeline │ │ Monitor  │ │  Manager   │ │
│  │         │ │          │ │          │ │            │ │
│  │ - Call  │ │ - Opus   │ │ - Screen │ │ - WebRTC   │ │
│  │ - Dial  │ │ - 48kHz  │ │ - Mic    │ │ - WebSocket│ │
│  │ - Cont. │ │ - AEC    │ │ - SpyApp │ │ - ICE/TURN │ │
│  │ - Sett. │ │ - AGC    │ │ - Focus  │ │ - DTLS     │ │
│  └────┬─────┘ └────┬─────┘ └────┬─────┘ └─────┬──────┘ │
│       └─────────────┴────────────┴───────────┘         │
│                          │ JNI                            │
│  ┌───────────────────────┴───────────────────────┐   │
│  │            Rust Crypto Engine (Native .so)          │   │
│  │  ┌──────────┐ ┌─────────┐ ┌────────┐ ┌─────────┐ │   │
│  │  │ XChaCha20│ │  X25519 │ │  HKDF  │ │ Per-call│ │   │
│  │  │ Poly1305 │ │  ECDH   │ │ SHA256 │ │   key   │ │   │
│  │  └──────────┘ └─────────┘ └────────┘ └─────────┘ │   │
│  └───────────────────────────────────────────────┘   │
└──────────────────────────┬───────────────────────────────┘
                          │ WSS (Signaling)
                          │ WebRTC (Media — P2P/TURN)
┌──────────────────────────┴───────────────────────────────┐
│               Signaling Server (Node.js)                  │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐  │
│  │ Session  │ │ Call     │ │   PKD    │ │   Rate     │  │
│  │ Registry │ │ Router   │ │ (Keys)   │ │  Limiter   │  │
│  └──────────┘ └──────────┘ └──────────┘ └────────────┘  │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐  │
│  │ Heartbeat│ │ Presence │ │   FCM    │ │  Validator │  │
│  │ Manager  │ │ Tracker  │ │ (Push)   │ │ (Input)    │  │
│  └──────────┘ └──────────┘ └──────────┘ └────────────┘  │
└──────────────────────────────────────────────────────────┘
Current boundary: The signaling service facilitates connection setup and is not designed to receive voice plaintext or private key material. Canonical sc-... identities are key-derived and call transcripts are signed. Alias, custom-ID and phone lookup remain server-resolved and require canonical-ID or security-code verification.
Directory Structure

Repository Layout

SecureCall is organized as a monorepo containing the Android client, Rust crypto engine, Node.js backend, documentation, website, and deployment infrastructure. The primary development directory is client_android/.

stealth/
├── client_android/          # Android app (Kotlin/Java)
│   └── app/src/main/java/com/securecall/app/
│       ├── CallActivity.java       # Main call screen
│       ├── MainActivity.java       # Entry point
│       ├── security/               # Security monitoring
│       │   ├── AudioFocusManager.kt
│       │   ├── ScreenRecordingDetector.kt
│       │   ├── MicrophoneMonitor.kt
│       │   ├── AccessibilityDetector.kt
│       │   ├── CallRecordingDetector.kt
│       │   ├── SecureCallMonitor.kt
│       │   └── SecurityEnforcer.kt
│       ├── config/                 # Tier-based feature flags
│       └── ui/                     # UI fragments
│
├── core_crypto/             # Rust crypto engine
│   └── src/
│       ├── lib.rs                  # Public API
│       ├── aead/                   # XChaCha20-Poly1305
│       ├── identity/               # Key pairs
│       ├── session/                # Session state
│       ├── hkdf/                   # Key derivation
│       └── ffi/                    # JNI bridge
│
├── backend/signaling/       # Node.js signaling server
│   └── src/
│       ├── server.js               # Main entry
│       ├── call_routing.js         # Call routing logic
│       ├── sessions.js             # Session management
│       ├── pkd.js                  # Public Key Directory
│       ├── rateLimit.js            # Rate limiting
│       └── validator.js            # Input validation
│
├── website/                 # Landing page (stealthx.tech)
├── docs/                    # Documentation
├── deploy/                  # Docker deployment
├── deployment/              # PM2 bare-metal deployment
├── marketing/               # Play Store listings
└── tools/                   # Build & test scripts
Data Flow Analysis

Communication Pathways

SecureCall uses three distinct communication pathways depending on the phase of a call. Understanding these data flows is essential for evaluating the security posture of the system.

Signaling (Call Setup)

Client A  →  WSS  →  Signaling Server  →  WSS  →  Client B

Media (Voice)

Client A  →  WebRTC (P2P, DTLS-SRTP)  →  Client B

TURN Relay (When P2P Fails)

Client A  →  TURN Server  →  Client B
Important: A TURN relay forwards encrypted media and is not sent private key material. Direct canonical identities are protected by signed transcripts; server-resolved aliases still require canonical-ID or security-code verification.
Build Configurations

Product Flavors

SecureCall ships in three product tiers, each compiled as a separate build flavor with distinct package names, feature flags, and capabilities. Feature gating is controlled via BuildConfig fields set in build.gradle and accessed at runtime through the FeatureProvider interface.

Flavor Package Name Features
free com.securecall.app.free Basic E2E encryption, 10 contacts, 15 minute call limit
pro com.securecall.app.pro Unlimited calls, HD audio, anti-recording detection, TLS security
premium com.securecall.app.premium Everything in Pro + hardware keystore, automatic threat termination, and root detection

Build Command

The free debug variant is the primary development and testing target:

# From the client_android/ directory
./gradlew assembleFreeDebug

# APK output location
app/build/outputs/apk/free/debug/app-free-debug.apk

Server Endpoints

All server URLs are hardcoded in build.gradle for both debug and release configurations:

Service URL
WebSocket Signaling wss://api.stealthx.tech/signal
STUN stun:stun.l.google.com:19302
TURN turn:a.relay.metered.ca:443?transport=tcp