In Peer-to-Peer (P2P) systems, files are shared between multiple users, wherein each user (known as peer) may receive different parts of a single file from various peers, wherein some or all of those peers may not have the entire files, but only different portions of which. One such Peer-to-Peer protocol that is in wide use is the Bit-Torrent protocol (hereinbelow also denoted “BT”). It is however noted that the invention may be implemented for other types of Peer-to-Peer communication as well.
In many P2P networks, files are distributed as a number of identically sized pieces (besides, potentially, the last piece). Such pieces may be of different sizes in different implementations, e.g. between 64 KB and 4 MB each. According to various P2P networks, a checksum (or other identifier string, or error correction string) is created for each of those pieces—usually by the first distributer of the file. For example, according to the Bit-Torrent protocol, a checksum is created for each piece using the SHA1 hashing algorithm.
The identifiers of all of the pieces may be stored in a single file, which is used by different users to successfully download the file, and to validate the correctness of the download (by comparing the checksum of the received pieces to those stored in the file). It is noted that such a file (which in the BT protocol implementation is commonly known as “torrent file”).
Such file which stores the identifiers of the different pieces may further include additional information, according to different protocols. For example, it may include some or all of the following portions—a link (e.g. a URL) to a tracking server that maintains lists of the client currently participating in a P2P transfer of a file (e.g. a BT tracker), suggested names for one or more files that are contained within the file, their lengths, number of pieces, the piece length used, total size, and a SHA-1 hash code (or other identifier) for each piece. All of this information may be used by a receiving client to verify an integrity of data received.
The different peers may find such an information file in different ways (e.g. browsing the web), connect to a tracking server that is identified within this information file (e.g. by a dedicated client software) and receiving from the tracking server a list of peers currently transferring pieces of one or more files specified in the information file. In order to download the actual payload file, the peer client may than connect to any one or more of those peers to obtain the various pieces. It is noted that in different P2P networks, different mechanisms may be implemented for improving download and upload rates. One such mechanism is downloading pieces of a file in a random order, so as to increase the opportunity to exchange data, which is only possible if two peers have different pieces of the file.
Private tracking servers are known in the art, which restrict access to identified users (e.g. requiring registration by a user account). A common method for controlling registration is an invitation system, in which highly regarded peers may invite several new users to register at the site. Other tracker servers may be semi-private tracker servers, in which some of the files may be downloaded by non-members. It is noted that a torrent file can include a private flag that may indicate whether a data file is to be access restricted or not.
Also, some P2P transmission may be encoded—wherein not only the payload information may be encoded, but also the information file that contains information of the different pieces of the files transmitted.
Other policies implemented by peers or by servers include limiting the transmission of file pieces only to peers that qualify different criteria—e.g. a tit for tat scheme. However, as strict policies may hamper overall transmission, different P2P networks may implement different “release” mechanisms, in which peers may be encouraged or forced to share at least some information with peers that do not qualify for the criteria used.
FIG. 1 illustrates a data file 10 (also referred to as payload file) and an information file 20, according to a prior art implementation. It is noted that the hashing process may be replaces by other algorithms known in the art (e.g. various ECCs known in the art). The data file 10 includes multiple (k) data file pieces 12(1)-12(k). Each data file piece can include multiple segments (blocks). Each data file piece can be transmitted independently from other data file pieces. Usually, in peer to peer transmission, a data file piece is transmitted one data piece segment after the other.
The information file 20 includes a header 22, a file descriptor 26 and multiple (k) data file piece identifiers 24(1)-24(k). A data file piece identifiers can be calculated by applying a hash function on data file piece. The file descriptor 26 can be calculated by applying a hash function on all data file pieces.