-
Notifications
You must be signed in to change notification settings - Fork 714
Implement post-quantum hybrid KX optimisation #2136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2136 +/- ##
==========================================
- Coverage 94.65% 94.64% -0.01%
==========================================
Files 102 102
Lines 23917 23974 +57
==========================================
+ Hits 22638 22690 +52
- Misses 1279 1284 +5 ☔ View full report in Codecov by Sentry. |
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's some initial feedback. I think the overall idea makes sense 👍
rustls/src/client/tls13.rs
Outdated
let secondary = our_key_share | ||
.into_hybrid_pair() | ||
.expect("into_hybrid_pair() must by supported if hybrid_pair() is"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking back to my not fully baked review comment, I think this expect()
might fall away if the hybrid_pair()
return was also sufficiently capable of being turned into the Box
'd form we need.
27d7857
to
4225aaf
Compare
4a3532f
to
3d76c68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the new names 👍 Here's another pass, mostly flagging nits/editorial suggestions related to the documentation.
770ff13
to
3eda51e
Compare
f3e0678
to
5f7fde0
Compare
5f7fde0
to
23de2f9
Compare
I'm minded to merge this -- @djc do you have strong objections to that? I think once we take breaking changes, we should do (sketch): pub enum ActiveKeyExchange {
Single(Box<dyn ActiveSingleKeyExchange>),
Hybrid(Box<dyn ActiveHybridKeyExchange>),
}
pub trait ActiveSingleKeyExchange {
// something like ActiveKeyExchange prior to this PR
}
pub trait ActiveHybridKeyExchange {
// something like ActiveKeyExchange after this PR, but with no Option on
// hybrid_component()'s return type
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. File an issue tagged with the appropriate label to follow up for the next breaking release?
Added to #2119 |
This is towards #2056 -- it implements the second bullet, and the mentioned optimisation, in one API.