subspacecommunity/subspace

Add support to pre-shared key for each client

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
According to https://wiki.archlinux.org/index.php/WireGuard#Key_generation, One can also generate a pre-shared key to add an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance. A pre-shared key should be generated for each peer pair and should not be reused.
Adding support to pre-shared key could enhance the security

Describe the solution you'd like
Create a pre-shared_key folder with permission 0700
Add command wg genpsk > client-id.psk in handlers.go and cat the psk in generating the configuration file

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.