linux_old1/drivers/crypto/caam
David Gstir 854b06f768 crypto: caam - properly set IV after {en,de}crypt
Certain cipher modes like CTS expect the IV (req->info) of
ablkcipher_request (or equivalently req->iv of skcipher_request) to
contain the last ciphertext block when the {en,de}crypt operation is done.
This is currently not the case for the CAAM driver which in turn breaks
e.g. cts(cbc(aes)) when the CAAM driver is enabled.

This patch fixes the CAAM driver to properly set the IV after the
{en,de}crypt operation of ablkcipher finishes.

This issue was revealed by the changes in the SW CTS mode in commit
0605c41cc5 ("crypto: cts - Convert to skcipher")

Cc: <stable@vger.kernel.org> # 4.8+
Signed-off-by: David Gstir <david@sigma-star.at>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-07-12 18:38:07 +08:00
..
Kconfig crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
Makefile crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
caamalg.c crypto: caam - properly set IV after {en,de}crypt 2017-07-12 18:38:07 +08:00
caamalg_desc.c crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
caamalg_desc.h crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
caamalg_qi.c crypto: caam - fix gfp allocation flags (part II) 2017-06-22 16:47:23 +08:00
caamhash.c crypto: caam - fix signals handling 2017-07-12 18:38:04 +08:00
caampkc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-07-05 15:17:26 +08:00
caampkc.h crypto: caam - add support for RSA key form 3 2017-05-18 13:19:51 +08:00
caamrng.c crypto: caam - trivial code clean-up 2016-11-13 17:45:12 +08:00
compat.h crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +08:00
ctrl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-04-05 21:57:07 +08:00
ctrl.h crypto: caam - fix ERA retrieval function 2014-02-09 09:59:27 +08:00
desc.h crypto: caam - move sec4_sg_entry to sg_sw_sec4.h 2016-11-13 17:45:14 +08:00
desc_constr.h crypto: caam - avoid double inclusion in desc_constr.h 2017-03-24 22:02:59 +08:00
error.c crypto: caam - don't include unneeded headers 2017-02-15 13:23:36 +08:00
error.h crypto: caam - Contain caam_jr_strstatus() ugliness 2014-05-08 21:58:06 +08:00
intern.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-04-05 21:57:07 +08:00
jr.c crypto: caam - make of_device_ids const. 2017-06-20 11:21:49 +08:00
jr.h crypto: caam - Add API's to allocate/free Job Rings 2013-10-30 12:02:57 +08:00
key_gen.c crypto: caam - fix signals handling 2017-07-12 18:38:04 +08:00
key_gen.h crypto: caam - consolidate split key length computation 2016-11-28 21:23:23 +08:00
pdb.h crypto: caam - add support for RSA key form 3 2017-05-18 13:19:51 +08:00
pkc_desc.c crypto: caam - add support for RSA key form 3 2017-05-18 13:19:51 +08:00
qi.c crypto: caam - fix error return code in caam_qi_init() 2017-04-21 20:30:37 +08:00
qi.h crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
regs.h crypto: caam - treat SGT address pointer as u64 2016-10-02 22:33:45 +08:00
sg_sw_qm.h crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
sg_sw_sec4.h crypto: caam - replace sg_count() with sg_nents_for_len() 2017-02-15 13:23:39 +08:00