
Usually, the client has a bootstrap node built in to start with. It then uses bootstrap as its connection to the DHT network using either hard-coded addresses of clients controlled by the torrent client developer, or using the DHT-supporting clients that were previously encountered in a torrent swarm. When a torrent client joins the DHT network for the first time, it generates a random 160-bit ID from the same space as infohashes. A DHT is a big distributed index that maps torrents (that was identified by infohashes) to lists of peers (identified by IP address and ports) that are participating in a swarm for that torrent (uploading/downloading data or metadata). It does this by using a separate peer-to-peer network by operating a “distributed hash table” (acronym – DHT). The first thing your torrent client needs is to find other peers who are downloading the same torrent. When you paste the magnet link onto your torrent client, it may know nothing about the torrent except for its infohash. The “infohash” is the hash of the encoded Info data.

Info, that containing the filenames and hashes for the torrent.Announce, for identifying the tracker to use for the download, and.A traditional torrent file contains a data structure with two top-level keys:
