RFR 8171279: Support X25519 and X448 in TLS 1.3
Adam Petcher
adam.petcher at oracle.com
Thu Aug 30 15:58:40 UTC 2018
Webrev: http://cr.openjdk.java.net/~apetcher/8171279/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8171279
Please review the following change to add support for X25519 and X448
(XDH) to TLS 1.3. This change includes some refactoring to remove code
that was duplicated for DH and ECDH, and to avoid adding more for XDH.
In addition to running the included regression test, I tested by
connecting to an openssl server and confirmed that the connection was
established using TLS 1.3 and X25519/X448.
Here are some detailed notes:
*) The NamedGroupFunctions class was added to hold the functions that
are needed for key agreement with some named group. Most of the
group-specific code was moved into subclasses of NamedGroupFunctions.
This allowed me to remove a bunch of code like "if (type == ECDHE) {...}
else if (type == FFDHE) {...}".
*) There are a couple of files in the webrev with no changes due to a
webrev issue. Please ignore them.
*) I moved some code related to XDH parameters and encoding into
java.base. ECUtil now has code to encode/decode XDH public keys, and the
XECParameters file was moved into java.base/sun.security.util. This
organization is similar to how CurveDB and NamedCurve are in java.base,
and it allows the TLS implementation to encode/decode keys without using
the jdk.crypto.ec module.
More information about the security-dev
mailing list