RFR: 8314323: Implement JEP 527: TLS 1.3 Hybrid Key Exchange [v18]

Hai-May Chao hchao at openjdk.org
Sun Dec 7 03:36:48 UTC 2025


On Sun, 7 Dec 2025 02:48:13 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> 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.

Removed the extra len check.

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

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


More information about the security-dev mailing list