oxen-io / libsession-util

Session utilities library
GNU General Public License v3.0
15 stars 16 forks source link

Removed the default rekey from the Keys init #81

Closed mpretty-cyro closed 6 months ago

mpretty-cyro commented 6 months ago

There is a fun behaviour where when one device creates a group and adds members it generates an initial key (containing the members) but when a linked device creates an empty group state (pending the first poll) it ends up generating a new keys with no members.

Since the key used for encryption is based on the created timestamp this second "empty" key ends up incorrectly getting used.

This PR removes the default rekey that was called when initialising the Keys object, devs will need to manually call it when they are ready to create the initial key (this way the linked device won't create an invalid "empty" key).