7 ms·
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
by zx2c4 10y ago
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.
- Aissen 10y agoYes, guilty as charged. Ever since I saw you presentation in Paris in last September, I was dying for wireguard to come out. I'm curious what will be your strategy with regard to working or not with upstream Linux ?
- zx2c4 10y agoOh cool you came to the kernel recipes talk. Much has progressed since then. I wrote an email on LKML and netdev today to David Miller, the network subsystem maintainer. It's not ready for a [PATCH] set now, but it is ready to get initial feedback from them, so that I can start to get things ready for upstreaming. So: that's on the roadmap and a primary objective!
- loeg 10y agoWould you mind dual-licensing under a more permissive license (BSD or MIT) so the work can be included in the BSD family of operating systems as well as Linux?
- zx2c4 10y agoI answered this question elsewhere. The answer is that - probably, why not? I need to think about it for more than a few seconds. But the only reason I chose GPLv2 is because that's what Linux uses. I'll quit being lazy and think more carefully about licenses, and hopefully we'll wind up with something good for the BSDs.
- loeg 10y agoThanks for considering it! For what it's worth, there is dual BSD/GPL precedent in various places in Linux (e.g., most of the drm GPU drivers, NTB, etc).
- pdimitar 10y agoI am not a lawyer but in my eyes having a BSD/MIT license will also save you from a corporation "adopting" your technology and sue you afterwards for infringing a super vague patent of theirs... or something along the lines. If your work is in the public domain, then at least the corporations would have much harder time hijacking and wall-garden it, and the chances of them simply giving up are higher. Or so I hope. I've read a good chunk of your website. GREAT WORK! Do not give up, you're doing next-level work. =)
- gcb0 10y agois this really a thing?
- pdimitar 10y agoAs I pointed out, I am not a lawyer. I have however read news vaguely similar to what I described, many times through the years. It really makes me fearful that in the end you're vulnerable just for publishing your work... I do hope I am very naively wrong. But history hasn't given us much comfort in this area so far.
- loeg 10y agoYeah, you're not a lawyer. This is nonsensical gibberish.
- pdimitar 10y agoThe corporations haven't really left us with good impressions in the last 15 years though, did they? If I learned anything from those last 15 years is that they'll sue you if you don't agree the Moon is made of cheese if it suits their agenda. So I remain cynical towards them. If they can hijack a good technology for their own profit, they will do it. I think we all knew that much at this point?
- runejuhl 10y agoFor those of you who're interested, the mail to LKML can be found here: https://lkml.org/lkml/2016/6/28/629 https://lkml.org/lkml/2016/6/28/629
- ciokan 10y agoCan I bind it to external ip addresses and give a certain user an outgoing (or even private ips that I can then forward) address I chose? Don't know if my question makes sense but I'm interested in routing a certain user to a certain ip every time he/she connects.
- zx2c4 10y agoWireGuard as a simple associations between public keys and each public keys list of allowed IPs. Within this structure, it seems like you should be able to do what you want.
- ZoFreX 10y agoWhere has the code for the nuts and bolts of the crypto come from (e.g. everything in the "crypto" folder)?
- zx2c4 10y agoChaPoly is based on Martin Willi's implementation, but heavily modified. Blake2s is essentially their reference code. Curve25519 is based on Adam Langley's donna.
- clinta 10y agoThanks 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?
- zx2c4 10y ago> Does the server get a separate wg interface for every client that connects? No. Each wg interface has a public/private key. It then has a list of peers' public keys and associated allowed IPs. By tying each public key to the allowed IPs of that public key, you can be sure that if a packet comes from wg0 and comes from a particular src IP, it comes from who you want. So no need for a new wg0 for each peer. > Does this do a DH key agreement to guarantee forward secrecy or does it literally encrypt the packet with the peers public key? It uses a 1-RTT ECDH key agreement based on the Noise Protocol Framework, with identity hiding, perfect forward secrecy, and so forth. So, it does what you hoped it does. :) > Phase3 DMVPN I'm not familiar with this, but I'll read up on it. Just found a large cisco document describing it. I suspect that "automatic discovery" wouldn't be very much to my taste, but I'll read up on it before dismissing it wholesale.
- clinta 10y agoThe idea of Phase3 is that you have multiple node routers connected to a VPN hub. Think branch offices. When one node starts to talk to another node, the Hub initially facilitates the traffic, but it sends a NHRP(Next Hop Resolution Protocol) packet to the nodes telling them the public IPs of eachother, the nodes then negotiate their own VPN tunnel and start communicating directly without passing all traffic through the hub. If I understand wireguard correctly it seems NHRP could be run using wiregard for transport, but it would cool if a separate NHRP daemon wasn't required, especially since wiregard is already tracking the mapping of internal to public IPs.
- 10y ago
- nickpsecurity 10y agoDon'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.
- zx2c4 10y ago> 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. Yes this absolutely is the goal. I'm trying to keep the codebase as small and clear as possible. > Design by Contract Working out the precise pre and post conditions of every state would indeed be worthwhile. For all state transitions of the protocol, I've worked out by hand every possible combination and accounted it for it. I should publicize this work (i.e. type up my handwritten notes), and then let others join building on top of it.
- nickpsecurity 10y ago"Working out the precise pre and post conditions of every state would indeed be worthwhile. For all state transitions of the protocol, I've worked out by hand every possible combination and accounted it for it. I should publicize this work (i.e. type up my handwritten notes), and then let others join building on top of it." That's actually... great. It's exactly what high-assurance security did in kernels and VPN's. I'm impressed. You should definitely write that up and share it for peer review. Also, since you've done it, the next step is to review each one to make sure security properties are maintained or it fails fast, safe, and loud. :)
- piffey 10y agoHey! Knew I recognized that username. You also make pass which I've been using since you released that too. Definitely going to give this a run. Thanks for more useful tools!
- marios 10y agoFirst of all, congratulations on launching ! This looks interesting and I will be sure to check it out when I get the chance. I see from the examples on the site that it's IPv4 everywhre. Is there IPv6 support ? If not, is it on the roadmap ?
- zx2c4 10y agoIPv6 definitely is supported. I should add some examples. Every place you see an IPv4 address an IPv6 one can go. They can even be mixed and matched. There's full support and it works quite well. Thanks for the documentation suggestion.
- teacup50 10y agoAny chance of switching to a non-GPLv2 license? Broad adoption would be far more likely.
- unethical_ban 10y agoWhat's wrong with GPL2 for adoption?
- teacup50 10y agoOpen source projects that are not GPL'd cannot adopt the code; it's meant to be linked into the kernel, and so distribution will trigger the viral licensing clause covering the entirety of the kernel. For example, there are a myriad of products based on BSD; everything from pfSense at the low-end, the Juniper routers at the high-end. If the goal is to make money by licensing the code for non-GPLv2 use, then the GPL might make sense, if you're unconcerned about limiting market adoption by precluding integration by non-GPL products.
- nickysielicki 10y agoWhat capabilities does this provide over IKEv2 with certificates and MOBIKE for roaming? One disadvantage off the bat is that every operating system from OSX to Windows 7 to Linux to *BSD already has support for IKEv2 and MOBIKE caked in.
- RRRA 10y agoNice work, but I'm wondering why does it have to be in kernel? Couldn't it still be fast and written in a safer than C language considering the security context? (Or we'll still need to get grsec in there... :) Cheers!
- microcolonel 10y agoI suspect it has to be in kernel for efficiency reasons. Because applications access network devices through kernel interfaces; the kernel has to context switch and copy data to and from the userspace VPN process; This can be quite slow. On a microkernel system, the standard way of connecting to the network stack might be through direct shared memory; and on such a system you could manage to run the VPN in userspace at essentially no cost. However, on Linux, most of the network stack is in the kernel; the ABI for interacting with network hardware is stable. So while in theory you could write an efficient userspace VPN, it would require you to modify or at very least recompile your applications.
- JohnGrin 10y agoThanks for information! ExpressVPN is pretty good. I checked it at free vpn check service https://2ip.io/privacy/ https://2ip.io/privacy/ and it shows a high level of efficiency.
- rkeene2 10y agoHow does WireGuard deal with private keys on smartcards or other HSMs ?