Magnet URI scheme
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
|
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
- ^ "BitTorrent v2". BitTorrent. Retrieved 7 September 2020.
External links
- Magnet-URI Project on SourceForge, an early definition of the format (last update 2002)
- CHK Freeware Checksum Utility with SHA1-Base32 and ED2K support
- RHash on SourceForge, an open source command-line tool, which can calculate Magnet links