Skip to content

Commit

Permalink
RTG-3333 Support X25519MLKEM768 by default, but don't sent it as client
Browse files Browse the repository at this point in the history
X25519MLKEM768 is the standardised successor of the preliminary
X25519Kyber768Draft00. Latest browsers have switched to X25519MLKEM768.
Cloudflare supports both on the edge.

We've had support for X25519MLKEM768 in this crate for a while, but
didn't enable by default. We're now enabling serverside support by
default. We also let clients advertise support when set
to kx-client-pq-supported.

We don't enable support by default yet for clients set to
kx-client-pq-preferred, as that would cause an extra round-trip due to
HelloRetryRequest if the server doesn't support X25519MLKEM768 yet.

BoringSSL against which we build must support X25519MLKEM768, otherwise
this will fail.
  • Loading branch information
bwesterb committed Jan 13, 2025
1 parent 796afe1 commit 6ca27a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions boring/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,7 @@ impl SslRef {
if cfg!(feature = "kx-client-nist-required") {
"P-256:P-384:P-521:P256Kyber768Draft00"
} else {
"X25519:P-256:P-384:P-521:X25519Kyber768Draft00:P256Kyber768Draft00"
"X25519:P-256:P-384:P-521:X25519MLKEM768:X25519Kyber768Draft00:P256Kyber768Draft00"
}
} else {
if cfg!(feature = "kx-client-nist-required") {
Expand All @@ -2764,8 +2764,10 @@ impl SslRef {

#[cfg(feature = "kx-safe-default")]
fn server_set_default_curves_list(&mut self) {
self.set_curves_list("X25519Kyber768Draft00:P256Kyber768Draft00:X25519:P-256:P-384")
.expect("invalid default server curves list");
self.set_curves_list(
"X25519MLKEM768:X25519Kyber768Draft00:P256Kyber768Draft00:X25519:P-256:P-384",
)
.expect("invalid default server curves list");
}

/// Returns the [`SslCurve`] used for this `SslRef`.
Expand Down

0 comments on commit 6ca27a7

Please sign in to comment.