Files
wolfssl/src
Tobias Frauenschläger c899f79cfa Update key share group ranking algorithm
In case no user group ranking is set, all groups are now ranked equally
instead of the order in the `preferredGroup` array. This is the
behavior already indicated in the comment header of the function.

This change is necessary for applications that do not set their own
group ranking (via `wolfSSL_CTX_set_groups()` for example). When such an
application creates a TLS server and receives a ClientHello message with
multiple key shares, now the first key share is selected instead of the
one with the lowest index in the `preferredGroup` array.

Recent browsers with PQC support place two key shares in their
ClientHello message: a hybrid PQC + X25519 one and at least one
classic-only one. The hybrid one is the first one, indicating a
preference. Without this change, however, always the classic-only key
share has been selected, as these algorithms have a lower index in the
`preferredGroup` array compared to the PQC hybrids.

Tested using a patched version of NGINX.

This change also results in a different selection of a key share group
in case of a HelloRetryRequest message. For the tests, where static
ephemeral keys are used (`WOLFSSL_STATIC_EPHEMERAL`), an additional
check is necessary to make sure the correct key is used for the ECDH
calculation.

Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de>
2025-02-21 18:44:51 +01:00
..
2025-01-27 12:56:49 +01:00
2025-01-23 16:14:45 -07:00
2025-01-30 17:59:48 +01:00
2025-01-21 09:55:03 -07:00
2025-02-19 10:56:44 -06:00
2025-01-21 09:55:03 -07:00
2025-01-21 09:55:03 -07:00
2025-01-21 09:55:03 -07:00
2025-01-21 09:55:03 -07:00
2025-01-21 09:55:03 -07:00
2025-01-21 09:55:03 -07:00
2025-02-21 18:44:40 +01:00
2025-02-21 18:44:51 +01:00
2025-02-14 08:36:26 -05:00
2025-02-13 14:49:18 -08:00