Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace custom crypto implementation with Rust #22681

Closed
33 tasks
turt2live opened this issue Jun 28, 2022 · 1 comment
Closed
33 tasks

Replace custom crypto implementation with Rust #22681

turt2live opened this issue Jun 28, 2022 · 1 comment
Assignees
Labels
A-E2EE A-Performance O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience Security T-Enhancement T-Epic Issue is at Epic level Team: App

Comments

@turt2live
Copy link
Member

turt2live commented Jun 28, 2022

Using the rust-sdk's WASM bindings, we replace our entire crypto implementation for performance, stability, security, and maintenance reasons. This project is already approved for work to begin.

The intent is to support both old & new crypto implementations side-by-side through a labs flag up until we're ready to ship.

Phasing is approximate and used as an estimation tool. This list will be updated often - check back frequently.

Phase 1: Prove it works

  • [--] Bindings exist on NPM (in progress)
  • [ 5] Introduce labs flag for js-sdk
  • [13] Hook up rust stores to storage. Rudimentary one-way migration.
  • [13] Hook up to sync loop, basic encryption and decryption support.
    • Including attachment/media support
  • [ 8] Key backup (protocol level, not UI)
  • [ 8] Key sharing (protocol level, not UI)
  • [13] Cross-signing (protocol level, not UI)
  • [21] Two-way migration for labs flag, allowing users to "switch" between implementations
    • Potential to implement this as an implementation which writes to both stores saving us from migration

Phase 2: Establish trust in the plan

  • [ 8] Benchmark old crypto & new crypto to establish performance targets
  • [??] Tests which prove old crypto was working
    • "Working" is defined as behavioural traits, not necessarily bug-free.
  • [??] Tests which prove the new crypto isn't any more broken than old

Phase 3: Build a plausible client

  • [??] Self verification
  • [??] Other user verification
  • [??] Visual indicators for user trust (cross-signing, 4S)
  • [??] UI bits for key backup, key sharing, and cross-signing
  • [??] Manual key export
  • [??] Historical key sharing (for room history)
  • [??] Device management

Phase 4: Polish and remaining bits

  • [13] Support for customisation endpoints/modules as needed
  • [13] MCS integration (if needed)
  • [??] Device dehydration
  • [??] Functions required by Element Call and widgets (custom to-device messages?)
  • [??] Posthog metrics
  • [??] TBD stuff from https://github.com/matrix-org/matrix-rust-sdk/milestone/1
  • [??] Get design involved for migration experience

Phase 5: Stability

  • [??] Enable by default on Nightly and Develop (not production, EMS, app, or staging)
  • [??] Fix bugs & build comfort
  • [??] Enable by default in production (EMS, app, and staging alongside existing develop channels)
  • [??] Fix bugs & build comfort

Phase 6: Release

  • [??] Convert migration to a one-way migration
  • [??] Remove old crypto code (keep migrator)
  • [??] Remove labs flag
  • [??] Eternal maintenance
@turt2live turt2live added A-Performance Security A-E2EE T-Enhancement O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience T-Epic Issue is at Epic level Team: App labels Jun 28, 2022
@turt2live turt2live self-assigned this Jun 28, 2022
@turt2live
Copy link
Member Author

argh, except a tracker already exists for this: #21972

@turt2live turt2live closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE A-Performance O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience Security T-Enhancement T-Epic Issue is at Epic level Team: App
Projects
None yet
Development

No branches or pull requests

1 participant