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

Proper key share selection ranking #8024

Open
Frauschi opened this issue Sep 27, 2024 · 0 comments
Open

Proper key share selection ranking #8024

Frauschi opened this issue Sep 27, 2024 · 0 comments
Assignees

Comments

@Frauschi
Copy link
Contributor

Frauschi commented Sep 27, 2024

Version

master

Description

Consider an application that doesn't set a custom set of supported key exchange groups (e.g., using wolfSSL_CTX_set_groups()), for example NGINX compiled with WolfSSL. When establishing a TLS connection with a browser, multiple key shares are sent to the server (e.g. Firefox sends three in total: X25519MLKEM768, X25519 and SECP256R1).

Within the server key share selection process, for each key share, a rank value is obtained with TLSX_KeyShare_GroupRank(). In case no custom groups are set, the order within the preferredGroup array in src/tls.c is used. This results in SECP256R1 having the highest rank (as the index in the array is the rank, and a lower number is considered a higher rank). This results in the TLS server selecting the “weakest” key share (in the Firefox example, SECP256R1 is selected).

Is this the intended behavior? I think that the order in the preferredGroup array should reflect something like an actual order based on the achieved security level or something like that.

@Frauschi Frauschi changed the title Proper kKey share selection ranking Proper key share selection ranking Sep 27, 2024
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

No branches or pull requests

2 participants