Page MenuHomePhabricator

[native] implement creating `olm` session with own devices
ClosedPublic

Authored by kamil on Dec 18 2023, 5:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 5:38 PM
Unknown Object (File)
Tue, Nov 26, 3:00 PM
Unknown Object (File)
Fri, Nov 8, 7:06 AM
Unknown Object (File)
Oct 22 2024, 4:41 PM
Unknown Object (File)
Oct 22 2024, 4:41 PM
Unknown Object (File)
Oct 22 2024, 4:41 PM
Unknown Object (File)
Oct 22 2024, 4:40 PM
Unknown Object (File)
Oct 18 2024, 6:55 AM
Subscribers

Details

Summary

Code that fetches all devices of the user, creates outbound session with each of them, and sends an encrypted message via Tunnelbroker

Depends on D10380

Test Plan

Call this method and verify result

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 18 2023, 6:54 AM
native/utils/crypto-utils.js
160 ↗(On Diff #34795)

Can you split this string so the lines stay to 80 char width?

native/utils/crypto-utils.js
123 ↗(On Diff #34795)

I discussed with @kamil what happens if we call this method and session with a certain user already exists. I was told that an error will be thrown. This isn't desired behaviour since we have no way to recover but log-out if a session with a user gets corrupted. We need a way to decide for each user we attempt to create session with whether the desired behaviour if session exists is an error or overwrite.

native/utils/crypto-utils.js
123 ↗(On Diff #34795)

The desired behavior is overwrite and resend unconfirmed messages. More details in ENG-6313, but unfortunately we won't be able to get the error handling side figured out as part of this month's work.

Perhaps we could default to "overwrite" and handle the resending of unconfirmed messages later?

native/utils/crypto-utils.js
123 ↗(On Diff #34795)

Perhaps we could default to "overwrite" and handle the resending of unconfirmed messages later?

This should be one line change: https://github.com/CommE2E/comm/blob/master/native/cpp/CommonCpp/CryptoTools/CryptoModule.h#L61

  • overwrite session by default
  • make lines 80 char width
native/utils/crypto-utils.js
123 ↗(On Diff #34795)

Perhaps we could default to "overwrite" and handle the resending of unconfirmed messages later?

Yeah, let's do it

This revision is now accepted and ready to land.Jan 9 2024, 3:05 AM