Security Architecture

Mortui implements a defense-in-depth security architecture with multiple layers of protection to ensure user data privacy, system integrity, and secure action execution.

Security Layers

Application Security Layer

Multi-Factor Authentication

Fingerprint + PIN with PBKDF2 hashing (face unlock opt-in)

Authorization & Permissions

Feature access gated by your plan (free or full version)

Session Management

Volatile auth state — always locked after a process restart

Data Security Layer

Encryption (AES-256-GCM)

AES-256-GCM encryption for all sensitive data at rest

Key Management (Keystore)

Hardware-backed key storage in the Android Keystore

Secure Storage (SQLCipher)

Encrypted SQLite database with Keystore-derived passphrase

Communication Security Layer

TLS/HTTPS Transport

Encrypted network communication for all external services

Validated TLS Stack

Provider traffic uses Android’s validated TLS stack and system trust store

API Security (OAuth 2.0)

Secure authentication for Gmail and Outlook integration

Emergency SMS From Your SIM

Texts to any emergency contacts you add go through Android’s own SMS manager from your number — no gateway, no third party, and a send-only permission with no ability to read or receive messages

Platform Security Layer

Android Permissions

Principle of least privilege for system access: send-only SMS requested only if you add an emergency contact, no contacts, no call log, no message reading

Hardware Security

Utilizes device security hardware where available

Release Hardening

R8 code shrinking and obfuscation, resource shrinking, and redacted logs

Multi-Factor Authentication

Mortui implements a comprehensive authentication system with multiple layers to protect configuration access while allowing background operations to execute autonomously.

  1. 1

    Primary: Biometric

    Strong fingerprint authentication (Class 3 / BIOMETRIC_STRONG) via BiometricPrompt. Face unlock is opt-in under Security settings — most Android face implementations are Class 2 and insufficient for security-critical actions.

  2. 2

    Secondary: PIN

    PBKDF2-HMAC-SHA256, 100,000 iterations, with a per-user random salt

  3. 3

    Emergency: Recovery Code

    128-bit random recovery code, shown once and stored only as a hash

Encryption & Key Management

AES-256-GCM Encryption

All sensitive data is encrypted using AES-256-GCM, the same encryption standard used by governments and financial institutions worldwide.

  • 256-bit key length
  • Galois/Counter Mode for authenticated encryption
  • 12-byte random IV per encryption
  • 128-bit authentication tag

SQLCipher Database

The entire database is encrypted at rest using SQLCipher 4.6.1, providing transparent AES-256 encryption of all data, indexes, and journals.

  • Keystore-derived passphrase
  • Full database file encryption
  • WAL and journal file protection
  • Backup exclusion via Android rules

Android Keystore

Hardware-backed key management using the Android Keystore. Keys are generated inside the device’s secure hardware and are never exposed to the app.

  • Generated and held in secure hardware
  • Background service compatible
  • AES256_GCM key scheme

Encrypted File Vault

Your secure on-device vault for sensitive files, email attachments, and structured data. Import files freely and export them whenever needed. One thing to know before you rely on it: when the switch fires for real, the vault is erased as the final step — after any vault files you attached have been delivered to your recipients.

  • AES-256-GCM streaming encryption
  • Built-in CSV viewer and table builder
  • Import/export files at will
  • UUID filenames prevent metadata leakage
  • Files never leave device unencrypted
  • Attach vault files to recipient messages

Secure File Deletion

Files are overwritten three times — random data, zeros, then ones — each pass flushed to disk, and then deleted. Combined with Android’s file-based encryption, the remaining content is not practically recoverable.

  • 3-pass overwrite (random, zeros, ones)
  • Flushed to disk with fsync after each pass

Additional Hardening

FLAG_SECURE

On by default across the whole app. Can be turned off in Security settings if you need to capture the screen.

PII Redaction

No PIN, passphrase, secret, or emergency code values are ever written to logcat.

R8 Obfuscation

Release builds use minification and resource shrinking with R8 for obfuscated DEX output.

Security Audit System

Mortui includes a comprehensive security scoring system that evaluates your configuration and provides recommendations for improvement.

  • PIN configuration validation (30 points)
  • Permission status checks (25 points)
  • PIN strength analysis (20 points)
  • Biometric configuration (15 points)
  • PIN backup questions (10 points)

Security Levels

Excellent90-100 points
Good75-89 points
Adequate50-74 points
Weak25-49 points
Critical0-24 points

Questions about any of this?

We will answer specifics — including what Mortui deliberately does not do.