Using openssl to generate private Key

Jason A. Donenfeld Jason at zx2c4.com
Sun Sep 8 23:24:51 CEST 2019


This seems to work, maybe:

openssl genpkey -algorithm X25519 -outform der | tail -c 32 | base64

openssl genpkey -algorithm X25519 -outform der | tail -c 32 | base64 | wg pubkey

I haven't verified what's happening in the code though, so use at your
own risk. wg(8) is the best way to generate wireguard private keys for
use with wireguard.


More information about the WireGuard mailing list