0

Wouldn't it be more efficient if the client initiated the connection by generating their own message, and encrypting it using their private key, then sending both messages to the server so it would decrypt and compare the messages?

2
  • 3
    That would allow for a replay of that message. Making the server generate the message (and having a large enough nonce) ensures that replay attacks are not possible. – vidarlo Sep 12 '20 at 10:01
  • Makes sense, thank you. You could post it as an answer to close the question. – Muizz Mahdy Sep 12 '20 at 11:21
3

This would essentially allow for a replay attack. Capture the messages, and replay at a later time. To avoid this the server would have to store all previously seen values, to ensure no reuse.

However, by making the server send the nonce, and making it sufficiently big, we can be fairly certain that someone in fact posesses the key if the can return a reply that matches the nonce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.