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, Dec 24, 6:22 AM
Unknown Object (File)
Tue, Dec 24, 6:22 AM
Unknown Object (File)
Tue, Dec 24, 6:22 AM
Unknown Object (File)
Tue, Dec 24, 6:22 AM
Unknown Object (File)
Tue, Dec 24, 6:22 AM
Unknown Object (File)
Fri, Dec 20, 10:53 AM
Unknown Object (File)
Thu, Dec 5, 8:56 AM
Unknown Object (File)
Sun, Dec 1, 6:25 AM
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
No Lint Coverage
Unit
No Test Coverage

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

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.