Version 1

High-Level Security Model

This document outlines the comprehensive security framework governing Secure Legion, including threat assumptions, cryptographic primitives, data handling rules, and device protection layers. It defines how Secure Legion achieves trustless, serverless communication with provable zero metadata exposure.

1

Core Security Philosophy

Zero trust by design

No component (client, relay, or developer) is inherently trusted.

End-to-end sovereignty

Users own their cryptographic identity and control all message flow.

Serverless integrity

Messages are never stored or routed through central systems.

Defense-in-depth

Encryption, authentication, enclave storage, and revocation layers reinforce each other.

Human-level fail-safes

Duress PIN, session wipe, and optional decoy modes reduce coercion risk.

2

Threat Model

CategoryAdversaryGoalDefense Mechanism
Passive Network ObserverISP, carrier, compromised Wi-FiTraffic correlation, metadata analysisEncrypted wake tokens via Tor/UnifiedPush; constant-rate packets; indistinguishable noise generation
Active Network AttackerMITM machine/intercepting nationReplay, downgrade, impersonationNonce-based replay protection, signature verification, ephemeral DH ratcheting
Compromised Relay / Push DisclosureHostile server or OS-level leakMessage inspection or metadata harvestingOnly opaque encrypted wake tokens; no sender/receiver identifiers; rotating relay endpoints
Device Theft / Law EnforcementPhysical accessExtract keys or pending messagesHardware-key storage (StrongBox / Secure Enclave); memory-only data; screen lock
Malicious Insider / DeveloperRogue admin, compromised updateSupply-chain injectionReproducible builds, public hashes, code signing, optional offline app sideload verification
Mass Surveillance / State-level ActorData correlation, timing analysisSocial-graph inferenceOnion routing + randomized ping delays; multiple dummy traffic; random pacing
User Coercion / Compelled DisclosureForced unlock or PIN entryData exfiltration under duressDuress PIN triggers dev wipe + signed network revocation
3

Cryptographic Architecture

LayerAlgorithmFunction
Identity SigningEd25519Long-term identity proof
Ephemeral SessionsX25519 + ChaCha20-Poly1305Forward secrecy and transport confidentiality
Wake TokensEd25519 + Argon2 + XChaCha20Authenticated ping/pongs
Queue EncryptionAES-256-GCMLocal message queue protection
DerivationHKDF + Argon2idSalted handle hashing and key stretching
Storage EncryptionAndroid Keystore / iOS Secure EnclaveHardware-level protection

Forward Secrecy

Session keys are rotated per message. Each Ping-Pong exchange derives new ephemeral keys, ensuring that even full compromise of a device cannot decrypt prior traffic.

4

Device Security Layer

4.1 Hardware Binding

Each device identity is bound to a non-exportable key within hardware security modules.

  • Android → StrongBox or TEE-backed Keystore
  • iOS → Secure Enclave

4.2 Authentication Layer

User presence requirements:

  • Biometric, PIN, or password-driven
  • Cold storage behavior: app runs in read-only wallet mode until user unlocks private keys

4.3 Duress & Wipe Mechanisms

Emergency protection:

  • Duress PIN or "decoy unlock" instantly destroys keys and session metadata
  • A signed revocation beacon prevents future deliveries to that identity
5

Transport Security Layer

5.1 Primary Channels

  • Tor sockets for persistent encrypted routes
  • WebSocket/MQTT fallback for real-time communication
  • UnifiedPush / AlarmManager for wake notifications only (no metadata)

5.2 Integrity Rules

  • All packets contain MAC and signature verification
  • Fixed packet sizes prevent size correlation
  • Message IDs and nonces ensure replay immunity
6

Data Lifecycle

StageStoredEncryptedTTL
Message queuedSender deviceYes (pubkey key)≤7 days
Wake tokenRelay/transportYes (wake key)≤1 hour
Delivered messageReceiver memory onlyYes (session key)Erased after view
KeysHardware secure elementNon-exportablePersistent until wiped
7

Revocation & Identity Management

  • Every identity can publish a revocation record signed by the identity key.
  • Peers verify revocation before delivery.
  • Compromised identities are effectively blacklisted network-wide.
8

Auditing & Verification

  • Open source cryptographic libraries and protocol spec.
  • Reproducible builds for binary transparency.
  • Checksum verification on installs.
  • Independent audit pipeline (planned for public release).
9

Compliance & Patent Domains

  • Patent class alignment: H04L 9/32 (secure communications) and G06F 21/62 (data integrity and authentication).
  • Fully compliant with GDPR, CCPA, and no-PII retention policies.
  • No user data stored outside local device scope.

Summary

Secure Legion's security model is layered and self-verifiable.

1

Cryptography protects content.

2

Hardware protects keys.

3

Protocol protects flow (Ping-Pong).

4

Human controls (duress, manual wake) protect intent.

5

Open design protects against hidden trust.

Together these realize the core principle:

No servers. No metadata. No compromises.