From 4cfffbb9267e414dd5027a9f827b48badf58f037 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 31 Jan 2004 07:36:38 +0000 Subject: [PATCH] add in a brief cell structure diagram svn:r1036 --- doc/cell-struct.eps | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/cell-struct.fig | 49 ++++++++++++++ doc/cell-struct.pdf | Bin 0 -> 6168 bytes doc/tor-design.tex | 29 ++++++-- 4 files changed, 260 insertions(+), 7 deletions(-) create mode 100644 doc/cell-struct.eps create mode 100644 doc/cell-struct.fig create mode 100644 doc/cell-struct.pdf diff --git a/doc/cell-struct.eps b/doc/cell-struct.eps new file mode 100644 index 0000000000..f5debaa6dd --- /dev/null +++ b/doc/cell-struct.eps @@ -0,0 +1,189 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: cell-struct.fig +%%Creator: fig2dev Version 3.2 Patchlevel 4 +%%CreationDate: Sat Jan 31 02:13:55 2004 +%%For: root@last-request (root) +%%BoundingBox: 0 0 254 73 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 73 moveto 0 0 lineto 254 0 lineto 254 73 lineto closepath clip newpath +-35.3 77.2 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06000 0.06000 sc +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +7.500 slw +n 1200 975 m + 1200 1275 l gs col0 s gr +% Polyline +n 1725 975 m + 1725 1275 l gs col0 s gr +% Polyline +n 600 975 m 4800 975 l 4800 1275 l 600 1275 l + cp gs col0 s gr +% Polyline +n 1200 300 m + 1200 600 l gs col0 s gr +% Polyline +n 1725 300 m + 1725 600 l gs col0 s gr +% Polyline +n 600 300 m 4800 300 l 4800 600 l 600 600 l + cp gs col0 s gr +% Polyline +n 2550 975 m + 2550 1275 l gs col0 s gr +% Polyline +n 3150 975 m + 3150 1275 l gs col0 s gr +% Polyline +n 3450 975 m + 3450 1275 l gs col0 s gr +% Polyline +n 3900 975 m + 3900 1275 l gs col0 s gr +/Times-Roman ff 180.00 scf sf +675 1200 m +gs 1 -1 sc (CircID) col0 sh gr +/Times-Roman ff 180.00 scf sf +900 900 m +gs 1 -1 sc (2) col0 sh gr +/Times-Roman ff 180.00 scf sf +1425 900 m +gs 1 -1 sc (1) col0 sh gr +/Times-Roman ff 180.00 scf sf +1275 1200 m +gs 1 -1 sc (Relay) col0 sh gr +/Times-Roman ff 180.00 scf sf +1800 1200 m +gs 1 -1 sc (StreamID) col0 sh gr +/Times-Roman ff 180.00 scf sf +2625 1200 m +gs 1 -1 sc (Digest) col0 sh gr +/Times-Roman ff 180.00 scf sf +3150 1200 m +gs 1 -1 sc (Len) col0 sh gr +/Times-Roman ff 180.00 scf sf +4200 1200 m +gs 1 -1 sc (DATA) col0 sh gr +/Times-Roman ff 180.00 scf sf +675 525 m +gs 1 -1 sc (CircID) col0 sh gr +/Times-Roman ff 180.00 scf sf +1275 525 m +gs 1 -1 sc (CMD) col0 sh gr +/Times-Roman ff 180.00 scf sf +900 225 m +gs 1 -1 sc (2) col0 sh gr +/Times-Roman ff 180.00 scf sf +1425 225 m +gs 1 -1 sc (1) col0 sh gr +/Times-Roman ff 180.00 scf sf +3225 525 m +gs 1 -1 sc (DATA) col0 sh gr +/Times-Roman ff 180.00 scf sf +2100 900 m +gs 1 -1 sc (6) col0 sh gr +/Times-Roman ff 180.00 scf sf +2850 900 m +gs 1 -1 sc (4) col0 sh gr +/Times-Roman ff 180.00 scf sf +3225 900 m +gs 1 -1 sc (2) col0 sh gr +/Times-Roman ff 180.00 scf sf +3450 1200 m +gs 1 -1 sc (CMD) col0 sh gr +/Times-Roman ff 180.00 scf sf +3600 900 m +gs 1 -1 sc (1) col0 sh gr +/Times-Roman ff 180.00 scf sf +4350 900 m +gs 1 -1 sc (496) col0 sh gr +/Times-Roman ff 180.00 scf sf +3300 225 m +gs 1 -1 sc (509 bytes) col0 sh gr +% here ends figure; +$F2psEnd +rs +showpage diff --git a/doc/cell-struct.fig b/doc/cell-struct.fig new file mode 100644 index 0000000000..d777131cc9 --- /dev/null +++ b/doc/cell-struct.fig @@ -0,0 +1,49 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 975 1200 1275 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1725 975 1725 1275 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 600 975 4800 975 4800 1275 600 1275 600 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 300 1200 600 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1725 300 1725 600 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 600 300 4800 300 4800 600 600 600 600 300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 975 2550 1275 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3150 975 3150 1275 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3450 975 3450 1275 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3900 975 3900 1275 +4 0 0 50 -1 0 12 0.0000 4 135 510 675 1200 CircID\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 900 900 2\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 1425 900 1\001 +4 0 0 50 -1 0 12 0.0000 4 180 435 1275 1200 Relay\001 +4 0 0 50 -1 0 12 0.0000 4 135 735 1800 1200 StreamID\001 +4 0 0 50 -1 0 12 0.0000 4 180 510 2625 1200 Digest\001 +4 0 0 50 -1 0 12 0.0000 4 135 285 3150 1200 Len\001 +4 0 0 50 -1 0 12 0.0000 4 135 510 4200 1200 DATA\001 +4 0 0 50 -1 0 12 0.0000 4 135 510 675 525 CircID\001 +4 0 0 50 -1 0 12 0.0000 4 135 420 1275 525 CMD\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 900 225 2\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 1425 225 1\001 +4 0 0 50 -1 0 12 0.0000 4 135 510 3225 525 DATA\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 2100 900 6\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 2850 900 4\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 3225 900 2\001 +4 0 0 50 -1 0 12 0.0000 4 135 420 3450 1200 CMD\001 +4 0 0 50 -1 0 12 0.0000 4 135 90 3600 900 1\001 +4 0 0 50 -1 0 12 0.0000 4 135 270 4350 900 496\001 +4 0 0 50 -1 0 12 0.0000 4 180 735 3300 225 509 bytes\001 diff --git a/doc/cell-struct.pdf b/doc/cell-struct.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3980e4f2cf3d50b983dd2fd3c42c123bf0185ffd GIT binary patch literal 6168 zcwV(wc|4Tu*N>8?(I+CZgd36lp54g4W?#mZEe!@^nPFzErIb9DJj#|OWXYZ-dzPZ2 zBw1P{qD9Cqq{Z^ic<{75@9+KR{mtid?)zNdvs~vo=iJw4u1nNJQ(Fcmi-3qen7Wh= zK?6{L=Q=Zw$nsBlxbGHQRo~7COFPznU&Z4)KDPy=x%`Cf& zq-I_>Ykv+f@y^RW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E zPxJ=e#4MZ_-_~#hWZUd zU=Y7zFc=K^o1UD!{I3|2p2pww5dVVxu7^Y;(f?pnGLGPhCvRNQnh}EVv|IromPDcg i8<)KRs7rJq0o!-I6e^BP-N-5m1A{_DMYW8zA^!tQikE%> literal 0 HcwPel00001 diff --git a/doc/tor-design.tex b/doc/tor-design.tex index f931bb95af..56880278c2 100644 --- a/doc/tor-design.tex +++ b/doc/tor-design.tex @@ -6,6 +6,7 @@ \usepackage{url} \usepackage{graphics} \usepackage{amsmath} +\usepackage{epsfig} \pagestyle{plain} @@ -36,6 +37,12 @@ % \setlength{\topsep}{0mm} }}{\end{list}} +% Cut down on whitespace above and below figures displayed at head/foot of +% page. +\setlength{\textfloatsep}{3mm} +% Cut down on whitespace above and below figures displayed in middle of page +\setlength{\intextsep}{3mm} + \begin{document} %% Use dvipdfm instead. --DH @@ -168,8 +175,8 @@ that can be unreliable and complex. % open to partitioning attacks. Tor takes a simplified view toward distributing this information. Certain more trusted nodes act as \emph{directory servers}: they provide signed directories describing known -routers and their current state. Users periodically download these -directories via HTTP. +routers and their current state. Users periodically download them +via HTTP. \textbf{Variable exit policies:} Tor provides a consistent mechanism for each node to advertise a policy describing the hosts @@ -595,9 +602,7 @@ checking; the length of the relay payload; and a relay command. The entire contents of the relay header and the relay cell payload are encrypted or decrypted together as the relay cell moves along the circuit, using the 128-bit AES cipher in counter mode to generate a -cipher stream. -The -relay commands are: \emph{relay +cipher stream. The relay commands are: \emph{relay data} (for data flowing down the stream), \emph{relay begin} (to open a stream), \emph{relay end} (to close a stream cleanly), \emph{relay teardown} (to close a broken stream), \emph{relay connected} @@ -607,7 +612,17 @@ and to acknowledge), \emph{relay truncate} and \emph{relay truncated} (to tear down only part of the circuit, and to acknowledge), \emph{relay sendme} (used for congestion control), and \emph{relay drop} (used to implement long-range dummies). -We describe each of these cell types and commands in more detail below. +We give a visual overview of cell structure plus the details of relay +cell structure, and then describe each of these cell types and commands +in more detail below. + +\begin{figure}[h] +\unitlength=1cm +\centering +\begin{picture}(8.0,1.5) +\put(4,.5){\makebox(0,0)[c]{\epsfig{file=cell-struct,width=7cm}}} +\end{picture} +\end{figure} \SubSection{Circuits and streams} \label{subsec:circuits} @@ -1816,7 +1831,7 @@ application integration is described more fully below. service from the DHT. \item Alice chooses an OR as the rendezvous point (RP) for this transaction. She builds a circuit to the RP, and gives it a - rendezvous cookie that it will use to recognize Bob. + rendezvous cookie to recognize Bob. \item Alice opens an anonymous stream to one of Bob's introduction points, and gives it a message (encrypted to Bob's public key) that tells him -- 2.11.4.GIT