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

Support pre-shared key #51

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Support pre-shared key #51

merged 3 commits into from
Oct 2, 2023

Conversation

george-hopkins
Copy link
Contributor

Wireguard tunnels may be encrypted with an optional, pre-shared key. It adds an additional layer of symmetric-key cryptography for post-quantum resistance. This PR adds --endpoint-preshared-key /ONETUN_ENDPOINT_PRESHARED_KEY to specify such a key.

@aramperes
Copy link
Owner

Thank you for the PR! I will review this shortly

Copy link
Owner

@aramperes aramperes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for the contribution. I didn't know about this feature in WireGuard and this is a very worthwhile addition to onetun!

I made a couple changes before merging:

  • I reverted to base64==0.13.1 to prevent a version conflict with boringtun. I will be able to upgrade this once Update to boringtun v0.6.x #47 is addressed
  • I shortened the config option to --preshared-key as this is configured per-peer and not strictly related to the endpoint (transport-level)
  • Added documentation in README

@aramperes aramperes merged commit c0d0a5c into aramperes:master Oct 2, 2023
6 checks passed
@george-hopkins
Copy link
Contributor Author

george-hopkins commented Oct 3, 2023

Thank you for the quick review! Just for reference, the PSK can be configured for each endpoint indivdually but we don't support multiple endpoints anyway.

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.

2 participants