Skip to content

Failure Modes and Recovery

Draft

Owns the failures Capsule must survive and the independent recovery paths that must stay workable.

FailureDetected / contained byRecovery
Master key loss—Path 1 or 2
Device key lossDevice keys are disposableRe-bootstrap (1/2); never recovered
AMK loss—Path 3 or 4
Write-tier key loss—Re-minted next epoch
Master key compromise—Rotate and re-key
Device compromise—Revocation certificate + MLS Remove; survivors rotate
AMK / write-tier compromise—Epoch bump; old epoch cannot read or sign future ones
Server compromiseServer never trustedAuthz from MLS history; E2E data
One half of a hybrid primitive brokenHybrid constructionOther half holds
Ciphertext corruption / truncation / reorderSTREAM tags + manifest ciphertext_hashRe-fetch a content-addressed copy (6)
Reader-signed / removed-writer / wrong-epoch / forged / replayed manifestverify_assetQuarantine + audit trail
AMK distribution lagverify_asset pendingRetry; quarantine after timeout
MLS ratchet corruption—Paths 1, 3, 4; MLS Resilience
Backup missing an amk_versionAMK-completeness checkRe-export before reliance
Nonce reuseStructural (Re-keying)—
CBOR non-determinismCanonical encodingByte-identical re-encode
Bug corrupting the library DBDB is a rebuildable cacheRebuild from sidecars (5)
Erroneous deleteSoft-delete defaultRestore from trash (7)
Stale revival (old valid manifest)prior_provenance_hash chain, client and serverQuarantine; chain advance refused
Suite downgradeSignature covers crypto_suite_id, protocol_versionQuarantine
Derivative poisoningDerivativeManifest chainUnsigned overwrite rejected
Old client strips unknown sidecar fieldsSignature covers all bytes; refuse writes above max sidecar_schemaQuarantine

Independent paths:

#PathSurvives
1Master-key escrow: passphrase/seed → master key → AMK escrowTotal device loss
2Cross-device recovery (Device Enrollment)Partial device loss; lost master-key backup if one device survives
3OGK: any owner recovers every album’s AMKsLost membership, AMK distribution gaps
4Offline backup artifactServer loss, account compromise, escrow corruption
5Filesystem rebuild: CBOR sidecars are canonical, DB is a cache (idempotent rebuild_index())DB corruption, index bugs
6Content-addressed copies on devices or federated peers (ciphertext, not keys)Single-server data loss
7Trash: signed soft delete with a retention window before purgeErroneous deletes

Account types. Registered accounts have all seven. Delegated/sponsored accounts recover only through the sponsor’s master key (consequence). Non-registered share-link accounts have no collection to recover.

  • Backup and restore never touch MLS ratchet state; the master key is the single backed-up root.
  • Device keys are hardware-bound, non-exportable, never backed up; the master identity cross-signs every device.
  • Every construction is versioned (KDF info, in-blob Argon2id params, crypto_suite_id, sidecar_schema), so v2 never strands v1.
  • verify_asset quarantines, never drops or silently accepts.
  • Provenance is append-only and hybrid-signed per record (Provenance).
  • Backup verification runs before the backup is relied on.
  • TLS 1.3 required wherever both ends support it; TLS 1.2 is the absolute floor (legacy ingress only); nothing lower. Clients try 1.3 first.
  • Deployments SHOULD enable hybrid X25519+ML-KEM key exchange on 1.3.
  • Ingress (not the app server) terminates TLS: operator-configured, documented not enforced.
  • Capsule’s own TLS (SDK, LAN peering mTLS, egress) is rustls (Dependencies), same policy.
  • Every catalog row tests detection and recovery; CI fails a row without one.
  • One scenario per path: reach the lost state, recover, assert every asset returns.
  • Exported backup artifacts contain no ratchet state; device private keys are non-exportable per platform (Keys); v1↔v2 sidecar round-trip.
  • System-level coverage: Module Map — E2E Test Surface.