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: <c86a5251-a165-41be-9238-53fb133206a4@ti.com>
Date: Wed, 2 Apr 2025 19:42:08 +0530
From: T Pratham <t-pratham@...com>
To: Herbert Xu <herbert@...dor.apana.org.au>
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 02/04/25 19:24, Herbert Xu wrote:
> 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);

Thanks! I'm assuming then count[1] will store the digest count in sha512
here.

Is this the same for SHA256? Since there the count is not an array, so
is it then count = (digestcnt << 32) & buflen? 

>
> 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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