From: Herbert Xu Subject: Re: [PATCH 2/2] chacha20poly1305: Skip encryption/decryption for 0-len Date: Wed, 9 Dec 2015 20:19:23 +0800 Message-ID: <20151209121923.GD27962@gondor.apana.org.au> References: <1449366698-2422-1-git-send-email-Jason@zx2c4.com> <1449366698-2422-2-git-send-email-Jason@zx2c4.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Netdev , martin@strongswan.org, stable@vger.kernel.org To: "Jason A. Donenfeld" Return-path: Content-Disposition: inline In-Reply-To: <1449366698-2422-2-git-send-email-Jason@zx2c4.com> Sender: netdev-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org 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 AAD authentication. > > Signed-off-by: Jason A. Donenfeld Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt