Improved handling for ClientHello default key share group#10435
Open
Frauschi wants to merge 3 commits intowolfSSL:masterfrom
Open
Improved handling for ClientHello default key share group#10435Frauschi wants to merge 3 commits intowolfSSL:masterfrom
Frauschi wants to merge 3 commits intowolfSSL:masterfrom
Conversation
Decouples the speculative key share group from preferredGroup[0]. The new macro prefers widely deployed groups (PQ/T hybrids with X25519 or SECP256R1, then SECP256R1/X25519/SECP384R1, then FFDHE 2048/3072) to reduce the chance of a HelloRetryRequest, and falls back to preferredGroup[0] for configurations not covered explicitly. Users can override the default via user_settings.h or a manually passed -DWOLFSSL_KEY_SHARE_DEFAULT_GROUP=x via autoconf. Furthermore, an empty key_share is now sent when the user's group list does not intersect preferredGroup[], keeping TLS 1.3 negotiation alive instead of allowing a silent TLS 1.2 downgrade or handshake failure due to a missing key share extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decouples the speculative key share group for the ClientHello from
preferredGroup[0]. The new macroWOLFSSL_KEY_SHARE_DEFAULT_GROUPprefers widely deployed groups (PQ/T hybrids with X25519 or SECP256R1, then SECP256R1/X25519/SECP384R1, then FFDHE 2048/3072) to reduce the chance of a HelloRetryRequest, and falls back topreferredGroup[0]for configurations not covered explicitly. Users can override the default via user_settings.h or a manually passed-DWOLFSSL_KEY_SHARE_DEFAULT_GROUP=xxxvia autoconf.Furthermore, an empty key share is now sent when the user's group list does not intersect
preferredGroup[], keeping TLS 1.3 negotiation alive instead of allowing a silent TLS 1.2 downgrade or handshake failure due to a missing key share extension.Finally, some refactoring in the key share code and the
preferredGrouplist code happened to address some latent issues or remove dead code.