Commit 3e806a12 authored by Eneas U de Queiroz's avatar Eneas U de Queiroz Committed by Herbert Xu

crypto: qce - update the skcipher IV

Update the IV after the completion of each cipher operation.
Signed-off-by: default avatarEneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 3ee50c89
...@@ -21,6 +21,7 @@ static void qce_skcipher_done(void *data) ...@@ -21,6 +21,7 @@ static void qce_skcipher_done(void *data)
struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req); struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req);
struct qce_alg_template *tmpl = to_cipher_tmpl(crypto_skcipher_reqtfm(req)); struct qce_alg_template *tmpl = to_cipher_tmpl(crypto_skcipher_reqtfm(req));
struct qce_device *qce = tmpl->qce; struct qce_device *qce = tmpl->qce;
struct qce_result_dump *result_buf = qce->dma.result_buf;
enum dma_data_direction dir_src, dir_dst; enum dma_data_direction dir_src, dir_dst;
u32 status; u32 status;
int error; int error;
...@@ -45,6 +46,7 @@ static void qce_skcipher_done(void *data) ...@@ -45,6 +46,7 @@ static void qce_skcipher_done(void *data)
if (error < 0) if (error < 0)
dev_dbg(qce->dev, "skcipher operation error (%x)\n", status); dev_dbg(qce->dev, "skcipher operation error (%x)\n", status);
memcpy(rctx->iv, result_buf->encr_cntr_iv, rctx->ivsize);
qce->async_req_done(tmpl->qce, error); qce->async_req_done(tmpl->qce, error);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment