]> 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)
commit91b6f6a1e607a023a5e75e8ea7ca024a47003560
treecdca67aac29710e65aa0d36515d6b965a04ac20e
parent7fb464d63db2cf7aed26c11240b7fb96799fe753
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