Native application / Signal Messenger (Desktop, Android & libsignal)

Signal Messenger: PQXDH + SPQR Triple Ratchet, Sealed Sender v2 and linked-device boundaries

Static teardown of Signal Desktop 8.34.0, Signal Android 8.34.2, libsignal 0.106.0, ringrtc 2.73.0, and Signal-Server: preload-realm Electron isolation, N-API vs JNI parity, PQXDH + SPQR Triple Ratchet, Sealed Sender v2, and linked-device sync.

Contract model · conceptual sequence, not a claim about internal deployment
  1. PQXDH + SPQR Triple Ratchet
  2. Sealed Sender v2 + zkgroup
  3. Primary vs linked-device sync
01 / EMPIRICAL RECORD

Investigation question

How do Signal Desktop and Signal Android share Rust cryptographic and calling state machines across Electron N-API and Android JNI, transition sessions from PQXDH into the SPQR Triple Ratchet and Sealed Sender v2, and enforce strict primary-versus-linked-device authority boundaries?

02 / EMPIRICAL RECORD

Observed

Zero-execution static inspection of Signal Desktop 8.34.0 (org.whispersystems.signal-desktop on Electron 45.0.0, 575 bundle entries, 9-fuse vector with RunAsNode, EnableNodeOptionsEnvironmentVariable, EnableNodeCliInspectArguments, and LoadBrowserProcessSpecificV8Snapshot disabled while EnableCookieEncryption, EnableEmbeddedAsarIntegrityValidation, OnlyLoadAppFromAsar, GrantFileProtocolExtraPrivileges, and WasmTrapHandlers are enabled) paired with offline APK/JNI inspection of Signal Android 8.34.2 (org.thoughtcrime.securesms versionCode 177501, APK Signature Scheme v3.1 with key rotation) and pinned upstream signalapp repositories maps the full client-and-server architecture. Instead of executing its primary UI inside the untrusted renderer world, Signal Desktop loads background.html with zero renderer script bundles and compiles bundles/preload/main.js (6.78 MB plus V8 bytecode cache) inside the isolated preload V8 realm (contextIsolation: true), exposing only 5 lifecycle globals while running all 8 auxiliary windows with sandbox: true and serving media through 4 custom schemes (asset:, attachment:, bundles:, emoji:) across 48 ipcMain.handle and 44 ipcMain.on channels. Local state lives in a 56-table SQLCipher v1800 database embedding Rust Signal-FTS5-Extension, wrapped by OS safeStorage and 3 Linux Polkit actions (org.signalapp.enable-backups, view-aep, plaintext-export). Across platforms, the same Rust workspace powers @signalapp+libsignal-client.node (834 N-API exports in 0.106.0) and Android libsignal_jni.so (660 JNI exports in 0.105.4), alongside @signalapp/ringrtc 2.73.0 (74 N-API methods vs Android libringrtc_rffi.so 269 RFFI + libringrtc.so 69 JNI exports) and Android-only libmobilecoin.so. On the wire, PQXDH (Curve25519 + ML-KEM-1024 / Kyber-1024) initializes a Triple Ratchet combining Double Ratchet with Sparse Post-Quantum Ratchet (SPQR v1.6.0, ML-KEM-768 braided chunks) and Tahini header keys, delivered over Sealed Sender v2 (0x23/0x22 Barbosa multi-recipient KEM + Ristretto255 GroupSendEndorsements).

03 / EMPIRICAL RECORD

Inferred

Three engineering lessons emerge from Signal’s split client/server design: (1) concentrating protocol evolution—PQXDH, SPQR ML-KEM-768 ratcheting, Sealed Sender v2, zkgroup Ristretto255 credentials, SVR2/SVRB enclaves, and Tokio gRPC chat connections—inside shared libsignal Rust crates lets Signal-Server enforce a rolling ~90-day RemoteDeprecationFilter (HTTP 499) and require SPQR capability without cross-client wire drift; (2) on Wayland compositors without a desktop-detected keyring, Chromium safeStorage defaults to basic_text unless --password-store=gnome-libsecret is passed, after which SafeStorageBackendChangeError prevents silent plaintext key downgrades; and (3) ServiceConfig.MAX_MESSAGE_SIZE_BYTES (2,000 UTF-8 bytes) converts oversized message bodies into long-text attachments while UTF-16 BodyRange offsets govern mentions, quotes, and styles.

