Jump to content

Hashes of files in torrents?


Trioxin

Recommended Posts

With torrents, is there a hash kept of each file in the torrent? The goal would be to increase the seeds of a file if it exists in two different torrents. eg:

torrent A has file1.ext
torrent B has file1.ext

We use the seeds from torrent A and torrent B to download file1.ext

Link to comment
Share on other sites

3 minutes ago, Harold Feit said:

No, hashes are per-piece not per-file.

 

Then some of the pieces must match if two torrents contain the same file right? So what if I used the filename and file size to search for similar files then matches up the hashes that are the same between multiple torrents? Could I then use the seeds of two different torrents?

Link to comment
Share on other sites

10 hours ago, Harold Feit said:

Not reliably in spite of what you might think.

Can you elaborate? It seems like since the pieces are hashed and you can request specific pieces, it should doable. What issues might be encountered and how would you go about rectifying any reliability issues?

Link to comment
Share on other sites

And what happens when you have two torrents with different piece sizes? You need to store yet another piece list.

And what happens when you have two torrents with different offsets from 0 for the first byte of the file in the piece? You need to store yet another piece list.

It's not practical to store the sheer number of combinations of piece lists required to represent every possible combination.

Link to comment
Share on other sites

  • 2 weeks later...

With that being said, it wouldn't be impossible to download from two different sources if we have the torrent file for both, since they contain the hashes for their respective pieces. The biggest problem would be matching up the files from torrent A to torrent B, since we can only go by the name and size of the files (md5 hash for the files is unfortunately an optional parameter in the torrent file), but if there is a match, then merging the data from the two source becomes trivial. After that, if we have enough data downloaded, we can hash it and check against both torrent's piece-hashes to prove that the file is indeed the same.

But to be honest, IMO this wouldn't help the download speed in most cases. Having ~25 peers is usually enough for max speeds.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...