RFR: 8279903: Redundant modulo operation in ECDHKeyAgreement [v2]

Weijun Wang weijun at openjdk.java.net
Wed Jan 12 17:16:28 UTC 2022


On Wed, 12 Jan 2022 07:29:04 GMT, John Jiang <jjiang at openjdk.org> wrote:

>> In class `sun.security.ec.ECDHKeyAgreement`, the last `mod()` in the below line looks redundant,
>> 
>> BigInteger lhs = y.modPow(BigInteger.valueOf(2), p).mod(p);
>> 
>> I think this tiny change just be a code cleanup, so no test for it and label `noreg-cleanup` is added for this JBS issue.
>
> John Jiang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   update copyright notes

Good catch. Looks good to me. Thanks.

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

Marked as reviewed by weijun (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7042



More information about the security-dev mailing list