]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - strip input without changing crypto request
authorIuliana Prodan <iuliana.prodan@nxp.com>
Tue, 28 May 2019 09:52:11 +0000 (12:52 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Jun 2019 06:38:57 +0000 (14:38 +0800)
commit251a7dece53cff61e8193844d595df484c82ebd4
tree937f713b44e07c5d3ef54e03b3fff0506ac0eb03
parente8dd2e387f71b3d147031400c03ecfa1c78e1655
crypto: caam - strip input without changing crypto request

For rsa and pkcs1pad, CAAM expects an input of modulus size.
For this we strip the leading zeros in case the size is more than modulus.
This commit avoids modifying the crypto request while stripping zeros from
input, to comply with the crypto API requirement. This is done by adding
a fixup input pointer and length.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caampkc.c
drivers/crypto/caam/caampkc.h