2
$\begingroup$

As I know chacha20-poly1305 is stream cipher. Does that mean for every encryption process require a new key?

$\endgroup$
6
$\begingroup$

You do not require a new key. You use a different initialization vector (IV) for every message.

As long as you use a different pair of (key, nonce) for each message you retain the confidentiality and integrity of messages. The nonce is the initialization vector.

$\endgroup$
  • $\begingroup$ Does that mean it wok like Aes-GCM? $\endgroup$ – Aymn Alaney Sep 10 '18 at 5:17
  • $\begingroup$ @AymnAlaney Yes, ChaCha20-Poly1305 is an authenticated stream cipher, like AES-GCM. The main difference is that ChaCha20 is a native stream cipher, whereas raw AES is a block cipher that can be run in a stream mode when used with GCM (which is just CTR with GHASH authentication). $\endgroup$ – forest Sep 10 '18 at 6:15

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.