On Sun, 7 Dec 2025 02:26:54 GMT, Hai-May Chao <[email protected]> wrote:

>> Implement hybrid key exchange support for TLS 1.3 by adding three 
>> post-quantum hybrid named groups: X25519MLKEM768, SecP256r1MLKEM768, and 
>> SecP384r1MLKEM1024.
>> Please see [JEP 527](https://openjdk.org/jeps/527) for details about this 
>> change.
>
> Hai-May Chao has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Updates with Weijun's comments(encapsulate/decapsulate len checks)

src/java.base/share/classes/sun/security/ssl/Hybrid.java line 336:

> 334:             int actualEncSize = leftEnc.length + rightEnc.length;
> 335: 
> 336:             if (actualEncSize != expectedEncSize) {

We probably don't need this check. `left` and `right` are generated inside this 
method and there is no need to worry about they have the wrong lengths.

This is not like in `engineDecapsulate` where `encapsulation` is provided by 
the caller and we need to validate it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27614#discussion_r2595845791

Reply via email to