Description
Introduce functionality to core that helps to setup a second device with all contacts, chats, messages and crypto keys.
For this we need to establish a trusted network transport between two DC apps. Core could integrate libp2p
in order to establish e2e-encrypted communication between two cores. The address information and a pre-shared key for the e2e-encryption could be transferred through a QR Code, for example a "Request Device Setup" code containing address info and maybe an ephemeral key. The existing DC device can scan this, the user is asked to confirm "do you want to transfer your setup to ..." and if so, will use libp2p and the QR-data to establish a safe connection between the two devices. With #1729 implemented we can then reuse the streamable export/import functionality to complete the setup of the second device.
This issue supsersedes #803 which discusses another way to establish a connection through WLAN with SKT (https://0xacab.org/dkg/openpgp-skt/blob/master/skt-server.c). Given that libp2p
already exists as a crate and is used from several projects, it makes more sense to use that.
Update: See #1954 for a PR that was postponed; some work was already started there.
We first planned to use libp2p but the noise protocol is probably better.