[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <VI1PR04MB4445047FD7ABADD93F3D70338CDC0@VI1PR04MB4445.eurprd04.prod.outlook.com>
Date: Tue, 30 Jul 2019 12:27:56 +0000
From: Iuliana Prodan <iuliana.prodan@....com>
To: Herbert Xu <herbert@...dor.apana.org.au>,
Horia Geanta <horia.geanta@....com>,
Aymen Sghaier <aymen.sghaier@....com>
CC: "David S. Miller" <davem@...emloft.net>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH v4 10/14] crypto: caam - fix MDHA key derivation for
certain user key lengths
On 7/30/2019 2:06 PM, Iuliana Prodan wrote:
> From: Horia Geantă <horia.geanta@....com>
>
> Fuzz testing uncovered an issue when |user key| > |derived key|.
> Derived key generation has to be fixed in two cases:
>
> 1. Era >= 6 (DKP is available)
> DKP cannot be used with immediate input key if |user key| > |derived key|,
> since the resulting descriptor (after DKP execution) would be invalid -
> having a few bytes from user key left in descriptor buffer
> as incorrect opcodes.
>
> Fix DKP usage both in standalone hmac and in authenc algorithms.
> For authenc the logic is simplified, by always storing both virtual
> and dma key addresses.
>
> 2. Era < 6
> The same case (|user key| > |derived key|) fails when DKP
> is not available.
> Make sure gen_split_key() dma maps max(|user key|, |derived key|),
> since this is an in-place (bidirectional) operation.
>
> Signed-off-by: Horia Geantă <horia.geanta@....com>
> ---
Reviewed-by: Iuliana Prodan <iuliana.prodan@....com>
Thanks,
Iulia
Powered by blists - more mailing lists