CA: EmYPJGmE1HUPNzmxbYtPq29HEdzyL2Y1DojR356JBTAX

Version 1

High-Level Security Model

This document outlines the comprehensive security framework governing ShadowTalk, including threat assumptions, cryptographic primitives, data handling rules, and device protection layers. It defines how ShadowTalk 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-size packets; indistinguishable noise generation
Active Network AttackerMITM injecting/replaying packetsReplay, downgrade, impersonationNonce-based replay protection, signature verification, ephemeral DH handshakes
Compromised Relay / Push DistributorHostile server or ntfy nodeMessage inspection or metadata harvestingOnly opaque encrypted wake tokens; no sender/receiver identifiers; rotating relay endpoints
Device Thief / Law Enforcement SeizurePhysical accessExtract keys or pending messagesHardware key storage (StrongBox / Secure Enclave), biometric gate, duress wipe
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 modes
User Coercion / Compelled DisclosureForced unlock or PIN entryData exfiltration under duressDuress PIN triggers key wipe + signed network revocation

3. Cryptographic Architecture

LayerAlgorithmFunction
Identity SigningEd25519Long-term identity proof
Ephemeral SessionsX25519 / ChaCha20-Poly1305Forward secrecy and transport confidentiality
Wake TokensEd25519 (sign) + XChaCha20Authenticated pings/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.

6. Data Lifecycle

StageStoredEncryptedTTL
Message queuedSender deviceYes (queue 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