speedtest.it
← Blog

WireGuard: The New Frontier of VPNs

WireGuard: the fastest and most modern VPN protocol. Under 4,000 lines of code, Linux kernel space, ChaCha20 encryption, and why it is replacing OpenVPN.

WireGuard: The New Frontier of VPNs

When Jason Donenfeld published WireGuard in 2015, the VPN world was dominated by OpenVPN — a robust but complex piece of software with nearly 400,000 lines of code. Donenfeld's response was radical: a complete VPN protocol in fewer than 4,000 lines. Simple to read, to audit, to maintain. And oddly, more secure precisely because of this simplicity. Today WireGuard is integrated into the Linux kernel, adopted by almost all major VPN providers, and considered the industry's state of the art.

What is WireGuard?

WireGuard is an open source VPN protocol designed with a single objective: do fewer things, but do them extremely well. While OpenVPN supports dozens of encryption algorithms, dozens of configuration options, and two transport modes, WireGuard made deliberate and immovable choices:

  • A single key exchange algorithm: Curve25519
  • A single symmetric cipher: ChaCha20
  • A single MAC: Poly1305
  • A single hash: BLAKE2s
  • Transport: UDP always (never TCP)

You cannot choose different algorithms. This "lack of flexibility" is intentional: it eliminates entire categories of configuration errors and dramatically simplifies the security analysis of the code.

Why WireGuard is faster than OpenVPN

Kernel space vs userspace

The deepest difference is where the code runs. OpenVPN runs in userspace: every packet must cross the boundary between the Linux kernel and application space, an expensive operation that repeats millions of times per second.

WireGuard runs in kernel space (on Linux) — directly where network packets are processed, with no context switch overhead. On Windows and macOS it uses optimized userspace implementations, but on Linux the difference is substantial.

Algorithms optimized for modern hardware

ChaCha20 was designed to be fast even on processors without hardware AES instructions — all ARM phones benefit from this. AES-GCM (used by OpenVPN) is fast on Intel/AMD processors with AES-NI instructions, but slow on ARM without hardware extensions.

The practical result: on a smartphone in mobile use, WireGuard is often 3–5× faster than OpenVPN with the same security.

Near-instant handshake

WireGuard's initial negotiation takes milliseconds. OpenVPN can require 1–3 seconds to establish the connection and negotiate the TLS tunnel. On mobile networks where the connection drops and reconnects frequently (entering a tunnel, switching from Wi-Fi to 4G), the difference is concretely felt.

The security model: reduced attack surface

"Opinionated" cryptography

In cryptography, giving too many choices is a problem. Every option you add is a possible misconfiguration. WireGuard eliminates this category of vulnerabilities by choosing a single combination of algorithms, all considered modern and secure by the cryptographic community.

Curve25519 for key exchange is the same used by Signal, WhatsApp end-to-end, and TLS 1.3. It was designed to be resistant to implementation errors — difficult to get wrong even for a programmer not expert in cryptography.

Public key authentication

There are no certificates, no CA (Certificate Authority), no complex PKI management. WireGuard uses SSH-style public/private key pairs: each peer has a public key, each tunnel explicitly authorizes which public keys can connect. Simple, auditable, difficult to misconfigure.

Perfect Forward Secrecy

WireGuard generates ephemeral session keys that change every few minutes. Even if someone recorded all VPN traffic today and obtained the server's private keys years from now, they could not decrypt past sessions.

The unintentional "stealth" mode

WireGuard only responds to packets authenticated with a valid public key. Port scans, detection probes, unauthorized connection attempts — WireGuard silently ignores them, as if the port didn't exist. An attacker who doesn't know your public key can't even tell that a WireGuard server is listening.

WireGuard vs OpenVPN: when to choose which

| | WireGuard | OpenVPN | |---|---|---| | Speed | ✅ Superior | ⚠️ Slower | | Configuration simplicity | ✅ Minimal | ❌ Complex | | Algorithm flexibility | ❌ None | ✅ Maximum | | Firewall traversal (TCP 443) | ❌ UDP only | ✅ Can use TCP 443 | | Maturity | ⚠️ Relatively new | ✅ Very mature | | Platform support | ✅ Broad | ✅ Universal | | Kernel integration | ✅ Linux kernel | ❌ Userspace |

Choose WireGuard if: you want speed, simplicity, personal or business use without specific compliance requirements.

Choose OpenVPN if: you need to traverse firewalls that block UDP (WireGuard only uses UDP), you have compliance requirements specifying particular algorithms, or your environment already has established OpenVPN infrastructure.

Installing WireGuard: how simple is it?

A complete client configuration looks like this:

[Interface]
PrivateKey = <client_private_key>
Address = 10.0.0.2/24
DNS = 1.1.1.1

[Peer]
PublicKey = <server_public_key>
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25

Six lines of configuration for a working VPN tunnel. OpenVPN requires configuration files with dozens of lines, separate certificates, and CA files.

To install a complete WireGuard server with a web interface on Debian 12, follow our step-by-step guide.

Is WireGuard suitable for businesses?

Yes, with some considerations. WireGuard does not natively handle username/password-based authentication or integration with corporate directories (Active Directory, LDAP). For these cases, solutions exist such as:

  • Tailscale: built on WireGuard, adds SSO authentication, centralized device management, and access control
  • Headscale: self-hosted version of Tailscale
  • NetBird: enterprise-ready open source alternative

Frequently asked questions

Is WireGuard as secure as OpenVPN? Yes, for most uses. The reduced attack surface and modern algorithms make it technically easier to audit. OpenVPN has 25 years of audits and bug fixes — a real advantage for environments with strict compliance requirements. For personal and standard business use, WireGuard is the more secure choice in practice.

Can I use WireGuard on all devices? Yes. WireGuard has official clients for Windows, macOS, Linux (integrated into the kernel), iOS, and Android. On Linux you don't even need to install anything — it's been part of the kernel since version 5.6 (March 2020).

Does WireGuard get blocked by firewalls? WireGuard uses only UDP, so it gets blocked by firewalls that only allow TCP. In restrictive corporate networks or in countries with internet censorship, OpenVPN on TCP port 443 is harder to block. In normal contexts, WireGuard has no issues.


← All articles