Bidirectional encrypted channels prevent detection attacks in two-way communication
Closing the Loop: Bidirectional Fully Encrypted Protocols
Cryptography and Security
Summary
Sending information secretly over the internet usually hides the message but might reveal patterns when messages go back and forth. The authors show that simply joining two one-way secret channels can leak clues exposing the conversation. They introduce a better way to build secret two-way channels that hide these clues and keep messages safe in both directions. They prove their method works and built it in Rust, showing current tools don’t meet these stronger safety rules.
What this means in practice
- •For network engineers: Design encrypted communication channels that prevent detection from traffic patterns in two-way network connections.
- •For secure messaging developers: Provide more secure underlying protocols to keep bidirectional message exchanges private against advanced network observers.
Authors
Baigang Chen, Nicholas Hopper
Abstract
Fully encrypted protocols (FEPs) provide encrypted channels that make all protocol-generated bytes computationally indistinguishable from uniform random strings. Several previous works have explored security definitions and constructions of unidirectional FEPs: protocols in which one party acts only as a sender, and the other acts only as a receiver. However, most applications require two-way information exchange, and a network adversary can observe communication in both directions and their shared lifetime. Because the semantics of bidirectional channels involve more complex shared state, it is possible that the ``naïve'' composition of two unidirectional channels can result in a two-way protocol that can be detected based on dependencies between the two directions, such as traffic imbalance, channel closure, failures, or connection tear-down. To address this issue, we introduce new formal security definitions for bidirectional FEPs that capture exact shaping, delivery, protocol-state integrity, private half-close, and cross-direction isolation, while revealing a public ``sending schedule'' and ``closing epoch'' that may be randomized. We show that the trivial composition fails to meet these definitions, leading to practical detection attacks. We then construct provably secure bidirectional FEPs (BiFEPs) for both the datastream and datagram settings. For datastream, we combine two direction-separated FEPs with a ``wrapper'' layer that prevents detection based on the mismatch between uni- and bi-directional connection states. For datagram, we add encrypted DATA/FIN/ACK with replay protection and loss-tolerant close. We validate the design through a Rust implementation and show that none of the surveyed deployed protocols provides the full set of BiFEP security properties.