BitTorrent protocow encryption

From Wikipedia, de free encycwopedia
Jump to: navigation, search

Protocow encryption (PE), message stream encryption (MSE) or protocow header encrypt (PHE)[a] are rewated features of some peer-to-peer fiwe-sharing cwients, incwuding BitTorrent cwients. They attempt to enhance privacy and confidentiawity. In addition, dey attempt to make traffic harder to identify by dird parties incwuding internet service providers (ISPs).

MSE/PE is impwemented in BitComet, BitTornado, Dewuge, Fwashget, KTorrent, wibtorrent (used by various BitTorrent cwients, incwuding qBittorrent), Mainwine, µTorrent, qBittorrent, rTorrent, Transmission, Tixati and Vuze. PHE was impwemented in owd versions of BitComet. Simiwar protocow obfuscation is supported in up-to-date versions of some oder (non-BitTorrent) systems incwuding eMuwe.[1]


As of January 2005, BitTorrent traffic made up more dan a dird of totaw residentiaw internet traffic,[2] awdough dis dropped to wess dan 20% as of 2009.[3] Some ISPs deaw wif dis traffic by increasing deir capacity whiwst oders use speciawised systems to swow peer-to-peer traffic to cut costs. Obfuscation and encryption make traffic harder to detect and derefore harder to drottwe. These systems were designed initiawwy to provide anonymity or confidentiawity, but became reqwired in countries where Internet Service Providers were granted de power to drottwe BitTorrent users and even ban dose dey bewieved were guiwty of iwwegaw fiwe sharing.


Earwy approach[edit]

Protocow header encryption (PHE) was conceived by RnySmiwe and first impwemented in BitComet version 0.60 on 8 September 2005. Some software wike IPP2P cwaims BitComet traffic is detectabwe even wif PHE.[4] PHE is detectabwe because onwy part of de stream is encrypted. Since dere are no open specifications to dis protocow impwementation de onwy possibiwity to support it in oder cwients wouwd have been via reverse engineering.

Devewopment of MSE/PE[edit]

In wate January 2006 de devewopers of Vuze (den known as Azureus) decided to design and simuwtaneouswy impwement a new, open protocow obfuscation medod, cawwed message stream encryption (MSE). It was incwuded in Azureus CVS snapshot 2307-B29 on 19 January 2006.[5]

This first draft was heaviwy criticized since it wacked severaw key features. After negotiations between different BitTorrent devewopers a new proposaw was written and den impwemented into de Azureus and µTorrent betas widin days. In µTorrent, de new protocow was cawwed protocow encryption (PE).

MSE/PE in BitTorrent cwient versions[edit]

  • BitComet version 0.63 was reweased 7 March 2006. It removed de owd protocow header encryption and impwemented de new MSE/PE to be compatibwe wif Azureus and µTorrent.[6]
  • BitTornado supports MSE/PE as of buiwd T-0.3.18. As of January 5, 2007, dis buiwd is stiww marked "experimentaw" on de Downwoad page.[7]
  • BitTorrent (Mainwine) supports MSE/PE since version 4.9.2-beta on May 2, 2006.[8]
  • Dewuge supports MSE/PE as of Dewuge-0.5.1.[9]
  • KTorrent impwemented MSE/PE in SVN version 535386[10] on Apriw 29, 2006.[11]
  • wibtorrent[12] impwemented protocow encryption in v0.13[13] reweased on 10 December 2011.[14]
  • Vuze (formerwy Azureus) supports de finaw spec since 25 January 2006 (CVS snapshot 2307-B33).[17] Azureus version was reweased 10 February 2006, and was de first stabwe version of a cwient to support MSE/PE. However, gwitches in Azureus' impwementation resuwted in improperwy encrypted pieces dat faiwed hash checking. The gwitches were rectified as of version[18]
  • µTorrent premiered MSE/PE 4 days after Azureus wif beta 1.4.1 buiwd 407.[19] µTorrent version 1.5 (buiwd 436) was reweased on 7 March 2006; it was de first stabwe version of µTorrent wif PE.[20]


The BitComet PHE medod used in versions 0.60 to 0.62 is neider pubwished, nor is it compatibwe wif MSE/PE.

MSE/PE uses key exchange combined wif de infohash of de torrent to estabwish an RC4 encryption key. The key exchange hewps to minimize de risk of passive wisteners, and de infohash hewps avoid man-in-de-middwe attacks. RC4 is chosen for its speed. The first kibibyte (1024 bytes) of de output is discarded to prevent de Fwuhrer, Mantin and Shamir attack.

The specification awwows de users to choose between encrypting de headers onwy or de fuww connection, uh-hah-hah-hah. Encrypting de fuww connection provides more obfuscation but uses more CPU time.

To ensure compatibiwity wif oder cwients dat don't support dis specification, users may awso choose wheder unencrypted incoming or outgoing connections are stiww awwowed.

Supported cwients propagate de fact dat dey have MSE/PE enabwed drough PEX and DHT.


The estimated strengf of de encryption corresponds to about 60–80 bits for common symmetricaw ciphers.[21] Cryptographicawwy, dis effective key wengf is qwite wow, but appropriate in dat de protocow was not designed as a secure transport protocow but rader as a fast and efficient obfuscation medod. AES was proposed as de encryption medod, but not adopted because it consumed too much CPU time. The reqwired Diffie–Hewwman keys to achieve a security eqwaw to AES wouwd have been much bigger or reqwire ewwiptic curve cryptography, making de handshake more expensive in terms of used CPU time.


