[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-1GsWEkecDrExCn@gondor.apana.org.au>
Date: Wed, 2 Apr 2025 22:16:17 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: T Pratham <t-pratham@...com>
Cc: "David S. Miller" <davem@...emloft.net>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, Vignesh Raghavendra <vigneshr@...com>,
Praneeth Bajjuri <praneeth@...com>,
Kamlesh Gurudasani <kamlesh@...com>,
Manorit Chawdhry <m-chawdhry@...com>
Subject: Re: [PATCH RFC 1/2] crypto: ti: Add support for SHA224/256/384/512
in DTHE V2 driver
On Wed, Apr 02, 2025 at 07:42:08PM +0530, T Pratham wrote:
>
> Thanks! I'm assuming then count[1] will store the digest count in sha512
> here.
count[1] contains the upper 64 bits of the 128-bit sha512 counter.
> Is this the same for SHA256? Since there the count is not an array, so
> is it then count = (digestcnt << 32) & buflen?
The sha256 counter is only 64 bits long, so only count[0] gets
written out. There is no need to do any shifting for either sha256
or sha512, it should just be:
count = digestcnt + buflen;
Where digestcnt is a multiple of blocksize and buflen is less than
blocksize.
Cheers,
--
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