Changeset 10891
- Timestamp:
- 02/19/2008 03:44:01 PM (10 months ago)
- Files:
-
- 1 modified
-
dotorg/trunk/html/beps/bep_0008.rst (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dotorg/trunk/html/beps/bep_0008.rst
r10851 r10891 23 23 24 24 25 Announce Parameter 26 ================== 25 Announce Parameters 26 =================== 27 27 28 28 When using this extension, instead of passing the ``info_hash`` parameter … … 39 39 ``sha_ih`` above when url encoded becomes 40 40 ``kO%89%A5N-%27%EC%D7%E8%DA%05%B4%AB%8F%D9%D1%D8%B1%19``. 41 42 If the ``sha_ih`` is passed then the value for the ``port`` parameter 43 should be treated as a 16 bit integer and must be obscured in the same 44 manner as the peer list as described in the `Obfuscation Method`_ 45 section. Similarly if the optional ``ip`` parameter is passed in the 46 announce then its value MUST also be so oscured. 41 47 42 48 This extension does not change the semantics of any parameter passed … … 55 61 These are discussed in the optimizations_ section. 56 62 57 Peer List Obfuscation 58 ===================== 63 Obfuscation Method 64 ================== 65 66 The values for the``ip`` and ``port`` announce parameters, the 67 *returned peer list* and any other values that contain peer 68 information are obscured using the method described in this section. 59 69 60 70 We distinguish between the *tracker peer list* and the *returned peer … … 68 78 of the ip-port pairs in the *tracker peer list*. 69 79 70 The returned peer list is encrypted using RC4-drop768 encryption using 71 the infohash as a shared secret and optionally employing an 72 initialization vector. 80 When a parameter is obscured, it is encrypted using RC4-drop768 81 encryption using the infohash as a shared secret and optionally 82 employing an initialization vector. 73 83 74 84 For the remainder of this document RC4 refers to RC4-drop768. In the … … 82 92 83 93 To communicate an initialization vector, the tracker includes in the 84 bencoded response the key``iv`` with value set to a byte string94 bencoded response the parameter ``iv`` with value set to a byte string 85 95 containing the initialization vector. The initialization vector can 86 be of arbitrary length and is sent in plaintext. 96 be of arbitrary length and is sent in plaintext. Initialization 97 vectors can only be applied to parameters in tracker responses and NOT 98 to announces. 87 99 88 100 If the tracker sends no initialization vector then the infohash is … … 134 146 135 147 The tracker MAY also cache the encrypted tracker peer list. To 136 support this the tracker MUST pass two additional keys *i* and *n*148 support this the tracker MUST pass two additional parameters *i* and *n* 137 149 each with 32-bit integer values, except the tracker MAY omit *i* and 138 150 *n* when *i=0* and the *returned peer list* is the entire *tracker peer … … 149 161 arbitrarily long pseudorandom string to support large swarms, we 150 162 assume the tracker bounds the length of the pseudorandom string and 151 reports the length in ip-port pairs as the value to key*n*. *n*163 reports the length in ip-port pairs as the value to parameter *n*. *n* 152 164 excludes reserved and discarded bytes. We RECOMMEND that *n* be equal 153 165 to the length of the tracker peer list or random but within constant … … 166 178 167 179 **Figure 1:** The first 768 bytes of the RC4 pseudorandom 168 string are discarded. The key*i* in the tracker response has169 value ``x xor i``. The key*n* has value ``y xor n``.180 string are discarded. The parameter *i* in the tracker response has 181 value ``x xor i``. The parameter *n* has value ``y xor n``. 170 182 171 183 We describe encryption in the following example for an ipv4 tracker peer … … 216 228 Trackers that support obfuscation are identified in the .torrent file 217 229 by the inclusion of an ``obfuscate-announce-list`` which otherwise has the 218 same semantics as the ``announce-list`` key. Peers that do not support230 same semantics as the ``announce-list`` parameter. Peers that do not support 219 231 obfuscation simply ignore the ``obfuscate-announce-list``. 220 232 … … 289 301 290 302 - The entire plaintext of the peer list is not easily obtained even if 291 an eavesdropper identifies ip-port pairs from subsequent connections 292 initiated by a peer that has received a tracker response. 303 an eavesdropper identifies one or more subsequent connections as 304 using BitTorrent and the corresponding ip-port pairs appeared in the 305 ciphertext of the tracker response. 293 306 294 307 - Even when a subsequent connection from a peer that has received a … … 315 328 and subsequent connections, it is possible to attack the encryption. 316 329 RC4 is known to have a number of weaknesses especially in the way it 317 was used with WEP [#Borisov]_ [#Scott]_ [#Stubblefeld]_. However, 318 with tracker peer obfuscation, the number of bytes transferred between 319 t he tracker and a client is likely significantly smaller than transferred330 is used with WEP [#Borisov]_ [#Scott]_ [#Stubblefeld]_. However, with 331 tracker peer obfuscation, the number of bytes transferred between the 332 tracker and a client is likely significantly smaller than transferred 320 333 between a wireless computer and a basestation. An attacker faces a 321 much larger task in obtaining sufficient probable plaintext to322 directly breakthe encryption.334 much larger task in obtaining sufficient ciphertext to directly break 335 the encryption. 323 336 324 337 Hobbling the RC4 encryption by using a bounded-length RC4 pseudorandom … … 336 349 peer-to-peer communication is available to network operators. 337 350 338 For larger swarms, hobbling RC4 may more significantly impact breaking 339 the encryption since the same pseudorandom string is used repeatedly 340 across the peer list. Some study is in order on this point taking 341 into account that the tracker can periodically change intiailization 342 vectors. 351 For larger swarms, hobbling RC4 may simplify breaking the encryption 352 since the same pseudorandom string is used repeatedly across the peer 353 list. Some study is in order taking into account that the tracker can 354 periodically change intiailization vectors. 343 355 344 356 We know from experience that periodically reshuffling peer lists on