RFR: 8314323: TLS 1.3 Hybrid Key Exchange

Artur Barashev abarashev at openjdk.org
Fri Oct 3 14:22:49 UTC 2025


On Thu, 2 Oct 2025 22:52:49 GMT, Hai-May Chao <hchao at openjdk.org> 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.

src/java.base/share/classes/sun/security/ssl/NamedGroup.java line 316:

> 314:                 // Skip AlgorithmParameters for KEMs (not supported)
> 315:                 if (namedGroupSpec == NamedGroupSpec.NAMED_GROUP_KEM) {
> 316:                     if (defaultProviderName == null) {

We assume that if provider is not null then it must be DH without doing any checks to confirm that. It would be cleaner to call getProvider() instead.

> Provider p = getProvider();
                    if (p == null) {
                        KeyFactory.getInstance(name);
                    } else {
                        KeyFactory.getInstance(name, p);
                    }

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

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


More information about the security-dev mailing list