HomePhabricator
Diffusion Comm 28edf256514a

[lib] add session version to EncryptedData

Description

[lib] add session version to EncryptedData

Summary:
ENG-6982.

When there are multiple messages queued for the device, and we start resetting the session the messages already queued will for sure fail to be decrypted - to distinguish that and avoid resetting the session multiple times we need to add the session version to each message. This is optional to backward compatibility and to avoid adding this for notif when this is not needed.

Depends on D13032

Test Plan:

  1. Create a session between devices A and B
  2. On B comment out sending confirmation.
  3. Send some messages from A to B
  4. Receive couple of messages from B
  5. Reset session
  6. Make sure other messages throws INVALID_SESSION_VERSION error when decrypting

Reviewers: tomek, marcin

Reviewed By: tomek, marcin

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13033

Details

Provenance
kamilAuthored on Aug 8 2024, 7:37 AM
Reviewer
tomek
Differential Revision
D13033: [lib] add session version to EncryptedData
Parents
rCOMM84a3b0a52f69: [lib] refactor sequential handling of Tunnelbroker messages
Branches
Unknown
Tags
Unknown