hashtorrentinfo-hash

What exactly is the info_Hash in a torrent file


I am reading lately a lot about hash from torrents, and magnetic links, etc. But there is a question I don't understand.

I have:

Is the infohash = hash of the file ?

If yes what if the torrent describes 6 Files to download?

If no what does it stand for?


Solution

  • So I finally figured it out.

    The “infohash” is the SHA1 Hash over the part of a torrent file that includes:

    1. ITEM: length(size) and path (path with filename)
    2. Name: The name to search for
    3. Piece length: The length(size) of a single piece
    4. Pieces: SHA1 Hash of EVERY piece of this torrent
    5. Private: flag for restricted access

    To show this a little more I took a random torrent file and used the “BEncode Editor” from Ultima to make it more clearly to me.

    BEncode Editor

    As you can see the the red box marked the information part of the torrent file. The torrent file includes not the Hash of the items, but the hashes of every piece.

    enter image description here

    I am sorry that this information is about a torrent that leads to a illegal movie, but i wanted to use a torrent that realy exists.