root / dotorg / v3 / html / tracker_peer_obfuscation.rst

Revision 10185, 4.2 kB (checked in by dave, 12 months ago)

Add Anthony Ciani to the author list.

Line 
1tracker peer obfuscation extension
2==================================
3
4This extends the tracker protocol to support simple obfuscation
5of the peers it returns, using the info hash as a shared secret between
6the peer and the tracker. The obfuscation does not provide any security
7against eavesdroppers that know the info-hash of the torrent, it does
8however make it a harder for an eavesdropper to listen on tracker
9traffic in general to pick up the responses.
10
11The goal is to prevent internet service providers and other network
12administrators from blocking or disrupting bittorrent traffic
13connections that span between the receiver of a tracker response and any peer
14IP-port appearing in that tracker response.
15
16The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
17"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are
18to be interpreted as described in IETF `RFC 2119`_.
19
20.. _`RFC 2119`: http://tools.ietf.org/html/rfc2119
21
22
23announce parameter
24------------------
25
26When using this extension, instead of passing the ``info_hash`` parameter
27to the tracker, an ``xor_ih`` is passed.
28
29The value of ``xor_ih`` MUST be the info-hash of the torrent, bit-wise XORed
30with the byte-wise reverse of itself.
31
32For example. If the info-hash is ``0102030405060708090a0b0c0d0e0f1011121314``
33(hex encoded), the value passed as the ``xor_ih`` should be:
34``0102030405060708091011121314`` XOR ``1413121110090807060504030201``. The
35value MUST be url encoded, just like the ``info_hash``.
36
37This extension does not change the semantics of any parameter.
38
39announce response
40-----------------
41
42If the tracker supports this extension, the response should be exactly the
43same as if the ``info_hash`` was passed, except that any field that contains
44peer information (such as ``peers``, ``peers6`` or any other field defined
45by another extension) MUST be bit-wise XORed by the info-hash.  So that
46XORed peer lists can be precomputed and retained in tracker memory
47without sacrificing the tracker's ability to return a random subset of
48peers, each ip-port pair MUST be XORed independently aligned to the
49beginning of the infohash.
50
51In the case ``peers`` (or another filed containing peer info) is not a single
52string, only the strings which contain the addresses and ports MUST be XORed.
53
54The tracker response MUST remain a valid bencoded message.
55
56backwards compatibility
57-----------------------
58
59Trackers that support obfuscation are identified in the .torrent file
60by the inclusion of the letter 'o' following 'http' in the URL, e.g.,
61httpo://tracker.bittorrent.com. 
62
63A client that is configured to use this extension should always send the
64``xor_ih`` to any tracker supporting 'o'.   Peers that do not recognize
65the 'httpo' will not contact that tracker.   If the tracker wishes
66to allow legacy peers to connect to the tracker then the announce
67URL should appear twice in the announce list.  Once with the 'httpo' and
68once with 'http'.  Even if a tracker appears twice in the announce list,
69if the tracker appears with an 'httpo' protocol in any announce URL, then
70peers that support obfuscation SHOULD NOT query the tracker without
71obfuscation since this would enable an attack where ISPs always discard
72the first tracker request.
73
74Peers SHOULD never send both infohash and XOR'd infohash
75parameters in the same request, since that would defeat the purpose of
76the shared secret.
77
78rationale
79---------
80
81By XORing the info-hash with itself the tracker is able to identify
82torrents without sending the plaintext infohash and without
83requiring an additional prior exchange of a shared secret.
84Where trackers now maintain mappings from infohash to the
85corresponding torrent's peerlist and other torrent-specific state. 
86Trackers would need one additional mapping from XORed infohash to
87the existing torrent's state.   If XORed peerlists are precomputed then
88this method adds no computational overhead when a peer queries the
89tracker for a peerlist.
90
91This method requires decidedly less computational or communication
92overhead than SSH or similar symmetric encryption methods.
93
94
95authors
96-------
97
98| `Greg Hazel`__
99| `David Harrison`__
100| `Arvid Norberg`__
101| `Anthony Ciani`__
102
103.. __: mailto:greg@bittorrent.com
104.. __: mailto:dave@bittorrent.com
105.. __: mailto:arvid@bittorrent.com
106.. __: mailto:tony@ciani.phy.uic.edu
Note: See TracBrowser for help on using the browser.