This repository was archived by the owner on Feb 26, 2021. It is now read-only.
This repository was archived by the owner on Feb 26, 2021. It is now read-only.
cryptoChallenge allows server to trick client into signing arbitrary messages #57
Open

Description
The scheme used to authenticate that the client owns a given peerid is to give them a random nonce to sign, but there is no way for the client to know that what they're signing is actually random data versus data they don't want to sign. For example, a hash of a message they didn't write.
A better scheme is for the server to encrypt the nonce, then have the client decrypt it and send back a hash of the nonce. The hash is important to prevent the server from tricking the client into decrypting arbitrary ciphertexts.