crypto: caam - fix IV loading for authenc (giv)decryption
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 29 Aug 2016 11:52:14 +0000 (14:52 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 31 Aug 2016 14:50:42 +0000 (22:50 +0800)
commit8b18e2359aff2ab810aba84cebffc9da07fef78f
treebc19822bcae40d8fbbc9696847ff9cf522db8e59
parent31bd44e7687be8a70e1e744e5cb84974b798d568
crypto: caam - fix IV loading for authenc (giv)decryption

For algorithms that implement IV generators before the crypto ops,
the IV needed for decryption is initially located in req->src
scatterlist, not in req->iv.

Avoid copying the IV into req->iv by modifying the (givdecrypt)
descriptors to load it directly from req->src.
aead_givdecrypt() is no longer needed and goes away.

Cc: <stable@vger.kernel.org> # 4.3+
Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c