Re: [PATCH 2/2] chacha20poly1305: Skip encryption/decryption for 0-len

2015-12-09 Thread Herbert Xu
On Sun, Dec 06, 2015 at 02:51:38AM +0100, Jason A. Donenfeld wrote: > If the length of the plaintext is zero, there's no need to waste cycles > on encryption and decryption. Using the chacha20poly1305 construction > for zero-length plaintexts is a common way of using a shared encryption > key for

[PATCH 2/2] chacha20poly1305: Skip encryption/decryption for 0-len

2015-12-05 Thread Jason A. Donenfeld
If the length of the plaintext is zero, there's no need to waste cycles on encryption and decryption. Using the chacha20poly1305 construction for zero-length plaintexts is a common way of using a shared encryption key for AAD authentication. Signed-off-by: Jason A. Donenfeld Cc: