Suggestion: Multiple devices
The optimal location for this suggestion is the Wiki. But I do not have access to that, so I decided to post this here. Feel free to move it and close this issue.
This is an alternative proposal for the one at http://wiki.tox.im/Multiple_Devices. A key feature is the fact that it does not require a change to the Tox network protocol and a client (such as Venom) can implement this.
_Summary:_ Instead of creating 2 identities and linking them, the same identity is shared over the 2 devices transparently. This reduces the technical complexity a lot, and reduces user confusion: Each user will have only one public key to share with his friends.
_How it works_:
Linking the devices (Sharing the identity): Alice already has an identity - which is a public/private key pair - on her PC, Alice decides to use her smartphone with Tox. Alice clicks a "Add an existing identity" button on the smartphone. Alice then inputs her public key. In the background, Alice's smartphone creates a temporarily identity and contacts Alice's PC via DHT. It then sends a "linking request", Alice accepts that request on her PC (We could make her type a secret phrase on both ends for security). Once the request is accepted, the Private/Public key pair is transferred - securely, either via DHT or p2p - from Alice's PC to Alice's smartphone. Alice's smartphone discards the temporarily identity and adopts the newly received one. Alice's smartphone then "goes online", see next section.
When a device goes online - Cooperation between devices sharing the same key: When a devices starts up / finishes the step above, it checks if another device is already online with the same public key (Scanning the DHT possibly requires a temporarily identity, correct me here). 2 Things can occur:
A: There is a device already online with that same public key: We'll call the device which is already online the "master" (the PC in Alice's case). We'll call the newly connecting device a "slave" (the smartphone in Alice's case).
The slave contacts the master via DHT (via a temporarily identity), and asks to be synced. The slave can easily prove it has possession of the same private key as the master by completing a challenge. Once this is proven, the master and the slave sync up: The slave(Smartphone) initiates a peer-to-peer connection to the master(PC), it then opts out of the DHT. Now, the phone is merely a "remote interface" to the PC, which is the actual Tox peer: Any action Alice performs on the slave(smartphone) is sent to the master (PC), only the master contacts the DHT and/or Alice's friends. Any action the PC receives from the DHT/from alice's friends is sent to the smartphone.
To sum it up, the slave is a "remote session" of the master.
B: There is no device already online with that same public key: In that case, the newly connecting devices connects normally using the normal Tox procedure, no science here. The devices then becomes the "master".
Some remarks:
- This also works with multiple slaves. The master should randomly choose a "top slave" among all the connected slaves, in case the master disconnects, the "top slave" becomes the master and the remaining slaves reconnect to their new master.
- The linking phase is really easy and already partially implemented: It is very similar to accepting a friend request.
- The entire procedure can be implemented via a client and does not require changes to the Tox network protocol. (But it's best to implement in Tox Core)
Source: irungentoo/toxcore