daemon: add multi-device support
Issue generated from Tuleap's migration script. Originally submitted by: Adrien Béraud (adrienberaud)
Tracking advencement for the multi-device support in the daemon.
This includes:
- Generate per-device certificates, signed with the main account certificate.
- Keep main account private key in a password-encrypted archive
- In preparation for the Blockchain username registration, generate an Ethereum key and include it in the archive.
- Publish device annoucements on a common place on the DHT.
- When calling, fetch those annoucements and call each device. When a device picks up or hangs up, hang up other device calls.
- Fetch our own annoucements to build a list of known devices for our account
- Add API to list known account devices.
- Add API to know the current device ID.
- Add API to publish the encrypted archive on the DHT, to add a new device.
- Add API to add an account on a new device using the archive from the DHT.
The archive : JSON-encoded, zlib-compressed, AES-256/Argon2 password encrypted.
The device annoucement : msgpack-encoded, signed (with account private key) OpenDHT value.
The device receipt : JSON-encoded, signed data. Rationale : since we don't have the account private key, we need some proof that the device or public ethereum key was not tempered with. The receipt and it's signature is stored in the account configuration.