Re: [PATCH 1/2] crypto: atmel-tdes - Set the IV after {en,de}crypt

From: Herbert Xu
Date: Fri Nov 22 2019 - 06:10:11 EST


On Fri, Nov 15, 2019 at 01:49:06PM +0000, Tudor.Ambarus@xxxxxxxxxxxxx wrote:
> From: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>
>
> The req->iv of the skcipher_request is expected to contain the
> last ciphertext block when the {en,de}crypt operation is done.
> In case of in-place decryption, copy the ciphertext in an
> intermediate buffer before decryption.
>
> This fixes the following tcrypt tests:
> alg: skcipher: atmel-cbc-des encryption test failed (wrong output IV) on test vector 0, cfg="in-place"
> 00000000: fe dc ba 98 76 54 32 10
> alg: skcipher: atmel-cbc-tdes encryption test failed (wrong output IV) on test vector 0, cfg="in-place"
> 00000000: 7d 33 88 93 0f 93 b2 42
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>
> ---
> drivers/crypto/atmel-tdes.c | 40 ++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 38 insertions(+), 2 deletions(-)

All applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt