Commit c755b948 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

bring docs closer to reality


svn:r221
parent 474613b5
Loading
Loading
Loading
Loading
+10 −10
Changes for tor-spec.txt: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ which reveals the downstream node.

        First, the OP generates a pair of 8-byte symmetric keys (one
        [K_f] for the 'forward' stream from OP to OR, and one
        [K_b] for the 'backward' stream from OR to OP.
        [K_b] for the 'backward' stream from OR to OP).

        The OP generates a message [M] in the following format:
           Maximum bandwidth (bytes/s)      [4 bytes]
@@ -223,15 +223,15 @@ which reveals the downstream node.
3. Cell Packet format

   The basic unit of communication for onion routers and onion
   proxies is a fixed-width "Cell."  Each Cell contains the following
   proxies is a fixed-width "cell".  Each cell contains the following
   fields:

        ACI (anonymous circuit identifier)    [2 bytes]
        Command                               [1 byte]
        Length                                [1 byte]
        Sequence number (unused, set to 0)    [4 bytes]
        Payload (padded with 0 bytes)         [120 bytes]
                                         [Total size: 128 bytes]
        Payload (padded with 0 bytes)         [248 bytes]
                                         [Total size: 256 bytes]

   The 'Command' field holds one of the following values:
         0 -- PADDING     (Padding)                 (See Sec 6.2)
@@ -242,10 +242,10 @@ which reveals the downstream node.

   The interpretation of 'Length' and 'Payload' depend on the type of
   the cell.
      PADDING: Length is 0; Payload is 120 bytes of 0's. 
      CREATE: Length is a value between 1 and 120; the first 'length'
      PADDING: Length is 0; Payload is 248 bytes of 0's. 
      CREATE: Length is a value between 1 and 248; the first 'length'
        bytes of payload contain a portion of an onion.
      DATA: Length is a value between 4 and 120; the first 'length'
      DATA: Length is a value between 4 and 248; the first 'length'
        bytes of payload contain useful data.
      DESTROY: Neither field is used.
      SENDME: Length encodes a window size, payload is unused.
@@ -335,10 +335,10 @@ which reveals the downstream node.
          side, then let the high bit of the ACI be 1, else 0.

       3. To send M over the wire, prepend a 4-byte integer containing
          Len(M).  Call the result M'.  Let N=ceil(Len(M')/120).
          Len(M).  Call the result M'.  Let N=ceil(Len(M')/248).
          Divide M' into N chunks, such that:
             Chunk_I = M'[(I-1)*120:I*120]  for 1 <= I <= N-1
             Chunk_N = M'[(N-1)*120:Len(M')]
             Chunk_I = M'[(I-1)*248:I*248]  for 1 <= I <= N-1
             Chunk_N = M'[(N-1)*248:Len(M')]

       4. Send N CREATE cells along the connection, setting the ACI
          on each to the selected ACI, setting the payload on each to