Skip to content
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

Use server's preferred key agreeement (take 2) #160

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Conversation

bwesterb
Copy link
Member

@bwesterb bwesterb commented Oct 3, 2023

In contrast to upstream Go, we will send an HelloRetryRequest and accept an extra roundtrip if there is a more preferred group, than the one the client has provided a keyshare for in the initial ClientHello.

Cf. https://datatracker.ietf.org/doc/draft-davidben-tls-key-share-prediction/

Supersedes #157

In contrast to upstream Go, we will send an HelloRetryRequest and
accept an extra roundtrip if there is a more preferred group, than
the one the client has provided a keyshare for in the initial ClientHello.

Cf. https://datatracker.ietf.org/doc/draft-davidben-tls-key-share-prediction/
@bwesterb bwesterb requested a review from Lekensteyn October 3, 2023 10:57
Copy link
Contributor

@Lekensteyn Lekensteyn left a comment

Choose a reason for hiding this comment

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

LGTM (maybe squash).

One caveat though: there is no way to specify equal preference. So if a client supports {P256, X25519} and sends key share P256, then a server with CurvePreferences {X25519, P256} will still end up with a HRR to P256. Is that intended?

@bwesterb
Copy link
Member Author

bwesterb commented Oct 3, 2023

Yes, that aligns with BoringSSL's behaviour. To specify equal preference, we need a different interface.

@bwesterb bwesterb merged commit d347167 into cf Oct 3, 2023
2 checks passed
@bwesterb bwesterb deleted the bas/server-kex-pref-2 branch October 3, 2023 11:24
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