Research publication Protocols & encryption
WireGuard vs OpenVPN vs IKEv2/IPsec: a technical comparison
WireGuard is a small UDP protocol with one fixed cipher suite; OpenVPN wraps a TLS control channel around a negotiable data channel over UDP or TCP; IKEv2/IPsec is an IETF standard built into most operating systems. We compare how each works and where each is the better fit.
Abstract
WireGuard, OpenVPN and IKEv2/IPsec are the three tunnelling protocols most VPN clients offer today, and the choice between them is usually presented as a ranking. It is better understood as a set of design trade-offs. WireGuard fixes one modern cipher suite, uses a single-round-trip handshake derived from the Noise framework and keeps its implementation small enough to review. OpenVPN builds on TLS, negotiates its data-channel cipher, runs over UDP or TCP and has a long deployment record, at the cost of a larger code base and user-space processing. IKEv2 with ESP is an IETF standards-track suite implemented natively by the major operating systems, with built-in support for changing networks, but with a large configuration space in which weak choices remain possible. We compare the three on handshake, cryptography and agility, data-plane placement, roaming, firewall traversal, detectability and attack surface, citing the specifications and design documents, and we list what the protocol choice does not decide.
Three protocols, three design philosophies
A VPN protocol defines how two endpoints authenticate each other, agree on keys and encapsulate packets so that they travel encrypted between them. WireGuard, OpenVPN and IKEv2 with IPsec ESP solve the same problem in very different ways.
WireGuard starts from minimalism: one cipher suite, one handshake pattern, a few thousand lines of kernel code, and configuration reduced to keys and allowed addresses [1]. OpenVPN starts from TLS: it reuses a mature, general-purpose security protocol for authentication and key exchange, and adds its own packet format for the tunnel [2]. IKEv2/IPsec starts from standardisation: a suite of IETF specifications for key exchange (IKEv2) and packet protection (ESP) that operating systems implement natively [3, 4]. Each philosophy explains most of its strengths and weaknesses.
WireGuard
Handshake and cryptography
WireGuard’s handshake is an instance of the Noise protocol framework, pattern IKpsk2, completed in one round trip: the initiator sends one message, the responder answers, and data can flow [5, 6]. Peers are identified by static Curve25519 public keys, exchanged out of band like SSH keys, and each handshake mixes in fresh ephemeral keys, so session keys have forward secrecy [7]. The primitives are fixed: Curve25519 for key agreement, ChaCha20-Poly1305 for authenticated encryption, BLAKE2s for hashing and HKDF for key derivation [6, 8]. An optional pre-shared symmetric key can be mixed into the handshake as an additional layer intended to resist future quantum attacks on the key exchange [1].
Session keys are replaced by a new handshake every two minutes, and keys older than three minutes are rejected [1]. A peer that does not authenticate gets no response at all, which makes a WireGuard endpoint hard to discover by scanning. Under load, a cookie mechanism lets the responder demand proof of address ownership before doing expensive cryptography.
Routing, roaming and limitations
WireGuard ties keys to addresses through cryptokey routing: each peer has a list of allowed inner IP addresses, and a packet is accepted only if it decrypts with that peer’s key and comes from one of its allowed addresses [1]. Roaming is implicit — the server updates a peer’s outer endpoint from the most recent authenticated packet, so a client that changes networks simply carries on. It has been part of the Linux kernel since version 5.6 and has implementations for the other major platforms.
The project documents its own limitations: it runs over UDP only, does not attempt to disguise its traffic from deep packet inspection, and has no built-in mechanism for assigning addresses dynamically [9]. A server also holds, in memory, each peer’s static inner address and latest outer endpoint while that peer is configured. Services that want to avoid persistent mappings between a user’s key and their address therefore add machinery around the protocol; how they do so is a service property to examine, not a protocol guarantee.
OpenVPN
Control channel and data channel
OpenVPN runs two logical channels inside one connection. The control channel is a TLS session, provided by a library such as OpenSSL, that authenticates the peers with certificates (optionally plus a username and password) and derives keys [2, 10]. The data channel carries tunnel packets encrypted with those keys, using OpenVPN’s own packet format over UDP or TCP. Because the control channel is TLS, forward secrecy depends on its key exchange; with TLS 1.3, every full handshake uses ephemeral keys [10].
The data-channel cipher is negotiated. Current releases default to AEAD ciphers — AES-256-GCM, AES-128-GCM and, where the library supports it, ChaCha20-Poly1305 — listed in the data-ciphers option [2]. Older deployments may still use CBC-mode ciphers with a separate HMAC, and the legacy static-key mode, which has no forward secrecy, is deprecated. The options tls-auth, tls-crypt and tls-crypt-v2 wrap the control channel in an extra pre-shared-key layer, so packets without the key are dropped before any TLS processing; tls-crypt also hides the TLS handshake contents from observers.
Trade-offs
Running in user space through a TUN device costs context switches and has historically limited throughput on fast links; recent releases can hand the data channel to a kernel module (data channel offload) on supported platforms [2]. The ability to run over TCP, including on port 443, helps on networks that block UDP, but tunnelling TCP inside TCP stacks two retransmission mechanisms and can collapse throughput on lossy links. OpenVPN traffic is also identifiable: a 2022 study showed that network operators can fingerprint OpenVPN flows, including many wrapped in obfuscation layers, using passive and active techniques [11].
IKEv2/IPsec
Key exchange and packet protection
IKEv2 establishes an IKE security association in two exchanges of two messages each: IKE_SA_INIT negotiates algorithms and performs a Diffie–Hellman exchange, and IKE_AUTH authenticates the peers — with certificates, EAP or a pre-shared key — and creates the first Child SA used to protect traffic [3]. Packets are then protected by ESP, usually in the kernel [4]. IKE uses UDP port 500; when a NAT is detected both IKE and ESP move to UDP port 4500 [12].
Algorithms are negotiated from a large registry. RFC 8221 and RFC 8247 set implementation requirements for ESP and IKEv2, recommend AEAD ciphers such as AES-GCM and mark legacy algorithms and small Diffie–Hellman groups as not to be used [13, 14]. Child SAs rekeyed without a new key exchange derive their keys from the IKE SA’s key material; configuring a Diffie–Hellman group for rekeying — often labelled “PFS” in settings — gives each Child SA a fresh exchange. NIST SP 800-77 Rev. 1 is a practical guide to these choices [15].
Mobility and native support
The MOBIKE extension lets an established IKEv2 session move to a new IP address — from Wi-Fi to mobile data, for example — without a new handshake [16]. Combined with native clients in Windows, macOS, iOS and Android, this has made IKEv2 a common choice for mobile devices and managed fleets. The costs are complexity and configuration risk: the specification is large, interoperability depends on matching proposals, and a deployment can be weakened by a guessable pre-shared key or legacy algorithms. Fixed ports and protocol numbers also make IKEv2 easy to block. For hybrid post-quantum key exchange, RFC 9370 allows several key exchanges to be combined in one IKEv2 negotiation [17].
Side-by-side comparison
| Property | WireGuard | OpenVPN | IKEv2/IPsec |
|---|---|---|---|
| Transport | UDP only | UDP or TCP | UDP 500/4500; ESP |
| Handshake | Noise IKpsk2, 1 round trip | TLS plus OpenVPN framing | IKE_SA_INIT + IKE_AUTH, 2 round trips |
| Cipher choice | Fixed suite, no negotiation | Negotiated (data-ciphers) | Negotiated proposals |
| Authentication | Static public keys | Certificates, optional credentials | Certificates, EAP or PSK |
| Data plane | Kernel or user space | User space; kernel offload in recent releases | Usually kernel |
| Network changes | Implicit roaming | Reconnect or floating peer | MOBIKE |
| Native OS client | No (separate app) | No (separate app) | Yes, on major platforms |
| Restrictive networks | Blocked if UDP is blocked | Can use TCP 443; still fingerprintable | Easily blocked by port |
The table compares designs, not products. A given client may implement any of them well or badly, and its version, platform and configuration matter more than the row labels.
Performance and overhead
Each protocol adds bytes to every packet. WireGuard’s overhead is 60 bytes over IPv4 and 80 bytes over IPv6, which is why its tools commonly default to an inner MTU of 1420 bytes; OpenVPN and ESP overhead varies with cipher, encapsulation and options. Beyond overhead, throughput depends on where encryption runs, whether the CPU accelerates AES, how many cores are used and the network path. Published speed rankings rarely control for these factors. If you compare protocols yourself, follow a design that holds everything else constant, as described in Measuring VPN throughput without fooling yourself (VPNL-R-2026-002) and our performance methodology; our throughput figures are only comparable within such a design.
What the protocol does not decide
Choosing a protocol settles how packets are encrypted between client and server. It does not settle whether the client sends DNS queries outside the tunnel (see How DNS leaks happen in VPN clients: a technical taxonomy (VPNL-R-2026-001)), whether it blocks traffic when the tunnel fails (see Kill switches compared: firewall-based vs route-based enforcement (VPNL-R-2026-003)), what the server logs, or how keys and servers are managed. Those are properties of the implementation and the service, and they are where most real-world weaknesses are found in a security audit. How the underlying cryptography works — handshakes, AEAD ciphers and forward secrecy — is explained in How VPN encryption works: handshakes, ciphers and forward secrecy (VPNL-R-2026-009).
Choosing between them
- General use on a modern device: WireGuard’s small code base, fixed modern cryptography and fast reconnection make it a sound default where UDP is available.
- Networks that block UDP or most ports: OpenVPN over TCP may connect where the others cannot, with lower performance and no guarantee of being undetected.
- Managed devices and built-in clients: IKEv2/IPsec avoids third-party software and suits device-management policies, provided algorithms and authentication are configured to current guidance.
- Compliance requirements: organisations that must use approved algorithms often find IPsec or TLS-based designs easier to align with, because the cipher suite is configurable; WireGuard’s fixed suite is not negotiable.
Frequently asked questions
Is WireGuard more secure than OpenVPN?
Both provide strong encryption when configured to current recommendations. WireGuard’s advantages are a much smaller code base to audit and no insecure options to choose; OpenVPN’s are cipher agility and a long deployment record. Neither protects against a leaky client.
Which protocol is fastest?
It depends on hardware, operating system, implementation and network. Kernel-level implementations usually outperform user-space ones, but only a controlled measurement on your own setup answers the question for you.
Is IKEv2 a good choice on phones?
Often, yes: MOBIKE handles switches between Wi-Fi and mobile data, and native clients integrate with the system. WireGuard’s implicit roaming offers similar behaviour through an app.
Why would I ever use TCP?
Only when UDP is blocked. TCP-in-TCP tunnelling degrades badly under packet loss, so UDP is the better default for every protocol that supports it.
Limitations
This publication compares protocol designs using their specifications and design documents. It makes no claim about any commercial VPN service or client, does not report measurements, and reflects the versions current at publication; protocol defaults and platform support change, and the revision history will record material updates.
References
All sources are publicly available primary documents. Numbers correspond to the bracketed citations in the text.
- 1Donenfeld, J. A. (2017). WireGuard: Next Generation Kernel Network Tunnel. In Proceedings of the Network and Distributed System Security Symposium (NDSS 2017). Internet Society. https://doi.org/10.14722/ndss.2017.23160 https://www.wireguard.com/papers/wireguard.pdf
- 2The OpenVPN project. (n.d.). OpenVPN — source code repository and reference manual. GitHub. https://github.com/OpenVPN/openvpn
- 3Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., & Kivinen, T. (2014). Internet Key Exchange Protocol Version 2 (IKEv2) (RFC 7296). RFC Editor. https://www.rfc-editor.org/rfc/rfc7296
- 4Kent, S. (2005). IP Encapsulating Security Payload (ESP) (RFC 4303). RFC Editor. https://www.rfc-editor.org/rfc/rfc4303
- 5Perrin, T. (2018). The Noise Protocol Framework (Revision 34). https://noiseprotocol.org/noise.html
- 6Donenfeld, J. A. (n.d.). Protocol & Cryptography. WireGuard. https://www.wireguard.com/protocol/
- 7Langley, A., Hamburg, M., & Turner, S. (2016). Elliptic Curves for Security (RFC 7748). RFC Editor. https://www.rfc-editor.org/rfc/rfc7748
- 8Nir, Y., & Langley, A. (2018). ChaCha20 and Poly1305 for IETF Protocols (RFC 8439). RFC Editor. https://www.rfc-editor.org/rfc/rfc8439
- 9Donenfeld, J. A. (n.d.). Known Limitations. WireGuard. https://www.wireguard.com/known-limitations/
- 10Rescorla, E. (2018). The Transport Layer Security (TLS) Protocol Version 1.3 (RFC 8446). RFC Editor. https://www.rfc-editor.org/rfc/rfc8446
- 11Xue, D., Ramesh, R., Jain, A., Kallitsis, M., Halderman, J. A., Crandall, J. R., & Ensafi, R. (2022). OpenVPN is Open to VPN Fingerprinting. In 31st USENIX Security Symposium (USENIX Security 22). USENIX Association.
- 12Huttunen, A., Swander, B., Volpe, V., DiBurro, L., & Stenberg, M. (2005). UDP Encapsulation of IPsec ESP Packets (RFC 3948). RFC Editor. https://www.rfc-editor.org/rfc/rfc3948
- 13Wouters, P., Migault, D., Mattsson, J., Nir, Y., & Kivinen, T. (2017). Cryptographic Algorithm Implementation Requirements and Usage Guidance for Encapsulating Security Payload (ESP) and Authentication Header (AH) (RFC 8221). RFC Editor. https://www.rfc-editor.org/rfc/rfc8221
- 14Nir, Y., Kivinen, T., Wouters, P., & Migault, D. (2017). Algorithm Implementation Requirements and Usage Guidance for the Internet Key Exchange Protocol Version 2 (IKEv2) (RFC 8247). RFC Editor. https://www.rfc-editor.org/rfc/rfc8247
- 15Barker, E., Dang, Q., Frankel, S., Scarfone, K., & Wouters, P. (2020). Guide to IPsec VPNs (NIST Special Publication 800-77 Rev. 1). National Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-77r1
- 16Eronen, P. (2006). IKEv2 Mobility and Multihoming Protocol (MOBIKE) (RFC 4555). RFC Editor. https://www.rfc-editor.org/rfc/rfc4555
- 17Tjhai, CJ., Tomlinson, M., Bartlett, G., Fluhrer, S., Van Geest, D., Garcia-Morchon, O., & Smyslov, V. (2023). Multiple Key Exchanges in the Internet Key Exchange Protocol Version 2 (IKEv2) (RFC 9370). RFC Editor. https://www.rfc-editor.org/rfc/rfc9370
Cite this publication
APA style
VPN Network Research Labs. (2026, November 17). WireGuard vs OpenVPN vs IKEv2/IPsec: A technical comparison (Research Publication No. VPNL-R-2026-008, Version 1.0). https://vpn.com.de/research/wireguard-vs-openvpn-vs-ikev2
BibTeX
@techreport{vpnl-r-2026-008,
author = {{VPN Network Research Labs}},
title = {{WireGuard vs OpenVPN vs IKEv2/IPsec: a technical comparison}},
institution = {VPN Network Research Labs},
type = {Research Publication},
number = {VPNL-R-2026-008},
year = {2026},
month = nov,
date = {2026-11-17},
version = {1.0},
url = {https://vpn.com.de/research/wireguard-vs-openvpn-vs-ikev2},
langid = {en},
note = {Version 1.0}
}
Download citation
Cite the document ID and the version you read. Document IDs are permanent; substantive changes receive a new version number and an entry in the revision history below.
Revision history
| Version | Date | Change |
|---|---|---|
| 1.0 | Initial publication. |
Found an error? Write to support@vpn.com.de. Corrections are handled under our corrections and retractions policy and are never applied silently.
Methodology and definitions
Terms used in this publication
Test records
This publication contains no results about specific products. Product tests, audits and their evidence are published in the Report Registry and the Evidence Database.