Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bindings/rust/standard/benchmarks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ pub enum KXGroup {
Secp256R1,
#[default]
X25519,
X25519MLKEM768,
}

impl Debug for KXGroup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Secp256R1 => write!(f, "secp256r1"),
Self::X25519 => write!(f, "x25519"),
Self::X25519MLKEM768 => write!(f, "X25519MLKEM768"),
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions bindings/rust/standard/benchmarks/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mod openssl_bench_setup {
let ec_key = match crypto_config.kx_group {
KXGroup::Secp256R1 => "P-256",
KXGroup::X25519 => "X25519",
KXGroup::X25519MLKEM768 => "X25519MLKEM768",
};

let ssl_method = match mode {
Expand Down Expand Up @@ -143,6 +144,7 @@ mod rustls_bench_setup {
let kx_group = match crypto_config.kx_group {
KXGroup::Secp256R1 => &kx_group::SECP256R1,
KXGroup::X25519 => &kx_group::X25519,
KXGroup::X25519MLKEM768 => &kx_group::X25519MLKEM768,
};

let crypto_provider = Arc::new(CryptoProvider {
Expand Down Expand Up @@ -228,6 +230,10 @@ mod s2n_tls_bench_setup {
(CipherSuite::TLS_AES_256_GCM_SHA384, KXGroup::Secp256R1) => "20190802",
(CipherSuite::TLS_AES_128_GCM_SHA256, KXGroup::X25519) => "20240417",
(CipherSuite::TLS_AES_256_GCM_SHA384, KXGroup::X25519) => "20190801",
(CipherSuite::TLS_AES_128_GCM_SHA256, KXGroup::X25519MLKEM768) => "20251014",
(CipherSuite::TLS_AES_256_GCM_SHA384, KXGroup::X25519MLKEM768) => {
"PQ-TLS-1-2-2024-10-09"
}
};

let mut builder = s2n_tls::config::Builder::new();
Expand Down
Loading