[PATCH] embeddable-dll-service: add ability to derive public key from private key
Neutron
dotneutron at protonmail.ch
Tue Aug 10 21:13:06 UTC 2021
Hey,
I started working on a C# WPF client based on the reference implementation you provided. I made it so the tunnel configurations can be added or edited via a custom form much alike the one of wg-android. Since I'm only storing the private key in the interface section of a config file, I need to be able to derive the public key and display it to the user.
As a personal example, I'm using Mullvad's wg configurations to test it. I'm able to export all configurations for their servers, for a given private key. I'm left with the typical wg conf files. When I fill in the details for a tunnel configuration in the client I created, I want to be able to write in the private key and have it generate the public key automatically. This is the behavior of wg-android.
Adding that method, rebuilding the dll and invoking it from C# worked like a charm, so I thought it might help other people as well. It is a convenience method for anyone who wants to create a client of their own.
Neutron
More information about the WireGuard
mailing list