Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: David Yang <mmyangfl@gmail.com>
Cc: linux-crypto@vger.kernel.org, Weili Qian <qianweili@huawei.com>,
	Zhou Wang <wangzhou1@hisilicon.com>,
	"David S. Miller" <davem@davemloft.net>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] crypto: hisilicon/advca - Add SHA support
Date: Fri, 19 May 2023 16:43:07 +0800	[thread overview]
Message-ID: <ZGc2m5dJh79y3pxO@gondor.apana.org.au> (raw)
In-Reply-To: <20230513074339.266879-3-mmyangfl@gmail.com>

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

  parent reply	other threads:[~2023-05-19  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-13  7:43 [PATCH v2 0/2] crypto: hisilicon - Add HiSilicon ADVCA Subsystem David Yang
2023-05-13  7:43 ` [PATCH v2 1/2] " David Yang
2023-05-13  8:42   ` kernel test robot
2023-05-24 10:45   ` Philipp Zabel
2023-05-13  7:43 ` [PATCH v2 2/2] crypto: hisilicon/advca - Add SHA support David Yang
2023-05-13  9:05   ` kernel test robot
2023-05-19  8:43   ` Herbert Xu [this message]
2023-05-19 19:03     ` Yangfl
2023-05-24 10:15       ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZGc2m5dJh79y3pxO@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=qianweili@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox