Skip to content

Keep a private key for every offered classical key share - #2

Merged
roachadam merged 1 commit into
masterfrom
fork/keyshare-keys
Oct 22, 2026
Merged

roachadam merged 1 commit into
masterfrom
fork/keyshare-keys

Conversation

@roachadam

Copy link
Copy Markdown
Owner

ApplyPreset generated a key for each classical key share but kept only the
first one. When the server selected another offered group (for example P-256
from Firefox's X25519MLKEM768, X25519, P-256), the client failed with
"invalid server key share".

Store the keys after the first in KeySharePrivateKeys.AdditionalEcdhe and pick
the key whose curve matches the server's group.

Based on bogdanfinn/utls 7de494d ("Fix keyshare cycling logic").


Stacked on #1 (module path). Merge that first; GitHub then retargets this PR to master.

ApplyPreset generated a key for each classical key share but kept only the
first one. When the server selected another offered group (for example P-256
from Firefox's X25519MLKEM768, X25519, P-256), the client failed with
"invalid server key share".

Store the keys after the first in KeySharePrivateKeys.AdditionalEcdhe and pick
the key whose curve matches the server's group.

Based on bogdanfinn/utls 7de494d ("Fix keyshare cycling logic").
Base automatically changed from fork/module-path to master October 22, 2026 20:57
@roachadam
roachadam merged commit 987c397 into master Oct 22, 2026
@roachadam
roachadam deleted the fork/keyshare-keys branch October 22, 2026 21:10
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.

1 participant