ARCHITECTURE

Thirteen sovereign engines.
One audit chain.

LyDos Phone runs thirteen Rust daemons over a hardened AOSP 15 base. Each engine watches the others. If one is silenced, the rest stop writing. If one falsely signs, the chain catches it.

SETTLEMENT FLOW

How a critical action moves through the stack.

The same six steps for a wallet send, an ID presentation, an OTA confirm, a permission grant. Skip a step and the action does not settle.

  1. 01

    App requests a critical action

    Wallet send, ID present, OTA confirm, permission change. The app talks to a HAL — never directly to KSL or ASR.

  2. 02

    LSIA gate — pre-flight

    If mode is CRITICAL_LOCKDOWN, the call short-circuits to LsiaVetoed before any byte is parsed. No exception path. KURAL 22 enforced at the top.

  3. 03

    ASR emit — audit before action

    The HAL writes an audit entry into the append-only chain. If the emit fails (disk full, partition read-only, hash mismatch), the chain returns Error and the action stops here.

  4. 04

    KSL sign — sealed in hardware

    The action's canonical bytes are signed by the master key inside the secure element. ML-DSA-87 + Ed25519 hybrid where applicable. The private bytes never leave.

  5. 05

    DSL settle — receipt issued

    DSL returns Settled with the signature, the ASR receipt hash and the LSIA mode snapshot. The app receives a proof, not just a yes.

  6. 06

    GCI publish — pattern only

    If the action is one the federation cares about (suspect IP cluster, spoofed alert attempt), GCI publishes hashed pattern + /24 prefix + amount bucket. Raw payload stays on device.

THE THIRTEEN

Each engine — what it does, what it costs, what it cannot do.

KSL/api/ksl/*

Key Sovereignty Layer

Master key sealed in the secure element. ML-DSA-87 signatures. Private bytes never cross userspace — only a fingerprint surfaces. kslctl exposes counters and rotation jobs.

daemon
ksld · 818 LOC
crate
sovereign_ksl + sovereign_ksl_keymint
routes
device-keys · sign · rotate

KURAL 18 — every critical action signed or aborted.

LSIA/api/immunity/*

Local Sovereign Immunity Agent

247 kernel + syscall hooks watched live. State machine NORMAL → DEGRADED → SAFE → CRITICAL LOCKDOWN. In LOCKDOWN every sovereign write is short-circuited to LsiaVetoed before it reaches the engine.

daemon
lsiad · 1 905 LOC
crate
sovereign_lsia
routes
mode · veto · quarantine · sacrifice

KURAL 22 — CRITICAL_LOCKDOWN overrides everything.

TUP/api/tup/*

Trusted Update Pipeline

Every OTA carries a manifest signed by Release + Security + Ops + Compliance officers. M-of-N quorum, role coverage, binary SHA-256 verified twice — controller + agent defense-in-depth. Reject is fail-closed.

daemon
tupd · 2 392 LOC
crate
sovereign_tup · release-pack-signer
routes
manifest/verify · ota-delta · officer-keystore

KURAL 20 — no deploy without TUP. No --skip-checks.

ASR/api/asr/*

Audit & Sovereign Receipts

Every important decision (signature, permission, policy, update) is appended to a hash-chained log on a write-once partition. Tamper any entry and the chain visibly breaks at next boot attest.

daemon
asrd · asr-hal-service
crate
sovereign_asr · sovereign_asr_sqlite
routes
append · verify · export

Hash-chained · append-only · forensic-grade.

DSL/api/settlement/*

Default Settlement Layer

The only path apps can sign through. Audit emit must succeed before KSL signs; if the audit fails, the signature never happens. Settled = signed + approved + proven. No settled-without-trail path.

daemon
dsl-hal-service
crate
sovereign_dsl
routes
intent · settle · proof

Apps cannot raise daily limits by tampering memory.

GCE/api/gce/*

Global Consistency Engine

Cross-node state drift detection. Compares engine heads across federation peers and degrades automatically when drift exceeds tolerance. Disagreement triggers degraded, not a silent merge.

daemon
gced
crate
sovereign_gce
routes
head · drift · reconcile

Diverge cleanly. Never silently converge.

GCI/api/gci/*

Global Collective Intelligence

Privacy-preserving pattern federation. Only hashed signals, /24 IP prefixes and amount-bucketed events leave the device. Raw payloads, emails, user ids — never leave.

daemon
gcid · gci-hal-service
crate
sovereign_gci
routes
pattern/share · consensus · publish

KURAL 23 — only hashed/bucketed patterns leave.

LRM/api/lrm/*

Local Resilience Mesh

Store-and-forward DTN transport across LoRa multi-hop, Wi-Fi Aware, Bluetooth mesh and UWB. Bandwidth scheduled per peer. Persists across reboots. Press Edition keeps mesh telemetry up before the launcher.

daemon
lrmd · lrm-hal-v2
crate
sovereign_lrm · lrm-mesh-bridge
routes
peers · routes · sos · drill

SOS lane stays open in CRITICAL_LOCKDOWN.

SAT/api/sat/*

Satellite HAL

Cospas-Sarsat distress beacon, Iridium short-burst data, Starlink Direct-to-Cell, 3GPP NTN. SOS routes through whichever path is healthiest — auto-failover, no menu.

daemon
satd · sat-hal-service
crate
sat-hal-v1
routes
beacon · ntn · d2c · routing

Carrier-independent emergency, no SIM required.

LSSA/api/lssa/*

Layered Sovereign Security Architecture

10-layer architecture from hardware root-of-trust through trust graph. Boot pipeline + AVB + LyDos trusted update + on-device attestation. Each layer signs the next.

daemon
lssad · attestation-collector
crate
sovereign_lssa
routes
boot · attest · graph

Any boot-chain break → SAFE mode automatic.

CC/api/cc/*

Confidential Compute

SGX / SEV measurement-sealed secrets. Sensitive computations are sealed to a measurement; if the OS image changes, the seal opens to a different policy and the secret stays sealed.

daemon
sovereign_cc helper
crate
sovereign_cc
routes
seal · unseal · measure

Secret-bound-to-measurement, not to user.

FIN/api/{ledger,finance}/*

Financial Infrastructure

Double-entry ledger with per-transaction proof. Wallet (M243) routes every send through DSL HAL: ASR emit first → KSL sign second. Audit fails ⇒ signing aborts.

daemon
sovereign_fin
crate
sovereign_fin
routes
entries · proof · limits

Daily limit enforced by HAL, not by app code.

BUS/api/bus/*

Emergency / Framework Bus

Cell-broadcast (AFAD WEA, EU-Alert, J-Alert) is signature-verified before it reaches the lock screen. On-device signed push channel — notifications cannot be spoofed and survive GMS absence.

daemon
framework-emergency-bus
crate
sovereign_emergency_bus
routes
alert/verify · push/sign · subscribe

Government alerts pass signature gate or drop.

DESIGN PROPERTIES

Four properties this architecture guarantees.

Defense in depth — not a single chokepoint

Every engine watches the others. If one is silenced, the rest stop writing. If one falsely signs, the chain catches it at the next boot attest.

Fail-closed, never fail-open

When verification breaks, the answer is reject. No --skip-checks flag exists. No silent fallback to SQLite when PG :5434 is missing. No retry on signature mismatch.

Single source of truth

The ASR hash chain is the only timeline that matters. Every other engine can be derived, re-derived, or sacrificed — the chain cannot.

Privacy by hard rule

KURAL 23 — GCI only shares hashed patterns, /24 IP prefixes, amount buckets. Email, raw IP, user id, payload — never leave the device. Enforced at the engine boundary, not by config.

Read the engines, route by route.

115 sovereign routes are documented in /api. Engines ship as private Rust crates under sovereign-templates/.