04 / METHODOLOGICAL BOUNDARY

Unknown & limitations

Static binary, ASAR, offline public APK, and upstream open-source repository analysis only; Signal.app was never launched and no local SQLCipher database, OS Keychain entry, Android /data/data directory, or live Signal account traffic was accessed. Production SGX hardware enclave attestation keys, live anti-abuse heuristics behind RateLimitChallengeManager, and server-side operational telemetry thresholds remain outside client binaries and public source.

05 / EMPIRICAL RECORD

Architecture

Signal layers four boundaries: (1) Host shells — Electron 45.0.0 preload-realm React desktop client (background.html + isolated preload V8 context + dedicated sql.js WorkerThread) and Android Kotlin/Compose client; (2) Shared Rust FFI core — libsignal (crypto, Tokio AuthenticatedChatConnection / UnauthenticatedChatConnection gRPC, zkgroup, SVR2/SVRB, CDSI, SBACKUPv1 validator) and ringrtc (1:1 ICE/TURN + sfu.voip.signal.org group/call-link E2EE media); (3) Hardware enclaves — SGX/Gramine CDSI contact discovery (pinned mrenclave) and SVR2 / Raft-replicated SVRB PIN & backup key recovery; and (4) Signal-Server Dropwizard + gRPC control plane with dual identified and unidentified WebSocket pipes.

06 / EMPIRICAL RECORD

Domain & data models

Core protocol and storage schemas include: 56 SQLCipher tables at schema v1800 (messages, conversations, sessions, identityKeys, kyberPreKeys, groupCallRingCancellations, polls, pollVotes, pinnedMessages, editedMessages, stickerPacks, and signal_fts5); Provisioning.proto (ProvisioningUuid, ProvisionEnvelope, ProvisionMessage carrying 64-byte AccountEntropyPool, ACI/PNI identity keys, profileKey, and provisioningCode); SignalService.proto Content (DataMessage with <= 2,000-byte inline UTF-8 body, UTF-16 BodyRange styles/mentions/spoilers, Quote, Reaction, PollCreate/Vote/Terminate, EditMessage tag 11, StoryMessage, PinnedMessage, and AdminDelete) plus SyncMessage tags 1..26; and SBACKUP\x01 encrypted backup frames derived via HKDF from the 64-byte AccountEntropyPool.

07 / EMPIRICAL RECORD

Workflows & state machines

Primary-versus-linked-device and cryptographic state machines enforce strict separation of authority: (1) Primary phones own SMS/voice registration, AccountEntropyPool generation, PIN/SVR2/SVRB mutation, phone-number change, MobileCoin wallet signing, and SGX CDSI contact discovery; (2) Linked Desktop devices pair via sgnl://linkdevice?uuid=...&pub_key=... over the unauthenticated provisioning WebSocket, receiving X25519 + AES-256-CBC + HMAC-SHA256 ProvisionEnvelope keys followed by an ephemeral archive transfer and ongoing Sesame multi-device SyncMessage fanout (Sent, Contacts, Read, Viewed, Keys, FetchLatest, MessageRequestResponse, CallEvent, CallLinkUpdate, DeviceNameChange); and (3) every 1:1 session steps continuously through SPQR ML-KEM-768 post-quantum epochs alongside Curve25519 DH ratchets.

08 / EMPIRICAL RECORD

API & protocol surfaces

Desktop exposes 48 ipcMain.handle and 44 ipcMain.on channels plus 4 custom schemes (asset:, attachment:, bundles:, emoji:), backed by 834 @signalapp/libsignal-client N-API exports (38 AuthenticatedChatConnection_* and 23 UnauthenticatedChatConnection_* Tokio gRPC/WebSocket entrypoints across AuthMessagesService, AuthKeysService, AuthDevicesService, AuthBackupsService, AuthUsernamesService, UnauthMessagesService, and UnauthProfilesService), 74 @signalapp/ringrtc N-API exports, CDN2/CDN3 encrypted attachment upload/download endpoints, and dual chat.signal.org identified + unidentified WebSocket pipes.