Skip to content

Improved handling for ClientHello default key share group#10435

Open
Frauschi wants to merge 3 commits intowolfSSL:masterfrom
Frauschi:pqc_default_curve
Open

Improved handling for ClientHello default key share group#10435
Frauschi wants to merge 3 commits intowolfSSL:masterfrom
Frauschi:pqc_default_curve

Conversation

@Frauschi
Copy link
Copy Markdown
Contributor

@Frauschi Frauschi commented May 8, 2026

Decouples the speculative key share group for the ClientHello from preferredGroup[0]. The new macro WOLFSSL_KEY_SHARE_DEFAULT_GROUP 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=xxx 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.

Finally, some refactoring in the key share code and the preferredGroup list code happened to address some latent issues or remove dead code.

Frauschi added 3 commits May 8, 2026 10:31
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.
@Frauschi Frauschi self-assigned this May 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

MemBrowse Memory Report

No memory changes detected for:

@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi May 8, 2026
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