Suppose I am to design a request-response protocol (similar HTTP). For the sake of simplicity let us assume that this is a "chat" protocol where the client can only perform two actions:
- Contribute a message to the chat, where the server responds verifying that the message was sent.
- Request the chat contents, where the server responds with the chat contents.
All requests and responses have confidentiality, authenticity and integrity assurances. Requests and responses are of variable size.
In this protocol, a passive attacker can apply traffic analysis to estimate the size of a message sent, estimate the size of the conversation contents and distinguish between the two types of requests and responses.
The most obvious way to combat this type of traffic-analysis is to send and receive messages of fixed length at fixed intervals, however, due to the nature of the protocol, this is not possible.
How does one combat traffic analysis in such protocols without changing the nature of the protocol or wasting (a lot) bandwidth?
Update: Some of the information derived from traffic analysis of the protocol is of negligible importance for civilian purposes. I am mainly attempting to reduce the amount of information gained from the length of a request or response.
Suppose that the server supports multiple "chatrooms".
Here are two examples of how an attacker could utilize the length of server responses:
- Given that different "chatrooms" do not have contents of equal size, the length of a server response to a "chat contents" request will differ for every "chatroom". This allows a passive attacker to distinguish between "chatrooms" that the user might be accessing.
- In the same way as above, a passive attacker that can monitor the traffic of two users can detect if they participate in the same "chatroom".