0Pricing
Cryptology Academy · Lesson

Encrypted Traffic Analysis

Discover that even encrypted traffic leaks metadata — timing, size, and traffic patterns.

Encrypted Traffic Analysis is a free Cryptology Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Encryption Does Not Hide Timing

Encrypting network traffic protects message content but the timing of packets remains fully observable. An attacker monitoring an encrypted connection can measure inter-packet delays, connection duration, and the temporal pattern of bursts. These timing characteristics can reveal what type of application is in use, whether the user is typing or receiving data, and in some cases reconstruct sensitive information from timing alone.

Packet Size Reveals Data Volume

Even without reading content, packet sizes convey information. A file download produces large packets near the maximum transmission unit; a chat message produces small packets. The total volume of data transferred in an encrypted session can reveal whether a large file was shared. Video call quality settings produce characteristic packet size distributions that are recognisable to a trained observer.

Traffic Analysis: Communication Patterns

Traffic analysis examines who communicates with whom, when, how often, and for how long, without inspecting content. Even fully encrypted communications reveal a social graph. Knowing that a journalist contacts a specific government official's IP address at irregular intervals is valuable intelligence regardless of what was said. Traffic analysis has been used in surveillance since the era of telegraph communication.

TLS SNI Leaks the Hostname

When a browser establishes a TLS connection, it sends a Server Name Indication extension in the initial ClientHello message before encryption begins. SNI contains the domain name the client wants to connect to. Any observer on the network path can read the SNI and know exactly which website you are visiting, even though the subsequent HTTP requests are encrypted. SNI is in plaintext because the server needs it to select the correct certificate.

QUIC and Encrypted Client Hello

QUIC is a modern transport protocol developed by Google that runs over UDP. It encrypts the TLS handshake including the SNI from the very beginning using an Encrypted Client Hello (ECH) mechanism. ECH encrypts the inner ClientHello (containing the real hostname) inside an outer ClientHello addressed to a CDN entry point. This prevents hostname leakage that is unavoidable in classic TLS 1.3 over TCP.

Website Fingerprinting via Traffic Patterns

Website fingerprinting attacks exploit the fact that each website produces a characteristic pattern of resource requests: a specific number of objects, of specific sizes, loaded in a specific order. By training a classifier on these patterns, an attacker can identify which website a user visited from the traffic patterns alone, even over an encrypted VPN. Research shows accuracy rates above 90 percent against common websites.

Tor's Limitations Against Global Adversaries

Tor routes traffic through three volunteer relays with encryption at each hop, hiding the connection between origin and destination. However, an adversary who can observe both the Tor entry node and the exit node can use traffic correlation: the timing and volume patterns at entry and exit match up even though the content is encrypted. Nation-state adversaries with surveillance capability on large portions of the internet can perform this correlation attack.

Video Streaming Resolution Inference

Netflix and YouTube adapt video quality to available bandwidth, and different resolutions produce different packet rate and size distributions. Researchers have demonstrated that an observer can infer the video title being streamed by matching the observed traffic pattern against a fingerprint database of known videos at different quality levels. This works even over HTTPS because content-length and timing patterns are visible.

VPN Metadata Leakage

A VPN encrypts traffic between the user and the VPN server, hiding destinations from the local ISP. However, the VPN provider sees all destinations, the total volume per destination is visible to the provider, and DNS queries before the VPN tunnel starts may still leak to the ISP. Additionally, WebRTC in browsers can expose the user's real IP address even when a VPN is active, unless explicitly blocked.

DNS Lookups Before TLS Still Reveal Destinations

Before a TLS connection is established, the browser performs a DNS lookup to resolve the domain name to an IP address. If DNS is not encrypted (no DoH or DoT), the DNS query travels in plaintext and reveals the destination to the local resolver, the ISP, and any observer on the network. Even if the subsequent TLS connection is encrypted and ECH hides the SNI, the DNS query already disclosed the destination.

Countermeasures for Traffic Analysis

Defending against traffic analysis requires adding cover traffic to obscure real patterns, using anonymity networks with traffic shaping, and encrypting DNS with DoH or DoT. HTTPS padding can obscure object sizes. Tor with a pluggable transport obfuscates traffic patterns to resist censorship-based detection. No single countermeasure defeats all traffic analysis attacks; effective protection requires layering multiple techniques.

Traffic Metadata

Which piece of metadata is visible to a network observer even when TLS 1.3 encrypts the HTTP request?

Encrypted Traffic Analysis: Key Takeaways

Encryption protects content but not metadata. Timing, packet sizes, and communication patterns reveal significant information. TLS SNI leaks the hostname in plaintext; QUIC's Encrypted Client Hello prevents this. Website fingerprinting can identify visited sites from traffic patterns. Tor is vulnerable to traffic correlation by global adversaries. DNS lookups before TLS reveal destinations unless DoH or DoT is used.

Frequently asked questions

Is the “Encrypted Traffic Analysis” lesson free?

Yes — the full text of “Encrypted Traffic Analysis” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.

What will I learn in “Encrypted Traffic Analysis”?

Discover that even encrypted traffic leaks metadata — timing, size, and traffic patterns. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cryptology Academy?

No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Encrypted Traffic Analysis” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cryptology Academy lesson?

Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Plaintext Protocols: What Attackers See
  2. How Packet Capture Works
  3. Encrypted Traffic Analysis
  4. DNS Security: DoH and DoT
← Back to Cryptology Academy