SP2022: ShorTor: Improving Tor Network Latency Via Multi-hop Overlay Routing

The goal of this blog post is to provide a quick overview of the results presented in the following research paper:

ShorTor: Improving Tor Network Latency Via Multi-hop Overlay Routing by Kyle Hogan (MIT), Sacha Servan-Schreiber (MIT), Zachary Newman (MIT), Ben Weintraub (Northeastern University), Cristina Nita-Rotaru (Northeastern University), Srinivas Devadas (MIT)

which recently was presented in IEEE S&P 2022.

Tor

The onion routing (Tor) network is the most eminent anonymous network providing anonymity for end-users visiting web browsers [Dingledine et al.]. In this system, three relays involve in making the user-destination connections hide. A client will randomly choose three Tor relays and encrypts its message three times with their public keys, as a reason this routing is called source-routed. The first relay of the mentioned relays is the entry (guard) relay that receives packets from the source (users) and decrypts them with its private key then forwards them to the second hop (middle relay), a middle relay will remove a layer of encryption and repeat forwarding the packets to the last relay (exit relay). Then the exit relay will transfer the messages to the destinations (see the example in the below figure). This methodology can make the deanonymization of source-destination sophisticated as each hop can be aware of the next and the previous hop, they have no information about both the source (client) and the destination (server) [Dingledine et al.]. In addition, the number of active users in Tor has an essential role in providing anonymity cause Tor traffic is distinguished from other traffics on communication networks, though Tor users will be anonymous among each other.

Tor Network [Hogan et al.]

The Issue with latency in Tor

Creating an anonymous environment can be assumed as a positive user experience while it keeps company with the increased page load time (Latency), which is a negative user experience. Many works try to address this shortcoming in different ways. Most of them propose a modification in relay selection concerning the vicinity to the clients like Lastor [Akhoondi et al.], while these proposals are vulnerable to the adversaries who take advantage of proportional leakage about the identity of users and destinations [Hogan et al.].

ShorTor

ShorTor is a multi-hop overlay network that will be built on the top of the Tor network to reduce the pairwise relay latency resulting in high end-to-end latency reduction [Hogan et al.]. The main idea is coming from Content Delivery Networks (CDN) in which some CDN’s servers reside among the senders and recipients to force the network traffic to enter the mentioned servers in this way they may choose the fastest path among a group of senders and receivers. This may seem odd at the first sight while looking into BGP protocols for prioritizing routes through the network [Hogan et al.], we can grasp it may suggest a longer path. BGP mainly considers the business relationships of ASes (Autonomous Systems) for instance an AS prefers to send the traffic to its siblings rather than a peer AS.
ShorTor utilizes CDN’s idea to add some via relays on an established circuit (a sequence of guard, middle, and exit relays) by a user. Via relays can lie between the guard and the middle relays, or the middle and the exit relays. Via relays, chosen by circuit relays, will not participate in the decryption process. They have been supposed to receive and forward a cell from the previous-hop to the next hop. We can define a via relays as a role for Tor relays.

Routing packets through a via relay to lower the latency [Hogan et al.].

Via Selection in ShorTor:

Detailing about ShorTor we draw your attention to its protocols designed to make it translatable to the practice, mainly they cause recognition of Via relays, through 1) latency measurements and 2) data race, though improving the efficiency, we should avoid 3) corner cases.

  • Latency Measurements

At the very beginning, all relays need to estimate round trip latency from them to each other relays. This measurement can be done by Ting [Cangialosi et al.] methods in which observers collaborate to measure round trip latency from relay A to relay B as following lines.

Measuring latency between relay A to Relay B may contain forwarding delays of relay A and relay B, so the final formulation looks like the below.

Completing the latency measurement process, both source relay and destination relay will send the round trip latency from possible via, thereby they can compare it with the Round Trip Time (RTT) of the direct path to identify vias can make the direct path faster. They may save the data in a list of via candidates. This process is just for narrowing down the possible candidates, in a data race, they recognize the best via relay among the derived lists. They should make another test to avoid misreported latency by dishonest vias, the effect of the asymmetry nature of the network, and unforeseeable congestion happening via relays [Hogan et al.].

  • Data Race

