lkml.org 
[lkml]   [2023]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] crypto: hisilicon/advca - Add SHA support
On Sat, May 13, 2023 at 03:43:22PM +0800, David Yang wrote:
>
> +static int hica_sha_export(const struct hica_sha_priv *priv, void *out,
> + unsigned int digestsize)
> +{
> + if (hica_sha_wait(priv, SHA_RECORD_READY))
> + return -ETIMEDOUT;
> +
> + for (unsigned int i = 0; i < digestsize; i += sizeof(u32))
> + *(u32 *) (out + i) =
> + be32_to_cpu(readl_relaxed(priv->base + SHA_OUT0 + i));
> +
> + return 0;
> +}

Can you please explain what this is doing? Is this exporting
the finalized hash, or the intermediate state?

If it's exporting the intermediate state, why aren't you implementing
an import function?

Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2023-05-19 10:43    [W:0.086 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site