Re: [RESEND PATCH 05/10] crypto: sha256_generic: Export the Transform function

From: Keerthy
Date: Fri Jun 28 2019 - 01:27:15 EST




On 28/06/19 10:39 AM, Eric Biggers wrote:
On Fri, Jun 28, 2019 at 09:57:40AM +0530, Keerthy wrote:
The transform function can be used as is by other crypto
drivers that need to transform the 256 bit key using cpu.
Hence export it.

What is this supposed to mean? SHA-256 is an unkeyed hash function.

HMAC-SHA256 my bad.


Also, you need to actually explain why this is needed. If your hardware
supports SHA-256, why do you need to use the C sha256_transform()?

Hardware supports only HMAC from pre-computed inner and outer digests is supported, i.e. the host must carry out initial preparation stage to
generate intermediate hash state for both inner pad and outer pad.

Hence the need to export the transform function. I will add it in the commit message.


- Eric