The public private key pair should not be transferred manually from one client to another. Therefore, we save the publicKey, privateKey (encrypted with the password & salt from the user) and the salt in the DHT.
Add the following:
- Join network without any key pair (
Client#initPeerDht)
- Fetch public key, private key and salt from the DHT
- Generate secret key for the user using the pw and the salt
- Add secret key to the user
- Decrypt the private key using the secret key from the user
- Set public private key pair in PeerDHT
Blocker: tomp2p/TomP2P#123