core: support message signing in p2p groups (#7312)

* core: support message signing in p2p groups

* improve

* add member key

* distribute keys and sign

* refactor

* better query

* map

* sign in relay groups too

* clean up

* list

* fix test

* update bot types

* some refactor

* remove unnecessary condition

* simplify

* refactor

* simplify

* move

* clean up

* diff

* diff

* limit attempts for key sending

* optimize

* fix test

* split

* fuse

* null

* only mark as "key sent" when forwarder supports binary encoding

* fix bot apis

* fix some tests

* add key distribution steps, and fix some tests

* fix test

* increase timeout

* fix tests

* fix more tests

* simplify

* disable test output

* mark keys sent with invitations

* fix test

* fix test, query plans

* unify signing of connection info packets

* revert change to createNewGroup

* create key at group/member creation

* rename, remove liftIO

* clean up

* fix type

* remove ad hoc key sending

* update bot api

* diff

* reduce diff

* failing test

* fix sending messages in groups with members before version 18

* remove test delays

* update query plans

* update test

* add tests

* fix tests

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-09-11 12:33:07 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat
parent ecdc518d4c
commit 44773d0412
26 changed files with 1126 additions and 552 deletions
@@ -103,6 +103,7 @@ class GroupDeletedUser(TypedDict):
user: "T.User"
groupInfo: "T.GroupInfo"
msgSigned: bool
localDeletion: bool
class GroupLink(TypedDict):
type: Literal["groupLink"]
@@ -1898,8 +1898,7 @@ class GroupInfo(TypedDict):
groupDomainVerified: NotRequired[bool]
class GroupKeys(TypedDict):
publicGroupId: str
groupRootKey: "GroupRootKey"
publicGroupKeys: NotRequired["PublicGroupKeys"]
memberPrivKey: str
class GroupLink(TypedDict):
@@ -2490,6 +2489,10 @@ class PublicGroupAccess(TypedDict):
class PublicGroupData(TypedDict):
publicMemberCount: int # int64
class PublicGroupKeys(TypedDict):
publicGroupId: str
groupRootKey: "GroupRootKey"
class PublicGroupProfile(TypedDict):
groupType: "GroupType"
groupLink: str