On Fri, 28 Oct 2022 19:46:33 GMT, vpaprotsk <d...@openjdk.org> wrote:

>> src/java.base/share/classes/com/sun/crypto/provider/Poly1305.java line 175:
>> 
>>> 173:             // Choice of 1024 is arbitrary, need enough data blocks to 
>>> amortize conversion overhead
>>> 174:             // and not affect platforms without intrinsic support
>>> 175:             int blockMultipleLength = (len/BLOCK_LENGTH) * 
>>> BLOCK_LENGTH;
>> 
>> Since Poly processes 16 byte chunks, a strength reduced version of above 
>> expression could be len & (~(BLOCK_LEN-1)
>
> I guess I got no issue with either version.. I was mostly thinking about code 
> clarity? I think your version is 'more reliable' so just gonna switch it, 
> thanks.

done

-------------

PR: https://git.openjdk.org/jdk/pull/10582

Reply via email to