Development discussion of WireGuard
 help / color / mirror / Atom feed
* [WireGuard] Suggestion: Hide private key by default with wg tool
@ 2016-07-26 20:51 Bin Jin
  2016-07-28 12:01 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Jin @ 2016-07-26 20:51 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hello Jason,

I think there is a potential security issue regarding the use of "wg"
tool. By default "wg" will print the private keys in plain text to the
console. This isn't going to be a big issue in general, but if I was
showing my friend how to use wireguard, or using my computer in public
places with surveillance camera, without a option to hide private keys
I would very likely get my private keys compromised. IIUC, compromise
of private key won't have security impact assuming a passive attacker,
and an active attacker needs to have private keys from both side to
perform a MitM attack. But nonetheless, I think this could be fixed
very easily, to avoid actual potential security compromise.

Considering that most people would probably type "wg" without any
further options that explicitly hide all private keys (either without
the knowledge of the option, or by accident). I would suggest to hide
the private key by default (showing some text like "(private key
hidden by default)" instead), and add an option to allow user to
explicitly showing the private key like "--show-private-keys".

Thanks!

Bin

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

* Re: [WireGuard] Suggestion: Hide private key by default with wg tool
  2016-07-26 20:51 [WireGuard] Suggestion: Hide private key by default with wg tool Bin Jin
@ 2016-07-28 12:01 ` Jason A. Donenfeld
  2016-07-28 13:09   ` Bin Jin
  0 siblings, 1 reply; 4+ messages in thread
From: Jason A. Donenfeld @ 2016-07-28 12:01 UTC (permalink / raw)
  To: Bin Jin; +Cc: WireGuard mailing list

Hi Bin,

I think I'll just get rid of it completely in `show` but not in the
more explicit views. So,

  - # wg show wg0  -- no private key
  - # wg show wg0 private-key -- yes private key
  - # wg showconf wg0 -- yes private key

What would you think of this?

Regards,
Jason

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

* Re: [WireGuard] Suggestion: Hide private key by default with wg tool
  2016-07-28 12:01 ` Jason A. Donenfeld
@ 2016-07-28 13:09   ` Bin Jin
  2016-07-28 15:19     ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Jin @ 2016-07-28 13:09 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Yes, that looks great. Thanks!

Bin

On Thu, Jul 28, 2016 at 2:01 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> Hi Bin,
>
> I think I'll just get rid of it completely in `show` but not in the
> more explicit views. So,
>
>   - # wg show wg0  -- no private key
>   - # wg show wg0 private-key -- yes private key
>   - # wg showconf wg0 -- yes private key
>
> What would you think of this?
>
> Regards,
> Jason

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

* Re: [WireGuard] Suggestion: Hide private key by default with wg tool
  2016-07-28 13:09   ` Bin Jin
@ 2016-07-28 15:19     ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2016-07-28 15:19 UTC (permalink / raw)
  To: Bin Jin; +Cc: WireGuard mailing list

https://git.zx2c4.com/WireGuard/commit/?id=ded0e645cfa45130e42c4d5bfba8f7d54e1855a9

Set WG_HIDE_KEYS=never to see the keys. Otherwise they're hidden.

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

end of thread, other threads:[~2016-07-28 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 20:51 [WireGuard] Suggestion: Hide private key by default with wg tool Bin Jin
2016-07-28 12:01 ` Jason A. Donenfeld
2016-07-28 13:09   ` Bin Jin
2016-07-28 15:19     ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).