WireGuard
Lightweight VPN protocol and software with a small codebase and a fixed set of cryptographic primitives, built into the Linux kernel since 2020.
WireGuard is a virtual private network protocol and software implementation designed by Jason A. Donenfeld to be simpler, faster and easier to audit than older VPN systems such as IPsec and OpenVPN. Its Linux kernel implementation is only a few thousand lines of code, small enough to be reviewed in full. WireGuard creates an encrypted network interface on each machine, and peers are configured simply by exchanging short public keys, in a manner similar to SSH keys.
Instead of offering many negotiable algorithms, WireGuard uses a fixed set of well-studied primitives built on the Noise protocol framework: Curve25519 for key exchange, ChaCha20-Poly1305 for encryption and BLAKE2s for hashing. If a weakness is found, the whole protocol version is replaced rather than negotiated, removing a class of downgrade attacks. It runs over UDP and does not respond to packets from unknown peers, which makes it hard to detect by scanning. WireGuard was merged into the Linux kernel in version 5.6, released in March 2020.
WireGuard's simplicity made it popular with commercial VPN providers, mesh networking services and home users connecting to a homelab or router. Implementations exist for Windows, macOS, BSD, Android and iOS. Its small codebase reduces attack surface, and the protocol has been the subject of formal verification work. Its design leaves some features to other layers: it does not assign dynamic IP addresses or provide anonymity, so deployments add those pieces where needed.
Key points
- WireGuard uses a small, fixed set of cryptographic primitives instead of negotiable cipher suites.
- Its Linux implementation is a few thousand lines of code, small enough for full review.
- WireGuard became part of the mainline Linux kernel in version 5.6 in 2020.
- Peers authenticate one another by exchanging short public keys.
Related entries
Virtual Private Network
Technology that creates an encrypted tunnel between a device and another network, protecting traffic on untrusted links and connecting remote users securely.
OpenVPN
Open-source VPN software and protocol that uses TLS to build encrypted tunnels for remote access and site-to-site networking.
Encryption
The process of transforming readable data into ciphertext so that only parties holding the correct key can recover and understand it.
Public-Key Cryptography
Cryptographic system that uses pairs of linked keys, one public and one private, to enable encryption and digital signatures between strangers.
Attack Surface
The total set of points where an unauthorized party could try to enter, extract data from or otherwise attack a system, network or organization.
Linux
Free and open-source Unix-like kernel created by Linus Torvalds in 1991 that underpins Android, most servers and many embedded devices.
Homelab
Personal computing environment used to experiment with servers, networking, virtualization and other technologies for learning, testing or self-hosting.
OPNsense
Open-source firewall and routing platform based on FreeBSD, forked from pfSense in 2015 and managed through a web interface.