
WireGuard is a VPN protocol: a set of rules for establishing an encrypted connection between peers and exchanging data. It uses a short handshake to establish session keys, then uses those keys to protect data packets. The protocol description also specifies the cryptographic building blocks and how peers handle key refreshes.
What does WireGuard mean?
WireGuard is the name of a VPN protocol. A protocol describes how participating devices communicate; it is not the same thing as a complete VPN service or a particular app. WireGuard’s protocol defines how peers perform a handshake, derive keys and exchange encrypted packets.
A peer is one side of that communication. A handshake is the initial exchange that lets the peers establish keys for a session. After that, they can exchange data packets protected by those keys.
That distinction helps when you see “WireGuard” in a VPN app: the name identifies the protocol, but it does not tell you every setting the app provides. For a broader introduction to VPNs, see this plain-English VPN guide. You can also browse the VPN glossary for related terms.
How does a WireGuard connection start?
WireGuard begins with a handshake between an initiator and a responder. The initiator sends the first handshake message; the responder processes it and sends a second message. The exchange establishes symmetric keys for data transfer. “Symmetric” means the same session key is used for encryption and decryption.
The protocol uses the Noise_IK handshake. In everyday terms, that is the specified method for carrying out the key exchange. After the handshake, the initiator can send encrypted session packets. The responder waits for the initiator’s first encrypted packet before using the new session. Until then, it can queue packets or use an earlier session if one exists and is still valid.
This flow shows the basic order: first the two handshake messages, then encrypted session data.
- Initiator sends handshake → Responder replies (first message)
- Responder replies → Encrypted session data (second message)
- Encrypted session data
The handshake establishes session keys before encrypted data packets are exchanged.
What protects the data?
WireGuard combines several cryptographic tools rather than relying on one operation to do everything. The protocol describes ChaCha20 for symmetric encryption, with Poly1305 authentication using an AEAD construction. Encryption makes session data unreadable to someone without the right key; authentication helps check that protected data has not been altered.
It also uses BLAKE2s for hashing and keyed hashing, and HKDF for key derivation. A hash turns input into a fixed-size output. Key derivation uses existing key material to produce keys for cryptographic use. These are different jobs from encrypting the actual data packets.
For key exchange, WireGuard uses Curve25519 operations as part of its Noise_IK handshake. The protocol also supports an optional pre-shared key that can be mixed into the public-key cryptography. The protocol description identifies this as optional; it does not mean every configuration uses one.
These names describe the protocol’s building blocks, not settings a user necessarily needs to change. For the detailed protocol description, see WireGuard’s protocol and cryptography documentation.
Why does WireGuard refresh keys?
The handshake is not only for the start of a connection. The protocol says handshakes occur again every few minutes to establish rotating keys and provide perfect forward secrecy. In plain language, session keys are refreshed over time instead of being kept indefinitely.
WireGuard also describes rules for situations such as a lost response, inactivity or a handshake that becomes outdated. A handshake can be retried if a response does not arrive. If a peer has received a packet but has not sent one back within the specified keepalive interval, it sends an empty packet. Other timers govern when a new handshake is started or when packets are rejected because a key is too old or has passed a packet limit.
These are protocol-level rules. They explain how WireGuard handles session upkeep; they are not a set of steps for changing a setting on a phone or computer.
What does “connection-less” mean here?
WireGuard’s protocol documentation uses the phrase “connection-less protocol,” but also explains that secure communication still needs state: information that the peers keep during communication. Its handshake establishes symmetric keys, and its timers help determine when peers should retry, refresh keys or reject packets.
So “connection-less” should not be read as “there is no handshake” or “nothing is remembered.” The protocol description includes both the handshake and rules for maintaining the session. It also says all packets are sent over UDP, a transport protocol.
Does WireGuard tell you how to handle DNS, IPv6 or a kill switch?
The protocol details covered here explain the handshake, cryptography, UDP packets and key management. They do not give device-specific instructions for DNS, IPv6 or a kill switch. Those are settings to check in the VPN app and on the device you use; the steps and available controls should not be assumed to be identical across platforms.
A WireGuard connection’s protocol name alone is not enough to confirm how a particular app routes DNS or IPv6 traffic, or what happens if its tunnel stops. Check the app’s documentation and settings for those details. Avoid treating the presence of WireGuard as a substitute for checking how your own configuration behaves.
What should a new user take away?
Think of WireGuard as the communication rules underneath a VPN connection. It specifies how peers establish session keys, protect data packets and refresh keys. Its protocol documentation is technical, but the basic sequence is straightforward: handshake first, encrypted session data afterward, with further handshakes as needed.
That explanation is useful for understanding what the protocol does, but it is not a verdict on every part of a VPN setup. App controls and device-specific routing settings need to be checked in the relevant product documentation. In particular, do not infer DNS, IPv6 or kill-switch behaviour from the protocol name alone.
WireGuard questions, answered
Does WireGuard use UDP?
Yes. WireGuard’s protocol documentation says all packets are sent over UDP.
What happens after the handshake?
The initiator can send encrypted session packets. The responder waits for the initiator’s first encrypted packet before using the new session.
Does WireGuard refresh its keys?
Yes. The protocol describes handshakes every few minutes to establish rotating keys, along with other rules for refreshing keys when needed.
Does the protocol specify my VPN app’s DNS or kill-switch settings?
The protocol details covered here do not provide device-specific instructions for those settings. Check the documentation and settings for the app and device you use.