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-1BnSGNab34W6eU@gondor.apana.org.au>
Date: Wed, 2 Apr 2025 21:54:37 +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:01:25PM +0530, T Pratham wrote:
> 
> How are you planning to restore such states in import if the export is
> to be made compatible with sha512_state? Do you have any pointers for me
> on how to change the import/export before sending the next revision of
> my driver?

In struct sha512_state buflen is simply stored in the lower bits of
count[0].  So when you import count[0] you can derive buflen from it
as

	buflen = count[0] & (SHA512_BLOCK_SIZE - 1);

Of course when you're exporting don't forget to put buflen into
the lower bits of count[0] before you write it 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