Jump to content

BitTorrent protocol encryption

From Wikipedia, the free encyclopedia
(Redirected from Protocol header encryption)

Protocol encryption (PE), message stream encryption (MSE) or protocol header encrypt (PHE)[a] are related features of some peer-to-peer file-sharing clients, including BitTorrent clients. They attempt to enhance privacy and confidentiality. In addition, they attempt to make traffic harder to identify by third parties including internet service providers (ISPs). However, encryption will not protect one from DMCA notices from sharing illegal content, as one is still uploading material and the monitoring firms can merely connect to the swarm.

MSE/PE is implemented in BitComet, BitTornado, Deluge, Flashget, KTorrent, libtorrent (used by various BitTorrent clients, including qBittorrent), Mainline, μTorrent, qBittorrent, rTorrent, Transmission, Tixati and Vuze. PHE was implemented in old versions of BitComet. Similar protocol obfuscation is supported in up-to-date versions of some other (non-BitTorrent) systems including eMule.[1]

Purpose

[edit]

As of January 2005, BitTorrent traffic made up more than a third of total residential internet traffic,[2] although this dropped to less than 20% as of 2009. Some ISPs deal with this traffic by increasing their capacity whilst others use specialised systems to slow peer-to-peer traffic to cut costs. Obfuscation and encryption make traffic harder to detect and therefore harder to throttle. These systems were designed initially to provide anonymity or confidentiality, but became required in countries where Internet Service Providers were granted the power to throttle BitTorrent users and even ban those they believed were guilty of illegal file sharing.

History

[edit]

Early approach

[edit]

Protocol header encryption (PHE) was conceived by RnySmile and first implemented in BitComet version 0.60 on 8 September 2005. Some software like IPP2P claims BitComet traffic is detectable even with PHE.[3] PHE is detectable because only part of the stream is encrypted. Since there are no open specifications to this protocol implementation, the only possibility to support it in other clients would have been via reverse engineering.

Development of MSE/PE

[edit]

In late January 2006 the developers of Vuze (then known as Azureus) decided to design and simultaneously implement a new, open protocol obfuscation method, called message stream encryption (MSE). It was included in Azureus CVS snapshot 2307-B29 on 19 January 2006.[4]

This first draft was heavily criticized since it lacked several key features. After negotiations between different BitTorrent developers, a new proposal was written and then implemented into the Azureus and μTorrent betas within days. In μTorrent, the new protocol was called protocol encryption (PE).

MSE/PE in BitTorrent client versions

[edit]
  • aria2 supports MSE/PE as of build v1.34,[5] but is not enforced by default.
  • BitComet version 0.63 was released 7 March 2006. It removed the old protocol header encryption and implemented the new MSE/PE to be compatible with Azureus and μTorrent.[6]
  • BitTornado supports MSE/PE as of build T-0.3.18. As of January 5, 2007, this build is still marked "experimental" on the Download page.[7]
  • BitTorrent (Mainline) supports MSE/PE since version 4.9.2-beta on May 2, 2006.[8]
  • Deluge supports MSE/PE as of Deluge-0.5.1.[9]
  • KTorrent implemented MSE/PE in SVN version 535386[10] on April 29, 2006.[11]
  • libtorrent[12] implemented protocol encryption in v0.13[13] released on 10 December 2011.[14]
  • rTorrent supports MSE/PE as of rTorrent-0.7.0.[15]
  • Transmission supports MSE/PE as of Transmission-0.90.[16]
  • Vuze (formerly Azureus) supports the final spec since 25 January 2006 (CVS snapshot 2307-B33).[17] Azureus version 2.4.0.0 was released 10 February 2006, and was the first stable version of a client to support MSE/PE. However, glitches in Azureus' implementation resulted in improperly encrypted pieces that failed hash checking. The glitches were rectified as of version 2.4.0.2.[18]
  • μTorrent premiered MSE/PE 4 days after Azureus with beta 1.4.1 build 407.[19] μTorrent version 1.5 (build 436) was released on 7 March 2006; it was the first stable version of μTorrent with PE.[20]

Operation

[edit]

The BitComet PHE method used in versions 0.60 to 0.62 is neither published, nor is it compatible with MSE/PE.

MSE/PE uses key exchange combined with the infohash of the torrent to establish an RC4 encryption key. The key exchange helps to minimize the risk of passive listeners, and the infohash helps avoid man-in-the-middle attacks. RC4 is chosen for its speed. The first kibibyte (1024 bytes) of the output is discarded to prevent the Fluhrer, Mantin and Shamir attack.

The specification allows the users to choose between encrypting the headers only or the full connection. Encrypting the full connection provides more obfuscation but uses more CPU time.

To ensure compatibility with other clients that don't support this specification, users may also choose whether unencrypted incoming or outgoing connections are still allowed.

Supported clients propagate the fact that they have MSE/PE enabled through PEX and DHT.

Security

[edit]

The estimated strength of the encryption corresponds to about 60–80 bits for common symmetrical ciphers.[21] Cryptographically, this effective key length is quite low, but appropriate in that the protocol was not designed as a secure transport protocol but rather as a fast and efficient obfuscation method. AES was proposed as the encryption method, but not adopted because it consumed too much CPU time. The required Diffie–Hellman keys to achieve a security equal to AES would have been much bigger or require elliptic curve cryptography, making the handshake more expensive in terms of used CPU time.

Effectiveness

[edit]

Analysis of the BitTorrent protocol encryption (a.k.a. MSE) has shown that statistical measurements of packet sizes and packet directions of the first 100 packets in a TCP session can be used to identify the obfuscated protocol with over 96% accuracy.[22]

