On Tue, 26 Apr 2022 21:02:49 GMT, Weijun Wang <wei...@openjdk.org> wrote:

> Only numbers from the same modular fields can be involved in arithmetic 
> calculations. Add `assert` to guarantee this.
> 
> Also, found one broken case and rewrote it.

src/jdk.crypto.ec/share/classes/sun/security/ec/ECDSAOperations.java line 261:

> 259:         IntegerModuloP result = p1.asAffine().getX();
> 260:         b2a(result, orderField, temp1);
> 261:         return MessageDigest.isEqual(temp1, r);

I did not get the point of this update.  Is it the broken case you mentioned in 
the PR description?  What's the issue of the original code?

src/jdk.crypto.ec/share/classes/sun/security/ec/ECDSAOperations.java line 261:

> 259:         IntegerModuloP result = p1.asAffine().getX();
> 260:         b2a(result, orderField, temp1);
> 261:         return MessageDigest.isEqual(temp1, r);

I did not get the point of this update.  Is it the broken case you mentioned in 
the PR description?  What's the issue of the original code?

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

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

Reply via email to