On Wed, 14 May 2025 16:00:55 GMT, Sandhya Viswanathan <sviswanat...@openjdk.org> wrote:
>> Actually, the Java version is the one that is too cautious. There is Barrett >> reduction after at most 4 consecutive uses of mlKemAddPoly(), so doing the >> reduction in implKyberAddPoly() is not necessary. Thanks for discovering >> this! > > Thanks. I have another question, is there a reason that the Java versions of > AddPoly (both for 2 and 3 input) return 1, whereas the corresponding > intrinsics return 0? I use that for debugging. E.g. it is fairly easy to change the Java code to call both the intrinsic and Java version and compare the results. I don't see any harm in leaving that in the production version, since it is always ignored. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24953#discussion_r2089322079