Re: [PATCH 1/4] crypto4xx: fix ctr-aes missing output IV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 22, 2019 at 01:25:58PM +0200, Christian Lamparter wrote:
> Commit 8efd972ef96a ("crypto: testmgr - support checking skcipher output IV")
> caused the crypto4xx driver to produce the following error:
> 
> | ctr-aes-ppc4xx encryption test failed (wrong output IV)
> | on test vector 0, cfg="in-place"
> 
> This patch fixes this by reworking the crypto4xx_setkey_aes()
> function to:
> 
>  - not save the iv for ECB (as per 18.2.38 CRYP0_SA_CMD_0:
>    "This bit mut be cleared for DES ECB mode or AES ECB mode,
>    when no IV is used.")
> 
>  - instruct the hardware to save the generated IV for all
>    other modes of operations that have IV and then supply
>    it back to the callee in pretty much the same way as we
>    do it for cbc-aes already.
> 
>  - make it clear that the DIR_(IN|OUT)BOUND is the important
>    bit that tells the hardware to encrypt or decrypt the data.
>    (this is cosmetic - but it hopefully prevents me from
>     getting confused again).
> 
>  - don't load any bogus hash when we don't use any hash
>    operation to begin with.
> 
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Christian Lamparter <chunkeey@xxxxxxxxx>
> ---
>  drivers/crypto/amcc/crypto4xx_alg.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux