On Thu, May 28, 2015 at 02:23:33PM -0700, Tim Chen wrote: > > Quick question. When src and dst are different, the above code > leave space for the assoc data in dst. However, I don't think we copy > over the assoc data from src to dst. > I assume we don't have to do that, right? If so, we have not > initialized assoc in dst. This won't be a problem, will it? It shouldn't be an issue. If you look at the documentation for aead_rquest_set_crypt, it says: * The content of the AD in the destination buffer after processing * will either be untouched, or it will contain a copy of the AD * from the source buffer. In order to ensure that it always has * a copy of the AD, the user must copy the AD over either before * or after processing. Of course this is not relevant if the user * is doing in-place processing where src == dst. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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