Definition
Traffic analysis is learning information from the visible pattern of communication, without reading its content: who communicates with whom, when, how often, how much, and in packets of what size. Traffic analysis defenses make chosen parts of that pattern identical across the activities to be hidden. Padding equalizes sizes; fixed-rate sending and cover traffic equalize timing and volume; mixing and relaying hide which incoming message became which outgoing one. Each defense removes specific distinctions, for a specific observer, at a cost in bandwidth, delay or energy.
The idea
A home security sensor encrypts everything it sends. When nothing happens, it sends a 40-byte status message; when it detects motion, it sends a 400-byte report. An eavesdropper who cannot decrypt a single byte still learns when someone moves in the house, from the sizes alone. Encryption hides content. It does not hide length, timing, volume or the addresses of the two ends. The same leak has been shown in practice: researchers have recovered spoken phrases from encrypted voice calls whose packet sizes varied with the sounds being encoded.
A defense works by making two situations look the same in the feature the observer watches. Picture a writer who sends every letter in the same size of envelope, at the same hour each day, whether or not there is anything to say. The picture also shows where each defense stops: the address on the envelope, the fact that letters flow between these two people, and anything the postman can do to the letters are untouched.
How it works
Metadata is data about a communication rather than its content. The defenses below each equalize different metadata.
Padding. The sender adds filler bytes before encryption, so that the encrypted length no longer follows the content. Padding to a multiple of a block size makes a few length classes; padding to one fixed size makes a single class. RFC 8467 recommends that encrypted DNS (Domain Name System) queries be padded to a multiple of 128 bytes and responses to a multiple of 468 bytes [356], and TLS 1.3 (Transport Layer Security version 1.3) lets a sender pad each encrypted record. Padding hides length differences within a class; it leaves timing, message count and endpoints visible.
Fixed-rate sending. The sender transmits one record of fixed size at fixed intervals, carrying real data when there is some and filler otherwise. This hides when real messages occur and how many there are, as long as real demand fits in the schedule.
Cover traffic. The sender adds dummy messages that look like real ones, at random or scheduled times. Fixed-rate sending is the strictest form of cover traffic. A dummy helps only if the observer cannot tell it from a real message: the same size, the same encryption, and the same handling at the receiver, including replies.
Batching and mixing. David Chaum introduced the mix in 1981: a server that collects a batch of messages encrypted to it, removes one layer of encryption from each so that input and output bytes differ, discards repeated inputs, and sends the batch out in a different order. An observer of the mix cannot match an outgoing message to an incoming one beyond knowing that both belong to the same batch.
Relaying with layered encryption. Messages pass through several relays, each of which removes one layer of encryption and learns only the previous and the next hop, so that no single relay sees both ends. Low-latency networks such as Tor, which forward each packet at once, do not hide the ends from an observer who watches both and matches timing.
For each defense, state the distinction it removes, the observer it removes it for, and what stays visible.
Worked example
Padding to blocks of bytes. The 40-byte status needs block, so it becomes 128 bytes, with bytes of filler. The 400-byte report needs blocks, so it becomes bytes, with bytes of filler. Here is rounded up to a whole number. The two classes, 128 and 512 bytes, are still easy to tell apart.
Padding to one fixed size of 512 bytes. Both messages become 512 bytes, with and bytes of filler. The size distinction is gone for every payload up to 512 bytes. Suppose 90% of messages are status messages and 10% are reports. The average payload is bytes. Fixed padding sends 512 bytes per message, times the payload. Block padding sends on average bytes, times the payload, which is cheaper but leaks the class.
Fixed-rate sending. One 512-byte record every 10 ms is 100 records per second, bytes per second, which is bits per second, before protocol headers, whether or not anything happens. If real demand is 2 messages per second, 98 of every 100 records are filler. A message that arrives when the queue is empty waits for the next slot: at most 10 ms, and on average 5 ms if arrival times are spread evenly. If 150 messages arrive within one second, only 100 slots exist, so at least 50 must wait in a queue or be dropped. The extra delay can itself be visible, for example in later replies, which creates a new distinction; a bounded queue §9.31 with a stated policy for overflow keeps this behavior defined.
Stated precisely
Block padding: for a block size of bytes and a payload of bytes, the padded length is bytes. Fixed padding to bytes maps every payload of at most bytes to bytes; a longer payload must be split into several records, which reveals the count, or refused. Both formulas count payload bytes only, not the headers and authentication §1.6 tag that encryption and transport add.
General contract: let be what the observer records when activity takes place, such as the list of times, sizes, sources and destinations of the packets it sees. A defense removes the distinction between activities and for that observer if and have the same probability distribution, or distributions that the observer cannot tell apart with advantage greater than a stated . Padding to makes the size component identical for all payloads up to . Fixed-rate sending makes times and sizes identical for all activities whose demand never exceeds the schedule. Neither changes sources or destinations.
These statements rest on three assumptions.
Real and filler records are identical after encryption: same length, and encryption that hides content, such as authenticated encryption §5.16.
The sender’s timing does not depend on content; for example, preparing a report does not delay the next slot.
The observer is passive: it watches but does not delay, drop or insert packets.
Limits and common mistakes
Each defense covers only the features it equalizes. Padding leaves timing and endpoints; fixed-rate sending leaves endpoints and the existence of the connection; relays leave timing at both ends.
Compressing data before encrypting it makes the length depend on the content. Attacks on encrypted web traffic have recovered secrets this way, by injecting guesses and watching the compressed length shrink when a guess matched.
Active observers defeat passive defenses. An attacker can delay packets in a recognizable pattern and look for that pattern elsewhere, or flood a mix with its own messages so that only one real message is in each batch, an attack known as the attack.
Leaks accumulate over time. Even a good mix leaks if, over many rounds, one recipient receives a message whenever a particular sender has sent one.
Every defense costs bandwidth, delay or energy. On a battery-powered radio device, fixed-rate sending can dominate the energy budget, and a schedule that cannot carry peak demand trades secrecy against availability §1.10.
Traffic analysis exploits a side channel §1.29 of communication: information that leaks through an effect other than the intended output. Defending the network pattern does not close side channels inside the device, such as power use or the time a computation takes.
Questions answered
Which metadata distinctions does padding or cover traffic actually remove, and at what cost?
Padding removes only differences in message length, and only within the range it pads to; cover traffic, in its strict form of fixed-rate sending, removes differences in when and how much is sent, but only while real demand fits in the schedule. Metadata means the visible facts about communication other than its content. Neither defense hides which two endpoints communicate, that a connection exists, or how long it lasts.
The costs are concrete. Padding a 40-byte message and a 400-byte message both to 512 bytes removes their size difference but adds 472 and 112 filler bytes; if 90% of messages are 40 bytes and 10% are 400 bytes, the link carries about 6.7 times the payload. Padding to 128-byte blocks costs only about 2.2 times the payload but leaves two visible sizes, 128 and 512 bytes. Sending one 512-byte record every 10 ms costs 51,200 bytes per second at all times, adds up to 10 ms of delay to each message, and needs a defined behavior when demand exceeds 100 messages per second. The defenses work only if filler cannot be told apart from real data and the observer is passive.
Related entries: Anonymity (§5.45), Unlinkability (§5.46), Confidentiality (§1.8), Availability (§1.10). Further reading: [100, 101, 356].