Jump to content

Magnet URI scheme

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Thumperward (talk | contribs) at 18:59, 30 November 2020 (rm desperately-out-of-date trivia). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Rounded magnet icon used on The Pirate Bay

Magnet is a URI scheme that defines the format of magnet links, a de facto standard for identifying files (URN) by their content, via cryptographic hash value rather than by their location.

Although magnet links can be used in a number of contexts, they are particularly useful in peer-to-peer file sharing networks because they allow resources to be referred to without the need for a continuously available host, and can be generated by anyone who already has the file, without the need for a central authority to issue them. This makes them popular for use as "guaranteed" search terms within the file sharing community where anyone can distribute a magnet link to ensure that the resource retrieved by that link is the one intended, regardless of how it is retrieved.

History

The standard for Magnet URIs was developed by Bitzi in 2002, partly as a "vendor- and project-neutral generalization" of the ed2k: and freenet: URI schemes used by eDonkey2000 and Freenet, respectively, and attempts to follow official IETF URI standards as closely as possible. BitTorrent introduced the btmh: protocol in 2020 as part of its BitTorrent v2 changes.[1]

Format

Magnet URIs consist of a series of one or more parameters, the order of which is not significant, formatted in the same way as query strings that ordinarily terminate HTTP URLs.[2] The most common parameter is "xt" ("exact topic"), which is generally a URN formed from the content hash of a particular file, e.g.:

magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a

This refers to the hex-encoded SHA-1 hash (btih, "BitTorrent info-hash") of the torrent file info section in question. Although a particular file is indicated, an availability search for it must still be carried out by the client application.

References

  1. ^ "BitTorrent v2". BitTorrent. Retrieved 7 September 2020.
  2. ^ http://shareaza.sourceforge.net/mediawiki/index.php/Magnet_URI_scheme

External links