[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 6 Jun 2019 14:51:06 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Iuliana Prodan <iuliana.prodan@....com>
Cc: Horia Geanta <horia.geanta@....com>,
Aymen Sghaier <aymen.sghaier@....com>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-imx <linux-imx@....com>
Subject: Re: [PATCH v5 1/2] crypto: caam - fix pkcs1pad(rsa-caam, sha256)
failure because of invalid input
On Tue, May 28, 2019 at 12:52:10PM +0300, Iuliana Prodan wrote:
> The problem is with the input data size sent to CAAM for encrypt/decrypt.
> Pkcs1pad is failing due to pkcs1 padding done in SW starting with0x01
> instead of 0x00 0x01.
> CAAM expects an input of modulus size. For this we strip the leading
> zeros in case the size is more than modulus or pad the input with zeros
> until the modulus size is reached.
>
> Signed-off-by: Iuliana Prodan <iuliana.prodan@....com>
> ---
> Changes since V4:
> - return -ENOMEM in case zero_buffer cannot be allocated.
> ---
> drivers/crypto/caam/caampkc.c | 89 ++++++++++++++++++++++++++++++++++---------
> drivers/crypto/caam/caampkc.h | 2 +
> 2 files changed, 74 insertions(+), 17 deletions(-)
All applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists