Practical measurement and mitigation evaluation of packet-length side-channel attacks on self-deployed Ollama streaming responses
The author moves a packet-length side-channel attack against commercial APIs from public research into a practical measurement in a self-deployed Ollama setting, noting that TLS encryption protects only content while the packet-length sequence of streaming responses still exposes traffic shape. The experiment uses real packet captures of 10 categories of Chinese topics and random forest classification to measure conversation-topic inference accuracy, then measures the accuracy degradation and latency cost of each of five mitigations—disabling streaming, reverse-proxy buffering, random padding, fixed-length padding and timing jitter—and gives deployable conclusions at the deployment layer. This line of attack originates from the March 2024 USENIX Security '24 paper by Weiss et al. of Ben-Gurion University (arXiv:2403.09751), which turned the token-length side channel of streaming responses into a remote keylogging attack that recovers conversation text token by token from encrypted traffic.