Criticism

[edit]

Bram Cohen, the inventor of BitTorrent, opposed adding encryption to the BitTorrent protocol. Cohen stated he was worried that encryption could create incompatibility between clients. He also stressed the point that the majority of ISPs don't block the torrent protocol. In 2006 Cohen wrote "I rather suspect that some developer has gotten rate limited by his ISP, and is more interested in trying to hack around his ISP's limitations than in the performance of the internet as a whole".[23] Many BitTorrent community users responded strongly against Cohen's accusations.[24] Cohen later added encrypted connections to his Mainline client[25] with the ability to receive but not originate them.[citation needed] Notably, when μTorrent was purchased by BitTorrent, Inc. and then became the next mainline release, the ability to originate encrypted connections was retained, but it became turned off by default. In an interview in 2007, Cohen stated "The so-called 'encryption' of BitTorrent traffic isn't really encryption, it's obfuscation. It provides no anonymity whatsoever, and only temporarily evades traffic shaping."[26]

Notes

[edit]
  1. ^ Usually referred to as the more proper protocol header encryption.

References

[edit]
  1. ^ "eMule protocol obfuscation (encryption)". emule-project.net. 2006-09-16. Archived from the original on 2009-09-25. Retrieved 2010-03-11.
  2. ^ "The Bittorrent Effect". Wired. 2007-05-30. Archived from the original on 2006-03-26. Retrieved 2017-03-05.
  3. ^ "News". IPP2P.org. 2006-01-04. Archived from the original on 2013-05-20. Retrieved 2006-01-29.
  4. ^ "[Azureus-commitlog] CVS Snapshot Azureus2307-B29.jar has been released !". Sourceforge.net. 2006-01-19. Archived from the original on 2019-09-24. Retrieved 2013-04-08.
  5. ^ "aria2c(1) — aria2 1.34.0 documentation". aria2.github.io. Retrieved 2019-05-29.
  6. ^ "BitComet Client Release Notes". Bitcomet.com. 2006-03-07. Archived from the original on 2010-12-17. Retrieved 2006-03-07.
  7. ^ "BitTornado T-0.3.18". Degreez.net forum. 2007-01-05. Archived from the original on 2017-03-25. Retrieved 2007-01-06.
  8. ^ "Version Notes". BitTorrent.com. 2006-05-02. Archived from the original on 2006-06-13.
  9. ^ "Changelog: Deluge 0.5.1 (11 June 2007)". Deluge-torrent.org. 2007-06-11. Archived from the original on 2008-04-01.
  10. ^ SVN server. KDE.org. 2006-04-29.Subversion client required.
  11. ^ "Encryption has been added !". KTorrent.pwsp.net forum. 2006-04-29. Archived from the original on 2007-06-05.
  12. ^ Norberg, Arvid. "www.libtorrent.org/reference-Settings.html". www.libtorrent.org. Archived from the original on 2017-02-17. Retrieved 2017-02-16.
  13. ^ "libtorrent/ChangeLog at master · arvidn/libtorrent · GitHub". github.com. Archived from the original on 2017-05-10. Retrieved 2017-02-16.
  14. ^ "Gmane -- Mail To News And Back Again". permalink.gmane.org. Archived from the original on 2017-02-17. Retrieved 2017-02-16.
  15. ^ "[Libtorrent-devel] LibTorrent 0.11.0 and rTorrent 0.7.0 released". Rakshasa.no mail archive. 2006-12-13. Archived from the original on 2007-05-02. Retrieved 2007-06-10.
  16. ^ "Transmission 0.90 Released!". Transmission.m0k.org forum. 2007-10-24. Archived from the original on 2007-10-27.
  17. ^ "[Azureus-commitlog] CVS Snapshot Azureus2307-B33.jar has been released !". Sourceforge.net. 2006-01-25. Archived from the original on 2019-09-24. Retrieved 2013-04-08.
  18. ^ "Azureus : Java BitTorrent Client - Changelog". Azureus.sourceforge.net. Archived from the original on 2006-03-20. Retrieved 2006-03-20.
  19. ^ "μTorrent 1.4.2 beta 435". uTorrent Announcements. 2006-01-29. Archived from the original on 2006-05-14.
  20. ^ "μTorrent 1.5 released" Archived 2013-05-29 at the Wayback Machine. uTorrent Announcements. 2006-03-07.
  21. ^ "RFC 3526 chapter 8". IETF.org. Archived from the original on 2017-01-18. Retrieved 2007-08-26.
  22. ^ Hjelmvik, Erik; John, Wolfgang (2010-07-27). "Breaking and Improving Protocol Obfuscation" (PDF). Technical Report. Department of Computer Science and Engineering, Chalmers University of Technology. ISSN 1652-926X. Archived (PDF) from the original on 2020-11-11. Retrieved 2010-08-17.
  23. ^ Cohen, Bram (2006-01-29). "Obfuscating BitTorrent". Bram Cohen blog. Archived from the original on 2006-02-07.
  24. ^ "Debate over Protocol Encryption". uTorrent.com forum. 2006-02-04. Archived from the original on 2007-10-22.
  25. ^ "BitTorrent Mainline Version History". BitTorrent.com. 2006-10-15. Archived from the original on 2007-02-25.
  26. ^ "Interview with Bram Cohen, the inventor of BitTorrent" Archived 2013-07-15 at the Wayback Machine. TorrentFreak. 2007-01-17. Retrieved 2013-04-07.
[edit]