aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-10 20:14:37 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-10 20:14:37 +0000
commit954570486f6d468e9e88415d728965daae62094b (patch)
tree2d222365301f020c6874694e2e77b8393c0f5578 /doc
parent35d0d3c050f3ce1290792f1a2906b8b29941c66d (diff)
downloadtor-954570486f6d468e9e88415d728965daae62094b.tar
tor-954570486f6d468e9e88415d728965daae62094b.tar.gz
Resolve a FIXME: use identity comparison, not nickname comparison, to
choose circuit ID types. This is important because our view of "the nickname of the router on the other side of this connection" is skewed, and depends on whether we think the other rotuer is verified--and there's no way to know whether another router thinks you are verified. For backward compatibility, we notice when the other router chooses the same circuit ID type as us (because it's running an old version), and switch our type to be polite. svn:r2797
Diffstat (limited to 'doc')
-rw-r--r--doc/tor-spec.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/doc/tor-spec.txt b/doc/tor-spec.txt
index 95e724287..7efcc87a7 100644
--- a/doc/tor-spec.txt
+++ b/doc/tor-spec.txt
@@ -198,13 +198,19 @@ TODO: (very soon)
DH data (g^y) [128 bytes]
Derivative key data (KH) [20 bytes] <see 4.2 below>
- The CircID for a CREATE cell is an arbitrarily chosen 2-byte
- integer, selected by the node (OP or OR) that sends the CREATE
- cell. To prevent CircID collisions, when one OR sends a CREATE
- cell to another, it chooses from only one half of the possible
- values based on the ORs' nicknames: if the sending OR has a
- lexicographically earlier nickname, it chooses a CircID with a high
- bit of 0; otherwise, it chooses a CircID with a high bit of 1.
+ The CircID for a CREATE cell is an arbitrarily chosen 2-byte integer,
+ selected by the node (OP or OR) that sends the CREATE cell. To prevent
+ CircID collisions, when one OR sends a CREATE cell to another, it chooses
+ from only one half of the possible values based on the ORs' public
+ identity keys: if the sending OR has a lower key, it chooses a CircID with
+ an MSB of 0; otherwise, it chooses a CircID with an MSB of 1.
+
+ Public keys are compared numerically by modulus.
+
+ (Older versions of Tor compared OR nicknames, and did it in a broken and
+ unreliable way. To support versions of Tor earlier than 0.0.9pre6,
+ implementations should notice when the other side of a connection is
+ sending CREATE cells with the "wrong" MSG, and switch accordingly.)
4.2. Setting circuit keys