Encrypt, name the file, trust the path.
Swap a valid encrypted blob and cryptography may still accept it. The path has silently become the security model.
TECHNICAL NOTE TN-001 / IOS VAULT
Implementation invariants for storage, authenticated identity, crash consistency, recovery, bounded decryption, and process authority.
THE PREMISE
AES-GCM provides confidentiality and authentication. Storage must also prove ownership, commit order, recovery authority, and bounded plaintext lifetime.
The model assumes termination at any instruction, torn metadata, valid-ciphertext replay, partial cross-directory operations, and unavailable catalogs. Unproven states fail closed and retain recovery evidence.
THREAT / VALID CIPHERTEXT REPLAYED IN A DIFFERENT CONTEXT
Authentication proves bytes were sealed by a key, not that chunk 12 belongs to this item, metadata to this object, or a wrapped key to this role.
Swap a valid encrypted blob and cryptography may still accept it. The path has silently become the security model.
Item ID, chunk index, and role enter domain-separated AAD. Any contextual move fails authentication.
CryptoBox.swift
AAD = itemID + chunkIndex
AAD = itemID + metadata role
private half sealed by master key
FAILURE / PROCESS TERMINATION AT ANY MOVE PHASE
A cross-space move changes ownership domains. If the app dies between target publication and source deletion, a boolean cannot identify the authoritative copy.
Phase is persisted before irreversible work. Recovery resumes from evidence already on disk.
VaultStore.swift
copying
.moving-<itemID>
manifest + chunks
deletingSource
staging → final
then clear journal
Incomplete target staging is rolled back.
Source deletion is reconciled only after target evidence exists.
FAILURE / PRIMARY CATALOG TORN, MISSING, OR STALE
Trusting one config lets a torn write hide every healthy object. Senvra reconstructs from independent witnesses only when they agree.
Recovery is not “pick the newest.” A catalog must agree with descriptors, receipts, digests, and credential anchors.
VaultStore.loadConfiguration()
Each video segment is protected as it arrives. Backgrounding, storage pressure, heat, or interruption triggers safe sealing or startup recovery without discarding completed content.
A failed recovery may block access. It never cleans up the only good copy.
EXPOSURE / WHOLE-FILE PLAINTEXT CREATED FOR PARTIAL READ
Whole-file export turns playback into another plaintext store. Senvra authenticates bounded chunks and decrypts only requested ranges, without a complete temporary copy.
ChunkedMediaCryptor.swift
chunk count
plaintext byte counts
encrypted metadata
BOUNDARY / NETWORK-CAPABLE CODE INSIDE THE VAULT PROCESS
A privacy toggle is policy; removing URLSession, WebView, local-network declarations, and network entitlements is architecture. Support hands off explicitly to the system browser. The app does not need network access; if a system permission alert appears while typing, choose Don't Allow.
Info.plist + entitlements
VERIFICATION MATRIX
Credibility depends on falsifiable checks. We publish the evidence and its boundary.
Covers cryptographic envelopes, storage state machines, recovery paths, privacy-copy export, and app behavior in the recorded candidate without hard-coding a stale test count.
Rejects network clients and endpoints, debug instrumentation, unauthorized entitlements, and privacy-manifest drift.
Signed builds still need device evidence for long recording, Data Protection, low-storage behavior, extension behavior, and recovery after real interruptions.
Local checks do not verify iOS internals, other apps, device compromise, browser infrastructure, or copies after export.
If evidence cannot identify one authoritative state, execution stops and retains every recovery candidate.