Skip to content

Conversation

@WillChilds-Klein
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein commented Nov 14, 2025

Goal

Add benchmarks for ML-KEM handshakes.

Why

Performance analysis.

How

By doing the thing.

Callouts

n/a

Testing

$ date
Thu Dec  4 18:34:10 EST 2025

$ pwd
/Users/childw/workplace/github/WillChilds-Klein/s2n-tls/bindings/rust/standard/benchmarks

$ uname -a
Darwin 7cf34deb0968 24.6.0 Darwin Kernel Version 24.6.0: Wed Oct 15 21:12:05 PDT 2025; root:xnu-11417.140.69.703.14~1/RELEASE_ARM64_T6030 arm64

$ cargo bench --bench handshake
...

$ open ../target/criterion/handshake-X25519MLKEM/report/index.html
...
Screenshot 2025-12-04 at 6 32 04 PM

Related

n/a


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

(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) => "default_tls13",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We won't want to use named policies, as they can be updated in the future, so prefer a numbered policy for stability
  2. I don't think it's correct to have both of these mapping to the same policy. Generally the policy should have the mapped options as the highest preference. When an s2n-tls client is handshaking with an s2n-tls server, it can't negotiated both of these.

Copy link
Contributor Author

@WillChilds-Klein WillChilds-Klein Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both points make sense. None of the dates-only policies preferred both PQ kex and AES 256, so I used PQ-TLS-1-2-2024-10-09. I don't expect that policy to change through time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants