OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:50 +0000 (14:50 +0100)
commitbf53cf6a38dcd8d503d3abc82f8cc2eca7be03ed
treeaf5672b8901612fb9be05e68002460c60d671594
parentcbb94bcb39730d97202016bf3b111cda23656f87
crypto: ccp - Fix 3DES complaint from ccp-crypto module

[ Upstream commit 89646fdda4cae203185444ac7988835f36a21ee1 ]

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: 990672d48515 ('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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ccp/ccp-ops.c