From 85c5ed42fe62f29738ca0c25ead7424d5d692537 Mon Sep 17 00:00:00 2001 From: emdee Date: Mon, 3 Oct 2022 19:55:42 +0200 Subject: [PATCH] Update 'MultiDevice Announcements POC' --- MultiDevice-Announcements-POC.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/MultiDevice-Announcements-POC.md b/MultiDevice-Announcements-POC.md index 2d43f74..c46c3fe 100644 --- a/MultiDevice-Announcements-POC.md +++ b/MultiDevice-Announcements-POC.md @@ -68,6 +68,34 @@ Unknown for now is does the client have to send an add request to the new ToxID Either way the clients would manage this seemlessly to aggregate the two ToxIDs together under one Persona that is shown to the user. The library does most of this by accepting the update from the blob to update the table pointing from PersonaID to the new ToxID. +## MultiDevice Groups + +Previously, we described in [[MultiDeviceInitialization]] we simply copy a profile to a new devices and change the public/private keys as a starting point. + +But we are left with as special problem with NGC groups. + +The code is assumed to have been modified to handle Personas and, at first glance, NGC groups become groups of Personas. Each member of the group is a Persona, and uses the table lookup to get the active ToxID. + +But the group structure in the profile has a copy of the founder's shared_state.founder_public_key (group_pack.c#L293) So if the profile being copied onto a new device is the profile of the founder, then this key would need to be updated too. + +Besides the group keypair in #L351-2 +* bin_pack_bin(bp, chat->chat_public_key, EXT_PUBLIC_KEY_SIZE); // 1 +* bin_pack_bin(bp, chat->chat_secret_key, EXT_SECRET_KEY_SIZE); // 2 + +The chat->chat_secret_key is all zeros, I assume in everyone but the founder's +profile. + +it seems also that self's keypair are saved to the group: +* self_public_key #L353 +* self_secret_key #L354 + +Are these simply the keypair of the Persona that is the new profile? If so, then these keys have to be updated with the new keypair of the new profile. + +There is Pythonscript to parse profiles that could be modified to rekey them at: +https://git.plastiras.org/emdee/tox_profile + + + In order for MultiDevice to work, we need to bootstrap a new devices from an existing profile. We assume all clients use a common tox profile format, though