Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

For the independent review

What to look at, in order, and the questions already known. The design is e2ee.md; the reasons for each choice are in ../phase11.md.

Scope

  1. crates/drusite-e2ee (formats, no I/O): every layout, label and length check; that every ciphertext’s associated data binds it to where it belongs; the epoch chain; the approval code’s commitment; padding. About 2,150 lines, with golden vectors (vectors/v1.txt), property tests and fuzz targets.
  2. The devices’ use of it in crates/drusite-core/src/e2ee.rs: trust on first use and key changes (pin), what a device accepts from the server in KeyWork, rotation, approving devices and agent devices, and opening entries (sync/).
  3. The server’s checks in crates/drusite-server/src/sync/sealed.rs, sync/keywork.rs and e2ee.rs: what it refuses without keys, and that no route hands one person’s wraps to another.

Known questions

  • Snapshots are trusted as written by a member who may edit. A snapshot declares no peers (it carries everyone’s changes), so a member with the key could hide forged changes from other people’s peers in one. Is a per-peer check on snapshots worth its cost?
  • Key substitution without safety codes. On first use a device trusts the key the server hands it. Is the “safety code changed” flow, and the UI around it, enough for people who never compare codes?
  • Starting over (reset) makes keys not signed by the old ones, by design. Members must accept the change before sharing. Check nothing shares with an unaccepted key.
  • The browser runs code the server serves. That’s stated as out of scope; is the warning enough?
  • Dependencies: hpke, x-wing, ml-kem and the crates they need are cargo vet exemptions, not audits.
  • Fuzzing: the targets (crates/drusite-e2ee/fuzz) compile, but haven’t had long runs.

Running things

cargo test -p drusite-e2ee
cargo +nightly fuzz run entry -- -max_total_time=600   # from crates/drusite-e2ee
DRUSITE_TEST_DATABASE_URL=postgres://… cargo test -p drusite-server --test e2ee