lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-5IaY0JoTYcx1JW@gondor.apana.org.au>
Date: Thu, 3 Apr 2025 16:35:53 +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 Thu, Apr 03, 2025 at 01:58:47PM +0530, T Pratham wrote:
>
> I'm so sorry, for it slipped out of my mind that `u8 phash_available`
> also needs to be restored at import. It's just stores a boolean 0/1. How
> to go about handling this?

You should be able to derive that from digestcnt.  IOW if you have
previously submitted data to the hardware, then phash is available,
and vice versa.

Note that if you go down this route (which many drivers do), then
you're going to need to initialise a zero hash partial state in
the export function like this:

static int ahash_export_zero(struct ahash_request *req, void *out)
{
	HASH_FBREQ_ON_STACK(fbreq, req);
 
	return crypto_ahash_init(fbreq) ?:
	       crypto_ahash_export(fbreq, out);
}

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