From DCBase Wiki
The magnet: URI scheme is a draft open standard defining a URI scheme for magnet links, which are mainly used to reference resources available for download via peer-to-peer networks. Such a link typically identifies a file not by location or name, but by content, more precisely by the content's hash value.
Since it refers to a file based on content or metadata, rather than by location, a magnet link can be considered a kind of Uniform Resource Name, rather than the more common Uniform Resource Locators. Although it could be used for other applications, it is particularly useful in a peer-to-peer context, because it allows resources to be referenced without the need for a continuously available host.
Use of content hashes
The most common use of magnet links is to link to a particular file based on a hash of its contents, producing a unique identifier for the file, similar to an ISBN or catalog number. Unlike traditional identifiers, however, content-based signatures can be generated by anyone who already has the file, and so do not need 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. (While it is technically possible that two files could have the same hash value, it is statistically very unlikely; see Cryptographic hash function).
Another advantage of magnet links is their open nature and platform independence: the same magnet link can be used to download a resource from one of any number of applications on almost any operating system. Because magnets are concise and plain-text, it is possible for users to simply copy-and-paste the links into emails or instant messages, a property not found in, for example, BitTorrent files.
Magnet links consist of a series of one or more parameters, the order of which is not significant, formatted in the same way as the query string on the end of many HTTP URLs. The most common parameter is "xt", meaning "exact topic", which is generally a URN formed from the content hash of a particular file, e.g..
referring to the SHA-1 hash of the file in question. Note that although this refers to a particular file, a search must still be carried out by the client application to determine where, if anywhere, it can obtain that file.
Other parameters defined by the draft standard are:
- "dn" ("display name"): a filename to display to the user, for convenience
- "kt" ("keyword topic"): a more general search, specifying search terms rather than a particular file
- "mt" ("manifest topic"): a URI pointing to a "manifest", e.g. a list of further items
- application-specific experimental parameters, which must begin "x."
The standard also suggests that two parameters of the same type can be used by appending ".1", ".2", etc, e.g