libtorrent 2.0 a version that breaks compatibility and delays WebTorrent

The introduction of a major version of the library libtorrent (also known as libtorrent-rasterbar), reaching its new version 2.0, which offers a BitTorrent implementation that is efficient in terms of memory consumption and CPU utilization.

In this new version released changes are made to the algorithm used SHA-1 to SHA2-256, this because the first one has some problems, the transition to bind separate hash trees to each file and the application and some other things.

For those unfamiliar with the library, you should know that it is used by torrent clients such as Deluge, qBittorrent, Folx, Lince, Miro and Flush (not to be confused with the other libtorrent library used by rTorrent). The libtorrent code is written in C ++ and distributed under the BSD license.

Main changes in libtorrent 2.0

In this new released version of libtorrent 2.0 it stands out for the addition of support for the BitTorrent v2 protocol, which moves away from the use of the SHA-1 algorithm, which has problems with collision selection, in favor of SHA2-256.

With the use of the algorithm SHA2-256 guarantees both the control of the integrity of the blocks data as for records in indexes (info-dictionary), which breaks compatibility with DHT and trackers.

Although the use of this algorithm has problems with magnet links to torrents, that is why with SHA2-256 hash, a new prefix is ​​proposed "Urn: btmh:" (for SHA-1 and hybrid torrents, use "urn: btih:").

Since the hash function override breaks protocol support (a field with a 32-byte hash instead of 20 bytes), the development of the BitTorrent v2 specification was initially carried out without regard for compatibility with previous versions and other significant composition changes were made, such as the use of the Merkle hash tree in indexes to reduce the size of torrent files and block-level verification of downloaded data.

The changes in BitTorrent v2 also highlight the transition to bind separate hash trees to each file and apply file alignment in parts (without adding padding after each file), allowing you to get rid of duplicate data when there are identical files and making it easy to identify different sources for files.

As well it is noted that the efficiency of encoding the directory structure in torrent was improved and optimizations were added to process a large number of small files.

Moreover, to smooth the coexistence of the version BitTorrent v1 and BitTorrent v2, it is possible to create hybrid torrent files that include, in addition to structures with SHA-1 hashes, indexes with SHA2-256.

These hybrid torrents can be used with clients that only support BitTorrent v1.

Finally, it is also commented in the notes of this new version that the expected support of the WebTorrent protocol in libtorrent 2.0 has been postponed until the next version significant, which they mention that it will not be released until the end of the year (if all goes as planned) due to unresolved stability issues.

And you have to remember that the integration WebTorrent proposal in libtorrent library will allow you to participate in the distribution of content not only through website visitors' browsers, but also via stationary torrent clients using the libtorrent library, including Deluge and qBittorrent (rTorrent does not affect the change as it uses a different libtorrent library).

The WebTorrent implementation added to libtorrent is written in C ++ and can be ported to other torrent libraries and clients if desired (the original WebTorrent is written in JavaScript).

Therefore, it they can form hybrid networks with participants capable of interacting with networks based on BitTorrent and WebTorrent.

If you want to know more about it about the note of this new released version of the libtorrent library, you can check the details by going to the following link.

The link is this.


A comment, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   qtrit said

    As I read elsewhere, Google recently broke the SHA-1 protocol by brute force, which is why the community rushed to migrate to SHA-256.