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

new: UtlsPreSharedKeyExtension #229

Closed
wants to merge 1 commit into from
Closed

new: UtlsPreSharedKeyExtension #229

wants to merge 1 commit into from

Conversation

gaukas
Copy link
Member

@gaukas gaukas commented Aug 15, 2023

Implement UtlsPreSharedKeyExtension to enable REAL PSK resumption.
Redesign FakePreSharedKeyExtension and HardcodedPreSharedKeyExtension to mimic PSK extension.

Successfully merging this change into master should close issues #107 and #182.
Related to #63.


This PR is based off branch:x25519kyber768. Successfully merging this PR into master should close #223.

In `u_pre_shared_key.go`, create `PreSharedKeyExtension` as an interface, with 3 implementations:
- `UtlsPreSharedKeyExtension` implements full support for `pre_shared_key` less resuming after seeing HRR.
- `FakePreSharedKeyExtension` uses CipherSuiteID, SessionSecret and Identities to calculate the corresponding binders and send them, without setting the internal states. Therefore if the server accepts the PSK and tries to resume, the connection fails.
- `HardcodedPreSharedKeyExtension` allows user to hardcode Identities and Binders to be sent in the extension without setting the internal states. Therefore if the server accepts the PSK and tries to resume, the connection fails.

TODO: Only one of FakePreSharedKeyExtension and HardcodedPreSharedKeyExtension should be kept, the other one should be just removed. We still need to learn more of the safety of hardcoding both Identities and Binders without recalculating the latter.
@gaukas gaukas closed this Aug 15, 2023
@gaukas
Copy link
Member Author

gaukas commented Aug 15, 2023

Closed for wrong target branch.

@gaukas gaukas deleted the support-tls-psk branch August 16, 2023 00:40
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.

None yet

1 participant