RFR: 8026976: ECParameters, Point does not match field size

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Wed Dec 2 17:38:58 UTC 2020


On Wed, 2 Dec 2020 17:08:11 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

> I need a code review for this small code change.  The code did not run the data through the DER decoding class before setting it to the point when the SunPKCS11 configuration had UseEcX963Encoding set to false.

Marked as reviewed by xuelei (Reviewer).

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11ECKeyFactory.java line 303:

> 301:                 } else {
> 302:                     point = decodePoint(attributes[0].getByteArray(), params.getCurve());
> 303:                 }

You could save a "!" operation in 299 if switch line 302 and line 300.

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

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



More information about the security-dev mailing list