Page MenuHomePhabricator

[web] Olm session creation between own devices
ClosedPublic

Authored by michal on Mar 15 2024, 10:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 1:50 AM
Unknown Object (File)
Tue, Apr 23, 1:50 AM
Unknown Object (File)
Tue, Apr 23, 1:50 AM
Unknown Object (File)
Tue, Apr 23, 1:49 AM
Unknown Object (File)
Tue, Apr 23, 1:47 AM
Unknown Object (File)
Mon, Apr 8, 5:42 AM
Unknown Object (File)
Sat, Apr 6, 7:27 AM
Unknown Object (File)
Sat, Mar 30, 5:01 PM
Subscribers

Details

Summary

ENG-7221 : Tunnelbroker session creation on web

Now that we have a proper olm session persistance on web we can implement testing screens for peer to peer message sending, and creating sessions between own devices.

getContentSigningKey and createOlmSessionsWithOwnDevices functions have been moved from native to lib and updated to use the cross-platform APIs.

Depends on D11340

Test Plan

Created sessions from web to native and tried sending messages both ways. Repeated with native creating the session to web. In both cases the messages where successfully ecnrypted/decrypted.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil added inline comments.
lib/utils/crypto-utils.js
17–18 ↗(On Diff #38106)

can be merged

63 ↗(On Diff #38106)

we can add a log that key's set is missing for this device

This revision is now accepted and ready to land.Mar 18 2024, 6:09 AM
lib/utils/crypto-utils.js
47 ↗(On Diff #38177)

Thought I had while reading the code, that's not relevant to this diff, and doesn't affect the current (imperative) usage of this function in the debug menus:

We'll probably eventually want this function to only create Olm sessions with the devices that don't currently already have sessions. There's a risk that it fails to create a session (if one-time keys are missing, or perhaps a race condition), so we should be able to call it again later and create only the sessions that were missed.