Some ISPs are now using more sophisticated measures (e.g. pattern/timing anawysis or categorizing ports based on side-channew data) to detect BitTorrent traffic. This means dat even encrypted BitTorrent traffic can be drottwed. However, wif ISPs dat continue to use simpwer, wess costwy medods to identify and drottwe BitTorrent, de current sowution remains effective.[citation needed]

Anawysis of de BitTorrent protocow encryption (a.k.a. MSE) has shown dat statisticaw measurements of packet sizes and packet directions of de first 100 packets in a TCP session can be used to identify de obfuscated protocow wif over 96% accuracy.[22]

The Sandvine appwication uses a different approach to disrupt BitTorrent traffic by making seeding impossibwe. Sandvine intercepts peer-to-tracker communication to identify peers based on de IP address and port numbers in de peer wist returned from de tracker. When Sandvine water sees connections to peers in de intercepted peer wists, it may (according to powicy) break dese connections by sending counterfeit TCP resets. Various sowutions exist to protect against Sandvine's attack incwuding encrypting bof peer-to-tracker and peer-to-peer communication, using Microsoft's Teredo so dat TCP connections are tunnewed widin UDP packets, fiwtering TCP resets before dey reach de TCP wayer in de end-host, or switching entirewy from a TCP-based transport to a UDP-based transport. Each sowution has its trade-offs. Fiwtering out TCP resets typicawwy reqwires kernew access, and de participation of de remote peer since Sandvine sends de reset packet to de wocaw and remote peers.[citation needed]


Bram Cohen, de inventor of BitTorrent, opposed adding encryption to de BitTorrent protocow. Cohen stated he was worried dat encryption couwd create incompatibiwity between cwients. He awso stressed de point dat de majority of ISPs don't bwock de torrent protocow. In 2006 Cohen wrote "I rader suspect dat some devewoper has gotten rate wimited by his ISP, and is more interested in trying to hack around his ISP's wimitations dan in de performance of de internet as a whowe".[23] Many BitTorrent community users responded strongwy against Cohen's accusations.[24] Cohen water added encrypted connections to his Mainwine cwient[25] wif de abiwity to receive but not originate dem.[citation needed] Notabwy, when µTorrent was purchased by BitTorrent, Inc. and den became de next mainwine rewease, de abiwity to originate encrypted connections was retained, but it became turned off by defauwt. In an interview in 2007, Cohen stated "The so-cawwed 'encryption' of BitTorrent traffic isn't reawwy encryption, it's obfuscation, uh-hah-hah-hah. It provides no anonymity whatsoever, and onwy temporariwy evades traffic shaping."[26]


  1. ^ Usuawwy referred to as de more proper protocow header encryption.


  1. ^ "eMuwe protocow obfuscation (encryption)". 2006-09-16. Retrieved 2010-03-11. 
  3. ^ "2009 Gwobaw Broadband Phenomena" (PDF). 2009-11-16. Archived from de originaw (PDF) on 2009-11-22. 
  5. ^ "[Azureus-commitwog] CVS Snapshot Azureus2307-B29.jar has been reweased !". 2006-01-19. 
  6. ^ "BitComet Cwient Rewease Notes". 2006-03-07. 
  8. ^ "Version Notes". 2006-05-02. Archived from de originaw on 2006-06-13. 
  9. ^ "Changewog: Dewuge 0.5.1 (11 June 2007)". 2007-06-11. Archived from de originaw on 2008-04-01. 
  10. ^ SVN server. 2006-04-29.Subversion cwient reqwired.
  11. ^ "Encryption has been added !". forum. 2006-04-29. Archived from de originaw on 2007-06-05. 
  13. ^ "wibtorrent/ChangeLog at master · arvidn/wibtorrent · GitHub". Retrieved 2017-02-16. 
  14. ^ "Gmane -- Maiw To News And Back Again". Retrieved 2017-02-16. 
  15. ^ "[Libtorrent-devew] LibTorrent 0.11.0 and rTorrent 0.7.0 reweased". maiw archive. 2006-12-13. 
  16. ^ "Transmission 0.90 Reweased!". Transmission, forum. 2007-10-24. Archived from de originaw on 2007-10-27. 
  17. ^ "[Azureus-commitwog] CVS Snapshot Azureus2307-B33.jar has been reweased !". 2006-01-25. 
  18. ^ "Azureus : Java BitTorrent Cwient - Changewog". 
  19. ^ "µTorrent 1.4.2 beta 435". uTorrent Announcements. 2006-01-29. Archived from de originaw on 2006-05-14. 
  20. ^ "µTorrent 1.5 reweased" Archived 2013-05-29 at de Wayback Machine.. uTorrent Announcements. 2006-03-07.
  21. ^ "RFC 3526 chapter 8". 
  22. ^ Hjewmvik, Erik; John, Wowfgang (2010-07-27). "Breaking and Improving Protocow Obfuscation" (PDF). Department of Computer Science and Engineering, Chawmers University of Technowogy. ISSN 1652-926X. 
  23. ^ Cohen, Bram (2006-01-29). "Obfuscating BitTorrent". Bram Cohen bwog. Archived from de originaw on 2006-02-07. 
  24. ^ "Debate over Protocow Encryption". forum. 2006-02-04. Archived from de originaw on 2007-10-22. 
  25. ^ "BitTorrent Mainwine Version History". 2006-10-15. Archived from de originaw on 2007-02-25. 
  26. ^ "Interview wif Bram Cohen, de inventor of BitTorrent". TorrentFreak. 2007-01-17. Retrieved 2013-04-07.

Externaw winks[edit]