RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v3]

Xue-Lei Andrew Fan xuelei at openjdk.org
Wed Nov 2 16:22:04 UTC 2022


On Wed, 2 Nov 2022 14:35:20 GMT, Ferenc Rakoczi <duke at openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   more improvement
>
> src/java.base/share/classes/sun/security/util/math/IntegerModuloP.java line 410:
> 
>> 408:                 // as it hapeens to be 4. For bit set other than 4 bits, for
>> 409:                 // example, 3 bits set (0x8), the value should be added back.
>> 410:                 // d.setProduct(w[2]);
> 
> I think you can remove this comment, or at least fix your typos: "for-lopp" -> "for loop",  "hapeens" -> "happens",  "(0x8)" -> "(0x7)". 
> You can say something like.: ' "if(k != -1) d.setProduct(w[k]);" is not necessary here as k is -1 at the end of the loop for this exponent'

Thank you for the suggestion.  I would like to remove this comment as it looks more clear to me.

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

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


More information about the security-dev mailing list