Skip to content

Security Model

rockcutto edited this page Oct 5, 2026 · 2 revisions

LibreSpan does not treat “security” as a single switch. Protection is split into several layers, each with its own boundaries.

1. Transport: TLS

The connection between LibreSpan and the XMPP server is protected with TLS according to server capabilities and configuration.

TLS protects transport to the server, but by itself it is not end-to-end message encryption.

2. Messages: OMEMO

OMEMO is used for end-to-end encryption of supported personal messages.

An important part of the trust model is the set of devices and their fingerprints.

LibreSpan exposes OMEMO identities and fingerprints so users can verify devices.

Important: removing an old device from the published OMEMO device list is not the same as revoking the XMPP account. If a lost device still has valid XMPP credentials, it may be able to reconnect. In that case, changing the XMPP account password is an additional protective step when supported by the server.

3. Local data: Secure Content Store

Secure Content Store (SCS) is used for protected local message text and media storage.

Core properties include:

  • content is account-scoped;
  • readers consume only fully committed objects;
  • protected content does not use a public filesystem path as its primary identity;
  • new protected media remains app-private by default;
  • temporary staging/cache files are not the durable source of truth;
  • Save and Share are explicit export boundaries.

See Secure Content Store.

4. App Lock

App Lock is a UI access gate.

It uses Android system authentication such as:

  • strong biometrics;
  • PIN;
  • pattern;
  • password,

depending on device capabilities and configuration.

App Lock is not a replacement for High Security and does not by itself define the lifetime of protected-store keys.

5. High Security

High Security strengthens protection of the application master key used for protected local data.

In the current model:

  • after process restart or device reboot, protected local data remains unavailable until successful authentication;
  • after a prolonged period without authenticated use, the app may disconnect accounts and remove the working decryption capability from memory;
  • normal unlock uses Android device authentication;
  • recovery uses a separate 12-word recovery phrase;
  • LibreSpan should not persist the recovery phrase itself;
  • losing both usable device authentication and the recovery phrase may make protected local data unrecoverable.

6. Data removal and logout

Logging out or disabling an account is not treated as destruction of protected local data.

Data removal should be explicit and account-scoped.

Local deletion also does not automatically delete:

  • server-side archives;
  • copies on another participant's device;
  • data on the user's other devices.

7. What LibreSpan does not promise

LibreSpan does not claim to protect against a fully compromised operating system.

Outside the application threat model may be:

  • root-level malware;
  • system-privileged spyware;
  • OS zero-days;
  • abuse of an already unlocked device;
  • XMPP-server compromise at the metadata/routing layer;
  • explicit user export through Save/Share.

8. Threat-model summary

LibreSpan specifically aims to reduce risks around:

  • casual access to the application;
  • leakage of local plaintext content;
  • residual media files;
  • access to protected data after restart without re-authentication;
  • cross-account mixing of local protected content.

Security still depends on the Android platform, the selected server, correct OMEMO trust decisions, and user behavior.

Clone this wiki locally