Subject: [Cfrg] Fwd: Mail regarding draft-irtf-cfrg-chacha20-poly1305

From: Yoav Nir <[email-masked]>
Date: Fri, 17 Oct 2014 19:25:43 +0300

Message from David Black:

> This nonce reuse warning in Section 4 somewhat on the light side:
> 
>   Consequences of repeating a nonce: If a nonce is repeated, then both
>   the one-time Poly1305 key and the key-stream are identical between
>   the messages.  This reveals the XOR of the plaintexts, because the
>   XOR of the plaintexts is equal to the XOR of the ciphertexts.
> 
> Here's some blunter text that could be used as a model - this was driven
> into RFC 7146 by the secdir reviewer (it applies to all stream ciphers
> and all modes that behave like stream ciphers):
> 
>   Of particular interest are the security considerations concerning the
>   use of AES GCM [RFC4106] and AES GMAC [RFC4543]; both modes are
>   vulnerable to catastrophic forgery attacks if a nonce is ever
>   repeated with a given key.
> 
> Thanks,
> --David
> ----------------------------------------------------
> David L. Black, Distinguished Engineer
> EMC Corporation, 176 South St., Hopkinton, MA  01748
> +1 (508) 293-7953             FAX: +1 (508) 293-7786
> [email-masked]        Mobile: +1 (978) 394-7754
> ----------------------------------------------------

---

From: Ilari Liusvaara <[email-masked]>
Date: Fri, 17 Oct 2014 19:34:35 +0300

> >   XOR of the plaintexts is equal to the XOR of the ciphertexts.

This is missing the fact that attacker can also generate forgeries for
the (key,nonce) that was repeated.

That can actually matter, if attacker can also blackhole messages or if
recipient does not do nonce-based replay detection.

> >   repeated with a given key.

Because AES-GCM equivalent to Poly1305 r depends only on key, any nonce
repeat will compromise the authenticity for the whole key in catastrophic
way.

Whereas Chacha20-Poly1305 has r depend on both key and nonce, somewhat
limiting the impact (but it is still bad).

-Ilari