What IPsec is, and what WireGuard is
IPsec is not one protocol but a suite. ESP (RFC 4303) encrypts and authenticates each packet inside the operating system's network stack; IKE, today IKEv2 (RFC 7296), authenticates the two ends and sets up the keys. It has tunnel and transport modes, dozens of cipher combinations and a long list of options, which is why it is powerful in enterprise networks and painful to set up by hand.
WireGuard is one protocol with one packet format, one handshake and one set of ciphers. Its Linux implementation is under 4,000 lines of code, excluding the cryptographic primitives, and it has been in the Linux kernel since version 5.6 in March 2020. Its author built it as a simpler, faster replacement for both IPsec and OpenVPN.
The benchmark: WireGuard vs IPsec vs OpenVPN
| Protocol and ciphers | Throughput | Ping |
|---|---|---|
| WireGuard, ChaCha20-Poly1305 | 1,011 Mbps | 0.403 ms |
| IPsec, ChaCha20-Poly1305 | 825 Mbps | 0.501 ms |
| IPsec, AES-256-GCM (with AES-NI) | 881 Mbps | 0.508 ms |
| OpenVPN, AES-256 with HMAC-SHA2-256, UDP | 258 Mbps | 1.541 ms |
From the WireGuard whitepaper: iperf3 between an Intel Core i7-3820QM and an i7-5200U on gigabit Ethernet, averaged over 30 minutes. WireGuard filled the link while the processor was not fully busy; OpenVPN and IPsec ran it at 100%. WireGuard's site says the benchmark is old and that both WireGuard and IPsec have gotten faster since, with WireGuard still ahead in some cases thanks to multi-threading, while OpenVPN “remains extremely slow”.
Why the numbers come out that way
IPsec and WireGuard both run in the kernel, so the gap between them is small and comes from design: WireGuard's handshake takes one round trip, there is no cipher negotiation, and ChaCha20 is fast in plain software. IPsec with AES-GCM is close on hardware with AES acceleration, as the table shows. OpenVPN runs as a user-space program, so every packet crosses the kernel boundary twice; that is the factor-of-three gap, and it is why OpenVPN added its optional Data Channel Offload module.
OpenVPN vs IPsec
People searching for this usually mean “which one should my VPN use”. IPsec is faster and built into the operating system; OpenVPN needs an app but can run over TCP port 443, so it gets through networks that block the UDP ports IPsec needs (500 and 4500). For a work network with a firewall you do not control, OpenVPN over TCP is the safer bet; everywhere else, IPsec or WireGuard. The OpenVPN vs IKEv2 page covers this pair in detail.
Where each one belongs
- IPsec: site-to-site tunnels between offices, data centres and clouds; the VPN client built into Windows, macOS, iOS and Android; networks managed by an IT team.
- WireGuard: personal VPN services, home labs and cloud servers, anything where speed, battery life and a small, auditable codebase matter more than enterprise options.
- Neither hides the fact that you are using a VPN. On networks that inspect traffic, an obfuscation layer or OpenVPN over TCP 443 is what gets through.
Security
Both are secure when deployed with modern ciphers. IPsec's risk is its option list: weak or outdated settings can be left on. WireGuard has no option list, and its small size let it be formally verified. The privacy question is the same for both: the server holds your current address while the tunnel is up, so what counts is the provider's no-logs practice. GhostShield VPN stores nothing from the tunnel, your real IP address included.
Try WireGuard with GhostShield VPN
GhostShield VPN runs WireGuard with ChaCha20-Poly1305 on Windows, Mac, iPhone, iPad, Android and Google TV, with a 7-day free trial of every feature. See how the free trial works, or read WireGuard vs OpenVPN and WireGuard vs IKEv2.
Questions people ask
Is WireGuard better than IPsec?
For a personal VPN, yes: it is faster in the published measurements, far simpler to set up and audit, and it roams between networks without extra configuration. IPsec remains the standard for site-to-site links between offices and clouds and for the VPN clients built into Windows, macOS, iOS and Android, where WireGuard is not available without an app.
What is the difference between OpenVPN and IPsec?
OpenVPN is a single program that builds its tunnel over TLS, usually in user space, and can run over UDP or TCP on any port. IPsec is a set of standards built into the operating system’s network stack: ESP encrypts and authenticates each packet in the kernel and IKE (usually IKEv2) sets up the keys, over UDP ports 500 and 4500. In the WireGuard whitepaper benchmark IPsec reached 825 to 881 Mbps where OpenVPN reached 258 Mbps on the same link.
Does WireGuard use IPsec?
No. WireGuard is its own protocol with its own packet format, handshake and fixed set of ciphers (ChaCha20-Poly1305, Curve25519, BLAKE2s). It was designed as a simpler replacement for IPsec and OpenVPN, not a layer on top of them.
Is IPsec obsolete?
No. It is the backbone of site-to-site VPNs between offices, data centres and clouds, and of the VPN clients that ship with Windows, macOS, iOS and Android. What has changed is that consumer VPN services now reach for WireGuard first, because it is faster and easier to run at scale.
How secure is IPsec?
Very, when it is configured with modern ciphers such as AES-GCM and current IKEv2. Its risk is complexity: it has many options, and old or weak ones can be left enabled. WireGuard removes that risk by offering no options at all.
Which is faster, WireGuard or IPsec?
WireGuard, in the whitepaper benchmark: 1,011 Mbps and a 0.403 ms ping, against 825 Mbps (ChaCha20-Poly1305) or 881 Mbps (AES-256-GCM) and pings around 0.5 ms for IPsec on the same gigabit link. WireGuard’s site says the test is old and both have gotten faster since, with WireGuard still ahead in some cases because it spreads work over several cores.
Which protocol does GhostShield VPN use?
WireGuard with ChaCha20-Poly1305 in every app: Windows, Mac, iPhone, iPad, Android and Google TV.
Sources
- WireGuard whitepaper by Jason A. Donenfeld: the benchmark against two IPsec configurations and OpenVPN
- WireGuard performance page: the note that the benchmarks are old
- WireGuard known limitations: UDP only, no obfuscation
- RFC 4303, IP Encapsulating Security Payload (ESP)
- RFC 7296, Internet Key Exchange Protocol Version 2 (IKEv2)
- Microsoft Learn: VPN connection types in Windows
- Apple Platform Deployment: VPN overview (IKEv2, IPsec and L2TP)
- Wikipedia: WireGuard