Thread (4 messages) flat view 4 messages, 3 authors, 2019-01-23

Re: [PATCH] crypto: caam - fix setting IV after decrypt

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2018-12-13 10:20:18
Also in: stable

Horia Geanta [off-list ref] wrote:
On 12/7/2018 1:32 PM, Sascha Hauer wrote:
quoted
The crypto API wants the updated IV in req->info after decryption. The
updated IV used to be copied correctly to req->info after running the
decryption job. Since 115957bb3e59 this is done before running the job
so instead of the updated IV only the unmodified input IV is given back
to the crypto API.
Saving IV before running the decryption was done to address in-place cbc
decryption - when the last block is overwritten with plaintext before having the
chance to copy it.
The API expects the IV to be set to the next IV value so that
chaining can be performed.  This can mean different things depending
on the algorithm.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help