]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - update IV using HW support
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 10 Jun 2019 13:30:59 +0000 (16:30 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Jun 2019 06:18:33 +0000 (14:18 +0800)
commitb946a63ebd32ac4fb07c4217ef5dbf3667f7dc19
treecdca67aac29710e65aa0d36515d6b965a04ac20e
parent9b23feeec2bbf8232b25a83920fe72504d75418b
crypto: caam - update IV using HW support

Modify drivers to perform skcipher IV update using the crypto engine,
instead of performing the operation in SW.

Besides being more efficient, this also fixes IV update for CTR mode.

Output HW S/G table is appended with an entry pointing to the same
IV buffer used as input (which is now mapped BIDIRECTIONAL).

AS (Algorithm State) parameter of the OPERATION command is changed
from INIFINAL to INIT in descriptors used by ctr(aes), cbc(aes).
This is needed since in case FINAL bit is set, HW skips IV updating
in the Context Register for the last data block.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_desc.c
drivers/crypto/caam/caamalg_desc.h
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi2.c