Improving Tor using a TCP-over-DTLS Tunnel Joel Reardon Ian - - PowerPoint PPT Presentation

improving tor using a tcp over dtls tunnel joel reardon
SMART_READER_LITE
LIVE PREVIEW

Improving Tor using a TCP-over-DTLS Tunnel Joel Reardon Ian - - PowerPoint PPT Presentation

Improving Tor using a TCP-over-DTLS Tunnel Joel Reardon Ian Goldberg Google Zurich University of Waterloo 18th USENIX Security Symposium August 12th, 2009 Tor: Internet anonymity tool 2 Problem 3 Tor Network 4 Tor: circuit construction


slide-1
SLIDE 1

Improving Tor using a TCP-over-DTLS Tunnel Joel Reardon Ian Goldberg

Google Zurich University of Waterloo 18th USENIX Security Symposium August 12th, 2009

slide-2
SLIDE 2

Tor: Internet anonymity tool

2

slide-3
SLIDE 3

Problem

3

slide-4
SLIDE 4

Tor Network

4

slide-5
SLIDE 5

Tor: circuit construction

5

slide-6
SLIDE 6

Tor: circuit construction

6

slide-7
SLIDE 7

Tor: circuit construction

7

slide-8
SLIDE 8

Tor: circuit construction

8

slide-9
SLIDE 9

Tor

Privacy for usable, low-latency communication. However it can be slow, and that discourages casual usage.

9

slide-10
SLIDE 10

Where is the observed latency?

10

slide-11
SLIDE 11

Tor’s Datapath

  • Input

Buffer Output Buffer Socket Socket Input Buffer Router Output Buffer Output Buffer Input Buffer Onion Router Input Buffer Router Output Buffer Output Buffer Input Buffer Onion Router Server Socket

Onion Proxy

Proxy

Datapath

11

slide-12
SLIDE 12

Output buffers do introduce some latency

2 4 6 8 10

Time (min)

2 4 6 8 10 12 14 16 Datalength (KB)

(c) Buffer Length over Time

2 4 6 8 10

Time (min)

50 100 150 200 250 300 Waiting Time (milliseconds)

(a) Waiting Times over Time

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

Waiting Time (milliseconds)

20 40 60 80 100 Percentile

(b) Waiting Times CDF

2 4 6 8 10 12 14 16

Buffer Length (KB)

20 40 60 80 100 Percentile

(d) Buffer Length CDF

Output Buffer Size and Latency 12

slide-13
SLIDE 13

This occurs when the socket is unwritable

13

slide-14
SLIDE 14

A brief outline of TCP

TCP is designed to reliably send streams of data using packets Congestion controls throttles sending to maximize throughput while avoiding packet drops.

14

slide-15
SLIDE 15

Of what are TCP output buffers composed?

100 200 300 400 500 600 Time (seconds) 5 10 15 20 25 30 35 40 Socket Output Buffer Size (KB)

Socket Output Buffer Size and Unacknowledged Packets Socket Output Buffer Size Unacknowledged Packets Unwritable Socket 15

slide-16
SLIDE 16

TCP Congestion Control (C/C) is to blame.

16

slide-17
SLIDE 17

Tor’s multiplexing of circuits over TCP

b b a a a, b OR OR OR OR OR OR

If C/C is applied to a, then it is also applied to b This is suboptimal; TCP is designed to throttle individual connections based on whether they witness a packet drop—proportional to their traffic.

17

slide-18
SLIDE 18

An example of cross-circuit interference

100 200 300 400 500 600 700 Time (seconds) 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Data (MB)

Buffer Sizes across Circuits

18

slide-19
SLIDE 19

Experiment to observe interference by bulk senders

Circuit Delay Circuit delay while peer under load 200 400 600 800 1000 1200 1400 1600

Delay (ms)

19

slide-20
SLIDE 20

Packet Dropping / Reordering

OR OR TCP Stream (over network) Readable

Kernel TCP

Buffered / Waiting

20

slide-21
SLIDE 21

We want to use a separate TCP connection for each circuit

21

slide-22
SLIDE 22

Concerns for separate TCP connections

Individual TCP streams leak precise information about the size and rate of data to an adversary Tor already faces some scalability concerns regarding its clique topology Some versions of Windows suffer when opening many TCP sockets already Any modification must be backwards compatible with the existing Tor network

22

slide-23
SLIDE 23

Our novel proposal: a TCP-over-DTLS tunnel

DTLS - a secure (cf. TLS) protocol for transporting datagrams (UDP sockets) TCP implementation in user-space is used to generate TCP/IP packets, which are sent over DTLS The other end injects the received packet into their user-level TCP stack, and reads from user-level sockets

23

slide-24
SLIDE 24

How TCP-over-DTLS addresses our issues

Application Payload TCP IP IP DTLS Application Payload TLS UDP TORTP (b) TCP−over−DTLS Tor (a) TCP Tor

24

slide-25
SLIDE 25

How TCP-over-DTLS addresses our issues

UDP operates in an unconnected mode, so it accepts packets from any destination Each node advertises a UDP socket that multiplexes data for all connections The sender is used to demultiplex the proper connection that is used to decrypt the DTLS payload Nodes that do not offer a UDP socket will use the existing transport, assuring backwards compatibility

25

slide-26
SLIDE 26

Packet / Streams translation

cell_unpack Sockets TCP TCP Buffers cell_pack

Tor Interface

Processing Tor UDP Socket tx() rx() recv() send() Packets Streams DTLS decrypt DTLS encrypt TCP Re/Transmit Thread

User−level TCP

26

slide-27
SLIDE 27

How TCP-over-DTLS addresses our issues

OR OR UDP Stream (over network)

Kernel UDP

RXed Packets

User TCP

Buffered/Waiting Readable m Readable

27

slide-28
SLIDE 28

Experimental results from our implementation

28

slide-29
SLIDE 29

Circuit latency comparison

Base Delay Delay under Load 200 400 600 800 1000 1200 1400 1600

Delay (ms) TCP-over-DTLS Tor TCP Tor

29

slide-30
SLIDE 30

Future Work

30

slide-31
SLIDE 31

Improved Memory Management socket 1’s output buffer: 1, 3, 11, 8 empty list: 2, 5, 9, 4 socket 1’s input buffer: 0, 6, 7 cell_t data: 10 Cell Pool 1 2 3 4 5 6 7 8 9 10 11

31

slide-32
SLIDE 32

Back-propagation of Congestion Window

TCP cwnd=15 actual cwnd=10 data ack, cwnd=10 TCP cwnd=20 actual cwnd=10 data ack, cwnd=10 actual cwnd=10 TCP cwnd=10

32

slide-33
SLIDE 33

Summary

We determined that TCP congestion control introduces latency into Tor’s datapath We determined that multiplexing circuits over TCP results in the unfair application of congestion control We proposed TCP-over-DTLS: a solution to address this issue that also addresses scalability issues and is backwards compatible with the existing Tor network We implemented our proposal and showed it successfully addressed cross-circuit interference.

33