sipb / uplink

SIPB's integrated chatroom project
GNU Affero General Public License v3.0
6 stars 1 forks source link

Debug end-to-end encryption #96

Open gabrc52 opened 1 year ago

gabrc52 commented 1 year ago

It appears that end-to-end encryption issue are somewhat common(!) So we need to test which setups result in end-to-end encryption woes. This could kill the entire effort.

For now let's assume 2-device setups of laptop and phone. Let's try doing some 6.102 partitioning:

gabrc52 commented 1 year ago

Test suite 1

Cartesian product on ('iOS', 'Android'), (mobile, web), (send encrypted message after first login, send encrypted message after second login).

What is kept consistent is:

Normal-ish tests (baseline):

For consistency these tests will all use Chrome on Linux and uplink.mit.edu as the homserver and hosted Element instance. They will all use regular password-based accounts.

  1. Sign up from iOS, send an encrypted message, log in from web
  2. Sign up from Android, send an encrypted message, log in from web
  3. Sign up from web, send an encrypted message, log in from iOS
  4. Sign up from web, send an encrypted message, log in from Android

Testing what happens if there is more than one device by the time when the first end-to-end encrypted device is sent

  1. Sign up from iOS, log in from web, send an encrypted message
  2. Sign up from Android, log in from web, send an encrypted message
  3. Sign up from web, log in from iOS, send an encrypted message
  4. Sign up from web, log in from Android, send an encrypted message
gabrc52 commented 1 year ago

https://docs.google.com/document/d/14N5Pg5NFpxz9jb-TdQntd4iy_5fGNk3cS7YQ42UqODM/edit

I tested a couple cases and mostly everything worked. Found other minor bugs.

Having 2 devices wasn't an issue, but having only one at a time may (I was able to reproduce the "room upgrade" bug which led to broken UI), but it was recoverable by setting up secure backup then verifying.