On Thu, 26 Feb 2026 23:05:55 GMT, Ben Perez <[email protected]> wrote:

>> Our implementation of X25519 does not zero the MSB of the `u` coordinate as 
>> required by RFC 7748. Currently the test 
>> `jdk/sun/security/ec/xec/TestXDH.java` zeroes the bit manually while parsing 
>> test vectors, which is likely why this went uncaught.
>
> Ben Perez has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Changed params comparison

test/jdk/sun/security/ec/xec/TestXDH.java line 26:

> 24: /*
> 25:  * @test
> 26:  * @bug 8171277 8206915

Minor: Please add 8368841 to `@bug`

test/jdk/sun/security/ec/xec/TestXDH.java line 33:

> 31: 
> 32: import java.math.BigInteger;
> 33: import java.security.*;

Nit: could you please change wildcard imports to explicit ones?

test/lib/jdk/test/lib/Convert.java line 50:

> 48:      */
> 49:     public static
> 50:     BigInteger hexStringToBigInteger(boolean clearHighBit, String str) {

Do you think this should have been removed all together? Wouldn't it make sense 
to leave this in and call in `TestXDH` with `clearHighBit == false`? This way 
the conversion utility method still stays.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29750#discussion_r2871908086
PR Review Comment: https://git.openjdk.org/jdk/pull/29750#discussion_r2871910826
PR Review Comment: https://git.openjdk.org/jdk/pull/29750#discussion_r2872000705

Reply via email to