]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccp - Fix 3DES complaint from ccp-crypto module
authorHook, Gary <Gary.Hook@amd.com>
Tue, 14 May 2019 21:53:30 +0000 (21:53 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 May 2019 06:01:07 +0000 (14:01 +0800)
commit7527e7eb36dad5f77a576f383009550e117708d7
treec2c7fdbc3b090914cc19fa14ed6d52978a6279bd
parent816754ae882c93a21aa360e1e3989bdc481d6d41
crypto: ccp - Fix 3DES complaint from ccp-crypto module

Crypto self-tests reveal an error:

alg: skcipher: cbc-des3-ccp encryption test failed (wrong output IV) on test vector 0, cfg="in-place"

The offset value should not be recomputed when retrieving the context.
Also, a code path exists which makes decisions based on older (version 3)
hardware; a v3 device deosn't support 3DES so remove this check.

Fixes: 6972cf1e9faf ('crypto: ccp - Enable 3DES function on v5 CCPs')
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-ops.c