Quira Quira Docs
GitHub Star

Formal Threat Model

Every defense mechanism in Quira — from capability tokens to emergent security structures — is built on top of this formal threat model. It defines what we protect, who we protect against, and what security guarantees we provide.

Research document

Full formal definitions with proofs and quantitative privacy analysis are in docs/security/threat-model.md (~400 lines). This page is the web-accessible summary.

Knowledge graph definition

Quira's Context Graph is formally defined as a 5-tuple:

G = (V, E, Σ, Φ, Τ)

SymbolDefinition
VNode set — each node corresponds to one page visit
E ⊆ V × V × LLabeled directed edges (navigation, ai_inferred, user_created)
Σ: V → SStructured attributes per node (title, url, summary, entities, tags, notes, space_id)
Φ: V → R384Embedding vector per node (384-dimensional)
Τ: V → TTemporal metadata (visit timestamps, dwell time, visit count)

Compositional sensitivity

Individual data points have low sensitivity. But the aggregated graph is super-additive — the sensitivity of the whole far exceeds the sum of its parts.

AssetSensitivityReason
Individual node summaryLowPublic web content
Entity set (union)MediumPartial interest profile
Navigation edgesHighComplete research path = thought flow
Embedding vectorsHighContent inversion attacks possible
Temporal metadataHighFull behavioral timeline
Graph topologyCriticalUniquely identifies a person (cognitive fingerprint)
Entire graph GCriticalComplete representation of personal knowledge

Adversary model

Five adversary classes, each defined as a triple (Capabilities, Goals, Prior Knowledge). Upper classes subsume lower capabilities.

ClassNameCapabilitiesExample
A1Network ObserverPassive traffic observation (DNS, TLS SNI, packet timing). Cannot read encrypted payloads.ISP, public WiFi, state surveillance
A2Malicious Web ContentArbitrary HTML/CSS/JS in renderer process. Prompt injection, entity poisoning, embedding manipulation, cognitive fingerprinting.Phishing sites, ad networks, disinfo campaigns
A3Malicious ExtensionWebExtensions API access within declared permissions. Updates can inject code. Can exfiltrate via network.Supply-chain compromised extensions, acquired extensions
A4OS-Level AdversaryFilesystem read (direct SQLite access), process memory dump, DMA/cold boot attacks.Malware, rootkits, physical device theft, forensics
A5Browser VendorCode modification, telemetry addition, update distribution. Mitigated by OSS + reproducible builds.Acquisition, management change, legal compulsion

AI-specific attack vectors (A2)

Malicious web content can specifically target Quira's AI pipeline: prompt injection to corrupt summaries (A2.1), entity poisoning with invisible text (A2.2), embedding space manipulation to pollute similarity search (A2.3), and cluster centroid shifting across multiple pages (A2.5). See Threat Protection.

Attack surfaces

IDSurfaceAdversaryDefense
S1Network layer (DNS, TLS)A1Network Firewall
S2Web content → AI pipelineA2Threat Protection (4-layer defense)
S3Extension → Context Graph APIA3Permission System (capability tokens)
S4Local filesystem (SQLite DB)A4Privacy Architecture (SQLCipher + TEE)
S5Embedding vectorsA2-A4Independent encryption, TEE inference
S6IPC channels (Gecko IPDL)A2Capability checks at every IPC boundary
S7Graph topology metadataA1-A4AGTR + Phantom Knowledge Obfuscation
S8Temporal metadata patternsA1-A3Batch processing, temporal noise injection
S9Update/build pipelineA5OSS + reproducible builds + code signing
S10Inference residues (after node deletion)A3-A4IRD + RSIP + CAV

Security properties

PropertyDefinitionVerification
Graph ConfidentialityAdversary cannot access nodes/edges/attributes beyond their authorized capability tokens.Formal (TLA+ model of CGAG)
Graph IntegrityNo unauthorized modification of graph structure. AI pipeline cannot write without passing validation.Hash chain (TCV)
Deletion CompletenessWhen a user deletes data, all direct and derived artifacts (embeddings, summaries, inference residues) are purged.Cryptographic (CAV)
Flow IsolationData cannot flow between security contexts without explicit user action. IFC labels are monotonic.Label propagation audit
Temporal DecayPermissions and sessions expire. No permanent grants.Capability token TTL enforcement

Attack-defense mapping

Each adversary class maps to specific defense layers:

AdversaryPrimary DefenseAdvanced Defense
A1 (Network)DoH/DoT, ECH, TLS 1.3, Network FirewallPQC (ML-KEM hybrid), batch timing
A2 (Web Content)Content Filtering, AI Immune SystemKSCI, Adversarial ML, Inverse Sandboxing
A3 (Extension)Capability tokens, Context TCCCSEB anomaly detection, behavioral monitoring
A4 (OS-Level)SQLCipher, Keychain, TEESKV, Context Lockdown, Dead Man's Switch
A5 (Vendor)OSS, reproducible builds, opt-in telemetryDifferential privacy (ε published), CAV
← Previous: Security Overview Next: Network Firewall →
Was this page helpful?
Ask AI
Q

Ask anything about the documentation

Ctrl+K to open anytime