At the end of July, developers of the WireGuard VPN tunnel proposed , which will make their software for organizing VPN tunnels a part of the Linux kernel. However, the exact date for the implementation of this idea remains unknown. Below, we will discuss this tool in more detail.
/ фото
Brief about the project
WireGuard is a next-generation VPN tunnel created by Jason A. Donenfeld, head of Edge Security. The project was developed as and fast alternative to OpenVPN and IPsec. The first version of the product contained just 4,000 lines of code. In comparison, OpenVPN has about 120,000 lines, while IPsec has 420,000.
According to For developers, WireGuard is easy to set up, and the security of the protocol is achieved . : Wi-Fi, LTE, or Ethernet, you need to reconnect to the VPN server each time. However, WireGuard servers do not break the connection even if the user gets a new IP address.
Although WireGuard is initially designed for the Linux kernel, the developers to create a portable version of the tool for Android devices. The application is still underdeveloped, but it can already be tried out in practice. To do this, you need to .
Overall, WireGuard enjoys considerable popularity and has even been adopted by several VPN providers, such as Mullvad and AzireVPN. There are a this solution. For example, , created by users, and there are guides, .
Technical details
In (p. 18) note that the bandwidth of WireGuard is four times higher than that of OpenVPN: 1011 Mbps compared to 258 Mbps respectively. WireGuard also outperforms the standard Linux solution, IPsec, which has 881 Mbps. It surpasses it in terms of ease of setup as well.
After key exchange (the VPN connection is initialized almost like in SSH) and establishing a connection, WireGuard resolves all other tasks independently: there is no need to worry about routing, state control, etc. Additional effort on setup will only be required if you want to use symmetric encryption.

/ фото
To install, you will need a Linux kernel distribution 'greater than' 4.1. It can be found in the main distributions of Linux.
$ sudo add-apt-repository ppa:hda-me/wireguard
$ sudo apt update
$ sudo apt install wireguard-dkms wireguard-tools
As noted by the editors of xakep.ru, self-compilation from source code is also straightforward. It is enough to bring up the interface and generate an open and private key:
$ sudo ip link add dev wg0 type wireguard
$ wg genkey | tee privatekey | wg pubkey > publickey
WireGuard an interface for working with the cryptographic provider . Instead, a stream cipher is used , cryptographic Poly1305 and its own cryptographic hash functions.
The secret key is generated using elliptic curve . When hashing, and . Thanks to the timestamp format , the protocol discards packets with lower timestamp values, thereby and .
At the same time, WireGuard uses the ioctl function for input/output control (previously used ), which makes the code cleaner and simpler. You can verify this by checking the .
Developers' Plans
So far, WireGuard is an out-of-tree kernel module. But project author Jason Donenfeld , believes it is already time for full implementation in the Linux kernel, as it is simpler and more reliable than other solutions. Jason is supported in this regard by Linus Torvalds himself — he called WireGuard's code 'a work of art.'
However, no one is currently discussing the exact dates for WireGuard's integration into the kernel. And that this will happen with the August release of the Linux kernel 4.18. However, there is a chance that it will occur in the very near future: in version 4.19 or 5.0.
When WireGuard is added to the kernel, the developers improve the application for Android devices and start developing an app for iOS. In addition, there are plans to complete implementations in Go and Rust and port them to macOS, Windows, and BSD. There are also plans for WireGuard implementations for more 'exotic systems': , , as well as many other interesting items. All of them are listed in the of the project authors.
P.S. A few more articles from our corporate blog:
Our main focus is on providing cloud services:
| | | | | |
Source: habr.com
