Live data from Hacker News

WireGuard: next generation in-kernel modern VPN

wireguard.io

11–20 of 157 posts

Re: WireGuard: next generation in-kernel modern VPN

#11

Can someone explain why being in-kernel is considered a feature?

It's faster. Performance usually matters more than security for most "security" products. ;) Having extra code in kernel is usually just asking for it. Here's one done closer to high-assurance principles that I'm sure the WireGuard scheme could be ported to:

http://genode-labs.com/publications/mikro-sina-2005.pdf

Far as keeping it in kernel, it might be implemented in SPARK and Rust to see if it gets through static and dynamic (if necessary) checkers. Test and fuzz it heavily. If C, use strong, static tools to show correctness and/or compiler transformations like SAFEcode (or Softbound+CETS) to immunize it. I know Criswell runs Linux kernel on SVA-OS with SAFEcode but not sure if S+CETS can do it. Such approaches will knock out most of the flaws that lead to code injection.

Re: WireGuard: next generation in-kernel modern VPN

#12
post #3

Wow, I launched this 10 minutes ago and somebody already put it on Hacker News. Spectacular! I'm the author of this and would be happy to answer any questions you have.

Thanks for being here, I have a few questions.

Does the server get a separate wg interface for every client that connects? Or does it do something like multipoint GRE interfaces with next hop addresses in the arp table?

Does this do a DH key agreement to guarantee forward secrecy or does it literally encrypt the packet with the peers public key?

Also is it in the scope of this project for peers to discover each other for direct communication, like a Phase3 DMVPN?

Re: WireGuard: next generation in-kernel modern VPN

#14

Can someone explain why being in-kernel is considered a feature?

It's faster. Performance usually matters more than security for most "security" products. ;) Having extra code in kernel is usually just asking for it. Here's one done closer to high-assurance principles that I'm sure the WireGuard scheme could be ported to: http://genode-labs.com/publications/mikro-sina-2005.pdf Far as keeping it in kernel, it might be implemented in SPARK and Rust to see if it gets through static a…

We'll actually be producing a Rust implementation for userspace. It'd be interesting to see that work ported back to kernelspace. Cool suggestions.

Re: WireGuard: next generation in-kernel modern VPN

#16
post #13

I know asking for MIT / BSD or Apache 2 may be a little bit of stretch. But any chance of LGPL? Or would we need a conplete reimplementation for BSD?

I don't really have any problem re-licensing it less restrictively, I don't think. I'll have to think about it for more than 10 seconds I suppose. But I put "GPLv2" there without much thought simply because that's what Linux uses. But you make a good point about the BSDs.

Re: WireGuard: next generation in-kernel modern VPN

#17
post #15

What happens if a client gets assigned a new IP that isn't in the server's whitelist? How do they connect?

Endpoint IPs are learned based on successfully authenticated/decrypted packets. The Endpoint= entry in the config is just the location of an initial server endpoint. Inner tunnel IPs are fixed in the config, and it's up to things that build ontop of WireGuard to manage this however fits best.

Re: WireGuard: next generation in-kernel modern VPN

#18
post #3

Wow, I launched this 10 minutes ago and somebody already put it on Hacker News. Spectacular! I'm the author of this and would be happy to answer any questions you have.

Don't have time for a detailed review. However, I like that you're working to replace IPsec with something simpler, easier to use, and with flexible deployment. Crypto algorithms look better than most VPN's I see as well. Good work on all that. Just remember to aid others' verification efforts later on by keeping it modular, minimal shared state, simple constructions in code, and so on. Whatever passes through a decent static analysis tool.

Also, one of easiest, formal methods is Design by Contract which can be emulated with asserts for pre- and post-conditions plus main invariants. Quite useful to encode operating assumptions in there. Such can also be used for automating test-case generation, fuzzing, dynamic analysis, and covert channel analysis. Oh yeah, definitely do a covert channel analysis on anything that gets near the keys to plug any leaks.

Re: WireGuard: next generation in-kernel modern VPN

#19
post #14

Earlier quoted context omitted.

It's faster. Performance usually matters more than security for most "security" products. ;) Having extra code in kernel is usually just asking for it. Here's one done closer to high-assurance principles that I'm sure the WireGuard scheme could be ported to: http://genode-labs.com/publications/mikro-sina-2005.pdf Far as keeping it in kernel, it might be implemented in SPARK and Rust to see if it gets through static a…

We'll actually be producing a Rust implementation for userspace. It'd be interesting to see that work ported back to kernelspace. Cool suggestions.

That sounds good. What's its current implementation language?
Post reply on HN