crypto: sahara - fix cbc selftest failure
authorOvidiu Panait <ovidiu.panait@windriver.com>
Fri, 1 Dec 2023 17:06:20 +0000 (19:06 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Dec 2023 03:59:45 +0000 (11:59 +0800)
commit9f10bc28c0fb676ae58aa3bfa358db8f5de124bb
treecff631639412f27740427aee907a640b1e3ae683
parent8fd183435728b139248a77978ea3732039341779
crypto: sahara - fix cbc selftest failure

The kernel crypto API requires that all CBC implementations update the IV
buffer to contain the last ciphertext block.

This fixes the following cbc selftest error:
alg: skcipher: sahara-cbc-aes encryption test failed (wrong output IV) on
test vector 0, cfg="in-place (one sglist)"

Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.")
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sahara.c