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] [day] [month] [year] [list]
Message-ID: <5a5028e1-7cb2-701c-ce0f-1bb9f79cb83d@linux.alibaba.com>
Date:   Wed, 7 Apr 2021 11:26:25 +0800
From:   Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
To:     Gilad Ben-Yossef <gilad@...yossef.com>,
        Ard Biesheuvel <ardb@...nel.org>
Cc:     Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Biggers <ebiggers@...gle.com>,
        Mimi Zohar <zohar@...ux.ibm.com>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>,
        Jia Zhang <zhang.jia@...ux.alibaba.com>
Subject: Re: [PATCH] crypto: sm3 - use the more precise type u32 instead of
 unsigned int



On 3/26/21 5:38 PM, Gilad Ben-Yossef wrote:
> Hi,
> 
> Thank you for the patch!
> 
> On Fri, Mar 26, 2021 at 5:21 AM Tianjia Zhang
> <tianjia.zhang@...ux.alibaba.com> wrote:
>>
>> In the process of calculating the hash, use the more accurate type
>> 'u32' instead of the original 'unsigned int' to avoid ambiguity.
> 
> I don't think there is any ambiguity here, as both forms are always
> the same size.
> 
> Generally, I tend to use the convention of using 'u32' as denoting
> variables where the size is meaningful - e.g. mathematical operations
> that are defined in the standard on 32 bit buffers,  versus using
> plain 'int' types where it isn't - e.g. loop counters etc.
> 
> Having said that, even under my own definition possibly the w and wt
> arrays in sm3_trandform() should be changed to u32.
> I don't object to changing those if it bugs you :-)
> 
> Cheers,
> Gilad
> 
> 

Thanks for your opinions. This is just to make the form more uniform. 
This is not a mistake. If it is not necessary, just ignore this 
modification.

Best regards,
Tianjia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