WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Using openssl to generate private Key
@ 2019-09-08 20:16 nicolas prochazka
  2019-09-08 21:24 ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: nicolas prochazka @ 2019-09-08 20:16 UTC (permalink / raw)
  To: WireGuard mailing list

Hello,
I'm trying to use openssl to generate curve key ,
as : openssl genpkey -algorithm X25519
however, result seems to be not understand by wg pubkey
 openssl genpkey -algorithm X25519
 echo -n 'MC4CAQAwBQYDK2VuBCIEIFBA+aTU9C5BrNPaJe0IVBZfZF39+8WqiYET0XEEM7Ba'
| wg pubkey
wg: Trailing characters found after key

How Can I do ?
We  need to create private key with an internal tool based on openssl
library , sorry.

Regards,
Nicolas
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using openssl to generate private Key
  2019-09-08 20:16 Using openssl to generate private Key nicolas prochazka
@ 2019-09-08 21:24 ` Jason A. Donenfeld
  2019-09-10  9:36   ` nicolas prochazka
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2019-09-08 21:24 UTC (permalink / raw)
  To: nicolas prochazka; +Cc: WireGuard mailing list

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.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using openssl to generate private Key
  2019-09-08 21:24 ` Jason A. Donenfeld
@ 2019-09-10  9:36   ` nicolas prochazka
  0 siblings, 0 replies; 3+ messages in thread
From: nicolas prochazka @ 2019-09-10  9:36 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Thanks for the explanation,
Nicolas

Le dim. 8 sept. 2019 à 23:24, Jason A. Donenfeld <Jason@zx2c4.com> a écrit :
>
> 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.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-08 20:16 Using openssl to generate private Key nicolas prochazka
2019-09-08 21:24 ` Jason A. Donenfeld
2019-09-10  9:36   ` nicolas prochazka

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git