Am Donnerstag, 12. Januar 2017, 23:27:10 CET schrieb Herbert Xu: Hi Herbert, > On Thu, Jan 12, 2017 at 04:23:50PM +0100, Stephan Müller wrote: > > As far as I understand, we have the following AAD copy operations that we > > discuss: > > > > - algif_aead: you suggested to add the AAD copy operation here > > > > - AEAD implementations: over time, the AEAD implementations shall receive > > the AAD copy operation. The AAD copy operation shall only take place if > > the src SGL != dst SGL > > If and when that happens we'd simply need to remove the copy from > algif_aead code. We would only be able to remove it if all AEAD implementations are converted. But for the conversion time, we do face that issue. > But even if we didn't you wouldn't have two copies > because algif_aead should invoke the in-place code-path after doing > a full copy of src to dst. Are you suggesting that the entire data in the src SGL is first copied to the dst SGL by algif_aead? If yes, that still requires significant src/dst SGL tinkering as we have the tag -- the src SGL for encrypt does not have the tag space where the dst SGL for encrypt is required to have the tag size. This is vice versa for the decryption operation. And to me the most elegant solution seems adding the copy operation to crypto_aead_[en|de]crypt. Ciao Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html