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 #230

Merged
merged 1 commit into from
Aug 15, 2023
Merged

new: UtlsPreSharedKeyExtension #230

merged 1 commit into from
Aug 15, 2023

Conversation

gaukas
Copy link
Contributor

@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 merged commit b218ce3 into refraction-networking:add-tls-psk-support Aug 15, 2023
@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.

1 participant