When you connect to a VPN, your data is encrypted before it leaves your device. But what does that actually mean? This article explains VPN encryption in plain language — covering the cryptographic algorithms, the handshake process, and why WireGuard® represents a step forward in VPN technology.
Table of Contents
What is Encryption?
Encryption transforms readable data into unreadable ciphertext using a mathematical algorithm and a key. Without the correct key, the ciphertext looks like random noise. When you receive encrypted data, you use your key to reverse the process (decrypt) and read the original content.
Think of it like a padlock and key: only someone with the key can open the padlock and read the message inside.
The VPN Tunnel Explained
When you connect to CarrotVPN:
- Your device and the VPN server exchange cryptographic keys (the handshake)
- Your device wraps every network packet in an encrypted layer using those keys
- The encrypted packets travel through the public internet to the VPN server
- The VPN server decrypts the packets and forwards them to their destination (e.g., a website)
- The website's response is re-encrypted by the VPN server and sent back to you
- Your device decrypts the response and shows you the content
To anyone watching the connection — your ISP, a WiFi eavesdropper, a government monitor — all they see is encrypted data flowing between you and the VPN server. The actual content is completely hidden.
The Key Exchange (Handshake)
The most critical step is establishing shared encryption keys without transmitting them openly. VPNs use a key exchange protocol for this. WireGuard® uses the Noise Protocol Framework with elliptic-curve Diffie-Hellman (ECDH):
- Both your device and the server have a public key (shared openly) and a private key (never shared)
- Using ECDH math, both sides independently compute the same shared secret without ever transmitting it
- This shared secret becomes the basis for the session encryption key
- Keys are rotated every few minutes (perfect forward secrecy) — so even if one session key is compromised, past sessions remain secure
Encryption Algorithms VPNs Use
AES-256-GCM (Used by OpenVPN, IKEv2)
AES (Advanced Encryption Standard) with 256-bit keys is the gold standard for symmetric encryption. It's used by governments, banks, and militaries worldwide. Computationally secure against brute force for the foreseeable future.
ChaCha20-Poly1305 (Used by WireGuard®)
ChaCha20 is a stream cipher designed by Daniel Bernstein, optimized for software implementation — making it especially fast on mobile processors that lack AES hardware acceleration. Poly1305 provides authenticated encryption, ensuring data integrity. This is what CarrotVPN uses.
Curve25519 (WireGuard® Key Exchange)
An elliptic-curve Diffie-Hellman scheme using the Curve25519 elliptic curve. Designed for high performance and resistance to timing attacks. 128-bit equivalent security with small key sizes.
WireGuard®: Modern Encryption Done Right
WireGuard® is a fundamental rethinking of VPN design. Compared to OpenVPN:
- ~4,000 lines of code vs OpenVPN's ~70,000 — far smaller attack surface, easier to audit
- Stateless handshake — reconnects in milliseconds after a network change (switching from WiFi to 4G)
- Modern cryptography only — no legacy algorithms, no negotiation, no downgrade attacks
- Kernel-level implementation — runs in the Linux kernel for maximum performance with minimal battery drain
- ChaCha20 speed — 3–5× faster than AES on mobile CPUs without hardware acceleration
CarrotVPN is built entirely on WireGuard®, giving you state-of-the-art security without compromise.
What Encryption Protects You From
- WiFi eavesdropping: On public WiFi, anyone can capture packets — encrypted packets are useless without the key
- ISP surveillance: Your ISP sees only that you're connected to a VPN server, nothing more
- Man-in-the-middle attacks: Authenticated encryption detects and rejects any tampering
- Government traffic analysis: Encrypted VPN traffic is opaque to deep packet inspection systems
- Network-level eavesdropping: At routers, switches, and internet exchange points, your data appears as random bytes
WireGuard® Encryption — Free on Android
CarrotVPN uses ChaCha20-Poly1305 encryption for maximum speed and security.
Download CarrotVPN Free