On Wed, 19 Aug 2026 21:20:49 GMT, Weijun Wang <[email protected]> wrote:
>> Mark Powers has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> comment from Shawn
>
> Looks good. Some tiny comments.
@wangweij thanks for the review!
> src/java.base/share/classes/sun/security/provider/ML_DSA.java line 1545:
>
>> 1543: // This is only used for 2^D * t1. Since t1 < 2^10,
>> 1544: // the product is at most q - 1 and needs no reduction.
>> 1545: res[i][j] = c * vec[i][j];
>
> This method is no longer general enough for arbitrary `c`. Shall we inline
> `2^D` here?
yes - good suggestion
> src/java.base/share/classes/sun/security/provider/ML_DSA.java line 1627:
>
>> 1625: // Reduces a product of two NTT coefficients modulo ML_DSA_Q to its
>> 1626: // canonical representative. The product is bounded by ML_DSA_Q
>> squared.
>> 1627: private static int barrettReduce(long value) {
>
> Can we rename the argument to `product`? This makes the comment clearer.
fixed
-------------
PR Comment: https://git.openjdk.org/jdk/pull/32259#issuecomment-5348700809
PR Review Comment: https://git.openjdk.org/jdk/pull/32259#discussion_r3817138039
PR Review Comment: https://git.openjdk.org/jdk/pull/32259#discussion_r3817138468