Skip to content

M1-E: verify people by emoji, key backup and recovery - #4

Open
hsmith-dev wants to merge 1 commit into
feat/matrix-e2eefrom
feat/e2ee-verification
Open

hsmith-dev wants to merge 1 commit into
feat/matrix-e2eefrom
feat/e2ee-verification

Conversation

@hsmith-dev

Copy link
Copy Markdown
Owner

What and why

M1-E, part 2 (stacked on #3): the two biggest encryption gaps.

Verifying people by emoji (Matrix SAS)

  • Cross-signing is set up on an account's first password sign-in.
  • security.verify / Verify identity in a profile starts verification in your DM; incoming requests open a dialog. Both people compare seven emoji and confirm, or reject with They don't match (cancels on both sides).
  • Verified people get a shield in profiles and member lists; trust survives restarts.

Key backup and recovery

  • Set up key backup creates an encrypted server-side backup and shows a 12-word recovery key once.
  • Restore on a new device downloads keys and re-decrypts messages shown as undecryptable, in place (replies and reactions kept). Late keys are retried automatically.

Also fixes an opaque modal backdrop in dark mode.

Testing

  • cargo xtask ci passes.
  • crates/matrix/tests/verify.rs against Synapse with fresh accounts: both clients compute identical emoji; confirm marks both verified; mismatch cancels both; trust persists after restart; a new device can't read old history until it restores with the recovery key; a wrong key is refused.
  • New mapper test for late-key replacement; UI test that keeps the list of SAS emoji the bundled font can't draw accurate (those show names only).

Checklist

  • cargo xtask ci passes
  • New behaviour is a command with tests
  • UI change: looked at the shot renders (verification and recovery dialogs, light and dark)
  • No vendor assets; clean room

🤖 Generated with Claude Code

- cross-signing bootstrapped on first password sign-in (UIA)
- SAS emoji verification: request, accept, compare, confirm/mismatch,
  cancel; incoming requests from DMs and to-device; trust (User.verified)
  shown in profiles and member lists, remembered across restarts
- key backup: recovery key setup, restore on a new device, backup lookup
  after decryption failures, undecryptable messages re-decrypted in place
  (MessageReplaced) when keys arrive
- UI: verification dialog (names always shown; 4 undrawable glyphs
  name-only), encryption and key backup dialog, restore link on
  undecryptable messages; fix opaque modal backdrop in dark mode
- integration tests: identical emoji on both clients, mismatch cancels
  both sides, new device restores history, wrong key refused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant