Skip to content

24-Word Cold Recovery

If you lose your machine, SSD, and metadata.redb, your 24-word BIP-39 recovery phrase is enough to locate, verify, and restore your entire file catalog and bilateral ledgers from peers with zero central servers.

24-Word BIP-39 Clean-Machine Cold RecoveryEnter your 24-word BIP-39 phrase on a clean machine to derive a blind DHT locator, inspect the signed 1 MiB Root Index sequence and confirming hosts, fetch 2 MiB RS 8+6 catalog segments, and atomically hydrate redb.4. 24-Word Clean-Machine Recovery (Two-Tier Capsules)Debounced 8s publish + 24h safety refresh · Zero central servers01 · MNEMONIC24 BIP-39 WordsHKDF-SHA256 derivesblind DHT locator +recovery + file keys.Polls <= 32 peers02 · TIER 1 ROOTRoot Index (<= 1 MiB)BKDTCAP1 188B headerEd25519 + XChaCha20Up to 24 peer replicasBypasses shard debt cap03 · VERIFY FIRST2-Step Sanity CheckInspect sequence,timestamp, andconfirming_hosts beforeDB hydration begins.04 · TIER 2 RS(8+6)2 MiB SegmentsBase + Delta segmentsCompacts every 16 deltasBLAKE3 hash verifiedScales to multi-TB catalogs05 · ATOMICredb RestoreSingle immediatetransaction loadsfiles, packs, andbilateral ledgers.Privacy boundary: local filesystem paths (local_sources) stay strictly on your original machine and are never exported into Recovery Capsules.
  1. Deterministic Blind DHT Locator: Derived via HKDF-SHA256 (backdit/locator) from your 24-word mnemonic so a fresh machine can query Kademlia without any prior state or account ID on disk.
  2. Tier 1 Root Index (BKDTCAP1, <= 1 MiB):
    • Contains a 188-byte Ed25519-signed header (sequence, created_at, ciphertext_len, ciphertext_hash using BLAKE3) and XChaCha20-Poly1305 encrypted payload holding host_directory and CapsuleSegmentRef pointers.
    • Replicated directly to up to MAX_CAPSULE_REPLICAS = 24 hosts (TARGET_CONFIRMED_REPLICAS = 20). Hosts admit capsules via admit_capsule_store bypassing shard bootstrap debt caps.
  3. Tier 2 Catalog Segments (2 MiB RS 8+6):
    • File manifests, PackRecords, PlacementRecords, tombstones, and bilateral ledger checkpoints partition into Zstd-compressed, BLAKE3-keyed XChaCha20-Poly1305 Base and Delta segments (DEFAULT_CAPSULE_SEGMENT_TARGET_BYTES = 2 MiB).
    • Segments are erasure-coded (RS 8+6) across peers, allowing catalogs of thousands of files and multi-TB datasets to scale past the 1 MiB Root Index cap.
    • Delta compaction folds deltas into a fresh Base snapshot when delta count hits 16 (DEFAULT_CAPSULE_DELTA_COMPACTION_COUNT) or delta_bytes * 4 > base_bytes.
  • Event-driven debounced publish: Uploads, deletes, pack changes, and repairs call mark_capsule_dirty(), coalescing bursts behind an 8-second debounce window.
  • Startup & idle safety net: Daemons check for pending capsule publishes 120-149s after startup, and Sentinel runs a 24h (RECOVERY_CAPSULE_SAFETY_REFRESH_INTERVAL) periodic refresh and capsule segment repair pass (12h host DHT re-provide).

Two-Step Clean-Machine Restore & Rollback Check

Section titled “Two-Step Clean-Machine Restore & Rollback Check”

To protect against a rogue or eclipsed peer serving an older valid signed capsule:

  1. Discovery (discover_recovery_capsule): Polls up to 32 DHT providers and connected peers, verifies Ed25519 signatures without mutating the local database, and returns capsule_sequence, capsule_published_unix, confirming_hosts, and total_valid_replicas so you can confirm the snapshot is current.
  2. Atomic Hydration (restore_clean_machine): Downloads Tier 1 Root + RS-reconstructs Tier 2 segments (buffer_unordered(4)), verifies BLAKE3 digests, and hydrates metadata.redb in a single Durability::Immediate transaction (recomputing bytes_hosted_for_peer accurately from local disk state while preserving bytes_stored_by_peer and historical balance_byte_seconds).

For CLI or offline backup workflows:

Terminal window
backdit recover --mnemonic-file /secure/usb/words.txt
backdit recovery --help