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)
Thu, Jun 27, 3:58 AM
Unknown Object (File)
Tue, Jun 25, 6:33 PM
Unknown Object (File)
Sun, Jun 23, 4:03 AM
Unknown Object (File)
Sat, Jun 22, 3:31 AM
Unknown Object (File)
Fri, Jun 21, 1:55 PM
Unknown Object (File)
Fri, Jun 14, 2:55 AM
Unknown Object (File)
Fri, Jun 14, 1:18 AM
Unknown Object (File)
Thu, Jun 13, 8:09 PM
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