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

src/java.base/share/classes/sun/security/ec/XDHPublicKeyImpl.java line 94:

> 92:         this.u = (params == XECParameters.X448) ?
> 93:             new BigInteger(1, u_arr) :
> 94:             new BigInteger(1, u_arr).clearBit(255);

Aren't lines 86-89 already doing it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29750#discussion_r2862439402

Reply via email to