WireGuard® is a relatively new VPN protocol when compared with the decades old OpenVPN and approaches software development with a different philosophy – do one thing simple and do it well (efficiently). This is known as the UNIX philosophy. WireGuard is licensed under GPLv2 – which is the same open source license that the Linux kernel uses. As such, it should be no surprise that WireGuard will be added to the Linux kernel itself – which means WireGuard will eventually be available “preinstalled” on all Linux distributions. The comment that really validated WireGuard’s future ubiquity came from none other than Linus Torvald. In August of 2018, he mailed the Linux kernel mailing list with this positive comment:
Can I just once again state my love for it [WireGuard] and hope it gets merged soon? Maybe the code isn’t perfect, but I’ve skimmed it, and compared to the horrors that are OpenVPN and IPSec, it’s a work of art.
Private Internet Access has been a donor to WireGuard since 2018. This new VPN protocol has been on PIA’s radar for years and we want to share all the reasons why.
WireGuard’s founding marks a new age for VPN
Jason Donenfeld first started working on WireGuard around 2016 with the first release being on December 9th, 2016. At its core, WireGuard is a kernel virtual network interface for Linux that is meant to replace the current default networking interface on Linux, IPSEC. In fact, IPSEC has largely fallen out of use in favor of the current industry standard, OpenVPN – which operates in user space. WireGuard can also work as a replacement for OpenVPN. WireGuard, in Jason’s own words, is a “solid engineering solution that is both more practical and more secure.” With that in mind, it is still important to note that WireGuard has not yet been released as a stable v1.0.
What makes WireGuard different?
VPN on layer 3 makes things more efficient
One key component that makes WireGuard different than other VPN protocols such as OpenVPN, IPSEC, L2TP, and PPTP is the layer at which it functions. The traditional VPN protocols that most people are familiar with operate at the user level using TLS. In comparison, WireGuard operates at the kernel layer, layer 3, and there are many benefits to that. The big two are that WireGuard becomes easier to implement and that the authenticity and attributability of the packets are better ensured. At layer 3, WireGuard supports both IPv4 and IPv6 IP addresses, as well as the ability to encapsulate IPv4 packets in IPv6 as well as the other way around. Because WireGuard uses “cryptokey routing” at layer 3, this means that every IP address allowed on the VPN has an associated public key – which provides guaranteed perfect forward secrecy.
Less code makes WireGuard more auditable
A notable outcome of WireGuard’s philosophy is that there are fewer lines of code in WireGuard’s codebase when compared with OpenVPN’s. How much less? Two orders of magnitude less – 4,000 lines of code in WireGuard versus over 400,000 lines of code to fully utilize OpenVPN or IPSEC. This means that WireGuard’s codebase has less room for something to go wrong. It also means that WireGuard doesn’t come with the bells and whistles that many have come to expect from OpenVPN – but that doesn’t mean that all that functionality can’t be added on top of WireGuard. Open source code is meant to be built on top of. In summary – WireGuard is a simpler, cleaner, and more up-to-date way to connect computers using virtual private tunnels into a virtual private network.
Better cryptographic algorithms and crypto versioning limit impact of vulnerabilitie
Instead of using AES or SHA for encryption or hashing, WireGuard uses a bunch of newer algorithms in conjunction that individually aren’t even available in other VPNs. These algorithms, as described on the WireGuard website, are:
- ChaCha20 for symmetric encryption, authenticated with Poly1305, using RFC7539’s AEAD construction
- Curve25519 for ECDH
- BLAKE2s for hashing and keyed hashing, described in RFC7693
- SipHash24 for hashtable keys
- HKDF for key derivation, as described in RFC5869
The icing on the cake though, is the lack of cryptographic agility. Cryptographic agility is the ability for a protocol to swap out encryption algorithms in the event that one becomes obsolete – the mere existence of this feature opens the door to man in the middle or even downgrade attacks. Instead, WireGuard opts to go for crypto versioning – if one of the algorithms mentioned above becomes obsolete, all WireGuard has to do is release a new version to upgrade and leave the vulnerability behind in its entirety. As Jason explains in his seminal paper introducing WireGuard:
“It [WireGuard] intentionally lacks cipher and protocol agility. If holes are found in the underlying primitives, all endpoints will be required to update. As shown by the continuing torrent of SSL/TLS vulnerabilities, cipher agility increases complexity monumentally.”
Setting up Private Internet Access to try WireGuard in the Closed Beta
At this point in time, to start using WireGuard with Private Internet Access, you’ll need to be part of the PIA beta program which is currently in closed beta mode. Once you have the Private Internet Access beta client installed, simply navigate to the Connections tab in the Settings window of your Private Internet Access app or client and switch from OpenVPN to WireGuard. The simplicity of using WireGuard instead of OpenVPN leads to much less option paralysis. WireGuard just works – and beneath the hood it is using better encryption.
“WireGuard” is a registered trademark of Jason A. Donenfeld.