In a data race, a circuit relay will send a cell directly to the destination relay and a copy of it to each vias from the candidate list. Therefore destination relay can easily identify the first received packets, consequently, the relay can make the path shorter. In this way, a dishonest via relay can not forge another IP address as it has to receive the packets from the previous hop and then send it to the honest destination relay, even though it’s not worthwhile for a dishonest destination relay to put its via on the path by lying about the received cell since it will not give him more advantage [Hogan et al.].

Data Race [Hogan et al.].
  • Corner Cases

Besides mentioned protocol to make ShorTor viable we need to avoid some corner cases in the communication network, like traffic loop, oscillation, and unfairly prioritized streams.
We can define a traffic loop by considering a packet pass multiple time to a distinct via which impose a high risk of correlation attack on the Tor network. For the sake of a solution, a network designer should prevent assigning a via relay twice for a certain circuit or a relay circuit should not collaborate as via.
Moreover, in some cases, a stream will be sent to an overwhelmed via which unintentionally may pass the traffic to the next candidate, The new via also can be overloaded by other cells related to parallel circuits, thereby it passes the traffic to the previous choice. This situation can turn into an oscillation and cause high latency on Tor. To tackle the problem, the capacity and a backoff time will be assigned to the via relays, meaning they no longer accept a new cell if they already are about to be overloaded. They will be left out for a random exponential delay as back-off time [Hogan et al.].

The oscillation between vias.

ShorTor also should guarantee the fairness among the circuit stream and via stream, already Tor applied some policies to take the priorities, as an instance it will put the web browsing first the give the priority to large file downloads while via stream can have a priority in between in more detail you can have a glance to below figure to grasp the prioritization process. First via and circuit streams enter to a multiplexer, then TLS layer decryption and onion encryption-decryption will be done, streams will be queued, They’ll be sent prioritized to the output buffer, and a TLS encryption layer will be added [Hogan et al.].

Fairness in ShorTor [Hogan et al.].

Evaluation

ShorTor has been evaluated by considering 1000 popular Tor relays caring for 75 percent of Tor traffic. In the below plots, the pairwise latency of relays has been compared with the baseline Tor. As it can be seen the 99.9th percentile of relay pairs see a reduction in RTT from 487 ms in Tor to 125 ms in ShorTor. Additionally, 25.4 percent of relay pairs cut their RTT in half (or more) using ShorTor [Hogan et al.].

Comparing Baseline Tor with ShorTor in terms of latency [Hogan et al.].

In the below figure you also can see the result on the circuit implying an improvement in the end-to-end latency while using the ShorTor.

Anoa Analysis

It would not go amiss if we indicate to the privacy analysis that has been done in Anoa framework [Backes et al.], which considers perturbed stream by relay adversaries trying to deanonymize destination or user, while we define sender(recipient) anonymity as the probability of being distinguished among another pair of the sender(recipient) by a set of relay adversaries. In this view probability of matching a receiver to the sender can be related to the relation anonymity. However, we can grasp that in ShorTor they enhance the chance of relay adversaries to be around current streams. In other words, it gives more observation chance to relay adversaries, while a via relay just can identify two Tor relays like middle and exit relays or guard or middle relays. So its view is strictly less than a compromised middle relay which can see all circuit relay, even a compromised middle relay will not be able to increase the Anon’s defined probabilities so ShoTor complies with Anoa framework.

ShorTor + LasTor

As an additional point, we can mention that using biasing methods like LasTor along with the ShorTor can make life harder than Baseline Tor as in selective path algorithm identifying circuit relays also can increase the possibility of the correlation attack [Hogan et al.].

Conclusion

ShorTor introduces a low latency path with help of via relays, which make improvements in baseline tor routing policies, exploiting via relays need an extra bandwidth estimated 1/3 more than the current Tor relay’s bandwidth, though being a via is an optional role that a Tor relay can take it or leave it, regarding the minimum change ShorTor can have a great impact on Tor. Furthermore, it seems it can be used for other anonymous systems like mix networks.

Mahdi Rahimi

June 15 2022, Leuven.