0
$\begingroup$

This question already has an answer here:

I read that (key, nonce) pair should be used only once for encryption of a message. My question is how confidentiality can be lost if two peers using a shared key use same (key, nonce) pair to encrypt their own messages (messages of peers would be different).

$\endgroup$

marked as duplicate by CodesInChaos Jul 23 '18 at 10:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ If you reuse a (key,nonce) pair with a stream cipher (like ChaCha) you leak the XOR of the encrypted messages. $\endgroup$ – SEJPM Jul 23 '18 at 9:38
  • $\begingroup$ Using the same (key, nonce) in a streamcipher means you're getting the same key stream. Breaking those is equivalent to breaking a one-time-pad with key reuse. $\endgroup$ – CodesInChaos Jul 23 '18 at 10:23